diff options
author | Christian Pointner <equinox@helsinki.at> | 2017-01-12 17:28:03 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2017-01-12 17:28:03 (GMT) |
commit | 82204a17ee6feda5fcf4d376ef05bb9f4a8844c5 (patch) | |
tree | d6db4a53fb1b45af0a2420ba22388c401c28b10e /nop/views.py | |
parent | bee4dba4ed6c8519a9a87027d20d3c3f284ec7fa (diff) | |
parent | 1db5125c61ed8ed050b01b7d0944569727a39e48 (diff) |
Merge branch 'master' into stable
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, |