Skip to content
Snippets Groups Projects
Commit d9f5497c authored by ale's avatar ale
Browse files

fixed a missing SQL filter for state=READY in never_played()

parent c9e6cc9c
Branches
No related tags found
No related merge requests found
......@@ -189,7 +189,8 @@ class MP3(Base):
@classmethod
def never_played(cls, n=10):
"""Return N random songs that were never played."""
return cls.get_random_songs(n, where_clause=(cls.play_count == 0))
return cls.get_random_songs(n, where_clause=(
(cls.play_count == 0) & (cls.state == cls.READY)))
@classmethod
def uploads_by_day(cls, days=30):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment