Code cleanup.
This commit is contained in:
parent
5a48b68b2f
commit
f9d24de34c
1 changed files with 3 additions and 3 deletions
|
@ -19,6 +19,9 @@ class SongManager(models.Manager):
|
|||
def get_queryset(self):
|
||||
return SongQuerySet(self.model, using=self._db)
|
||||
|
||||
def available(self):
|
||||
return self.get_queryset().songs().enabled().published()
|
||||
|
||||
def playlist_length(self):
|
||||
"""
|
||||
Total length of available songs in the playlist (in seconds).
|
||||
|
@ -39,9 +42,6 @@ class SongManager(models.Manager):
|
|||
"""
|
||||
return timezone.now() - timedelta(seconds=float(self.wait_total()))
|
||||
|
||||
def available(self):
|
||||
return self.get_queryset().songs().enabled().published()
|
||||
|
||||
def playable(self):
|
||||
return self.available().filter(
|
||||
models.Q(last_played__lt=self.datetime_from_wait()) |
|
||||
|
|
Loading…
Reference in a new issue