Skip to content

Commit

Permalink
Fixed short playlist problem with date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
plamere committed Feb 25, 2016
1 parent 9126e41 commit 497de22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/plugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,11 +786,9 @@ def next_track(self):
raise engine.PBLException(self, msg)

if self.uri and self.cur_index >= len(self.tracks) and self.track_count < self.total:
self._get_all_tracks()
if self.order_by_date_added:
self._get_all_tracks()
self.order_tracks_by_date_added()
else:
self._get_more_tracks()

if self.cur_index < len(self.tracks):
track, date = self.tracks[self.cur_index]
Expand Down Expand Up @@ -920,12 +918,11 @@ def next_track(self):
msg += ' for user ' + self.user
raise engine.PBLException(self, msg)

# print 'next_track', self.cur_index, self.track_count, self.total
if self.uri and self.cur_index >= len(self.tracks) and self.track_count < self.total:
self._get_all_tracks()
if self.order_by_date_added:
self._get_all_tracks()
self.order_tracks_by_date_added()
else:
self._get_more_tracks()

if self.cur_index < len(self.tracks):
track, date = self.tracks[self.cur_index]
Expand Down

0 comments on commit 497de22

Please sign in to comment.