See #75: initial subsonic implementation that works with http://p.subfireplayer.net

This commit is contained in:
Eliot Berriot 2018-05-08 16:32:07 +02:00
parent 9682299480
commit bbd273404a
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
15 changed files with 774 additions and 48 deletions

View file

@ -457,7 +457,13 @@ class TrackFile(models.Model):
def filename(self):
return '{}{}'.format(
self.track.full_name,
os.path.splitext(self.audio_file.name)[-1])
self.extension)
@property
def extension(self):
if not self.audio_file:
return
return os.path.splitext(self.audio_file.name)[-1].replace('.', '', 1)
def save(self, **kwargs):
if not self.mimetype and self.audio_file: