Ejemplo n.º 1
0
            print "<td><a class='file' href='fileinfo.py?file=" + escapedfilename + "'>" + displayname + "</a><br></td>"
            print "</tr>"

    print "</table>"

    sys.exit()


import common

common.navigation_header("History")

myconfig = config.get_config()
mediadir = myconfig["mediadir"][:-1]
form = cgi.FieldStorage()
playlist = config.get_playlist()

try:
    searchdate = datetime.datetime(
        int(form["year"].value),
        int(form["month"].value),
        int(form["day"].value),
        int(form["hour"].value),
        int(form["min"].value),
    )
    timerange = form["range"].value
except KeyError:
    searchdate = datetime.datetime.today()
    timerange = "20"

print "<h1>What was played?</h1>"
Ejemplo n.º 2
0
    fifocontrol.do_votelist(form['votelist'].value)

check_oyster_started()

infofile = open(basedir + 'info')
info = infofile.readline()[:-1]
infofile.close()

nextarray = []
if os.path.exists(basedir + 'nextfile'):
    nextfile = open(basedir + 'nextfile')
    for line in nextfile.readlines():
        nextarray.append(line[:-1])
    nextfile.close()

playlist = config.get_playlist()
playreason = info.split()[0]

# Remove playreason from info line
info = re.sub(r'^[A-Z]* ', '', info)

tag = taginfo.get_tag(info)

if playreason == 'PLAYLIST':
    playreason = ' (random)'
    pr_image = 'pr_random.png'
    pr_alt = 'random'
elif playreason == 'SCORED':
    playreason = ' (scored)'
    pr_image = 'pr_scored.png'
    pr_alt = 'scored'