Added stats endpoint for domain

This commit is contained in:
Eliot Berriot 2018-12-27 19:58:34 +01:00
parent be388870a3
commit 032197da3f
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
5 changed files with 71 additions and 1 deletions

View file

@ -617,6 +617,8 @@ class UploadQuerySet(models.QuerySet):
def for_federation(self):
return self.filter(import_status="finished", mimetype__startswith="audio/")
def with_file(self):
return self.exclude(audio_file=None).exclude(audio_file='')
TRACK_FILE_IMPORT_STATUS_CHOICES = (
("pending", "Pending"),