diff options
Diffstat (limited to 'nop/views.py')
-rw-r--r-- | nop/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nop/views.py b/nop/views.py index 9fd87ee..a8697bf 100644 --- a/nop/views.py +++ b/nop/views.py @@ -89,7 +89,7 @@ def _current(): if show['id'] in MUSIKPROG_IDS \ or (show['id'] in SPECIAL_PROGRAM_IDS and not show['note']): - result = _which().objects.using(DB).all()[0] + result = _which().objects.using(DB).filter(carttype__exact='pool')[0] artist = result.artist title = result.title album = result.album @@ -113,7 +113,7 @@ def _bydate(year=None, month=None, day=None, hour=None, minute=None): else: ts = int(time.mktime((int(year), int(month), int(day), int(hour), int(minute), 0, 0, 0, -1))) * 1000000 - result = _which(ts).objects.using(DB).filter(timestamp__lt=ts)[:5] + result = _which(ts).objects.using(DB).filter(carttype__exact='pool').filter(timestamp__lt=ts)[:5] return [{'show': show['name'], 'start': _dtstring(time.localtime(item.timestamp//1000000)), 'artist': item.artist, |