summaryrefslogtreecommitdiff
path: root/nop
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-06-10 08:58:42 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-06-10 08:58:42 (GMT)
commitf1b9ec434bcd91d5b24bf075f2acc06b144e9cfa (patch)
tree1637641269ff4950f56f4a4c305a09faa19471ed /nop
parentbfc6020cb94e713c86e5651dc27cf9d1bd740203 (diff)
extend trackinfo retrieving for more shows
Diffstat (limited to 'nop')
-rw-r--r--nop/views.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nop/views.py b/nop/views.py
index 4b43975..5a52a07 100644
--- a/nop/views.py
+++ b/nop/views.py
@@ -10,7 +10,10 @@ import time
from datetime import datetime
DB = 'nop'
-MUSIKPROG_ID = 1 # unmodieriertes musikprogramm
+MUSIKPROG_IDS = (1,17,81)
+ # unmodieriertes musikprogramm
+ # bumbumtschak
+ # selchfleisch
class NopForm(forms.Form):
date = forms.DateField(
@@ -63,7 +66,7 @@ def _current():
title = None
album = None
show = _get_show()
- if show['id'] == MUSIKPROG_ID:
+ if show['id'] in MUSIKPROG_IDS:
# reverse sorted. get the first object = last played
result = _which().objects.using(DB).all()[0]
artist = result.artist
@@ -79,7 +82,7 @@ def _bydate(year=None, month=None, day=None, hour=None, minute=None):
#try:
#import pdb;pdb.set_trace()
show = _get_show(datetime(year, month, day, hour, minute))
- if show['id'] and show['id'] != MUSIKPROG_ID:
+ if show['id'] and show['id'] not in MUSIKPROG_IDS:
return [{'show': show['name'],
'start': show['start'],
'artist': None,