Subsonic: Fixed casing of "bitRate" attribute

This follows the Subsonic / OpenSubsonic API spec

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2695>
environments/review-docs-renov-r6aeyi/deployments/19166
Philipp Wolfer 2023-12-30 18:45:27 +01:00 zatwierdzone przez Marge
rodzic 0fab0470c2
commit e169e8edb1
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -131,7 +131,7 @@ def get_track_data(album, track, upload):
if album and album.attachment_cover_id:
data["coverArt"] = f"al-{album.id}"
if upload.bitrate:
data["bitrate"] = int(upload.bitrate / 1000)
data["bitRate"] = int(upload.bitrate / 1000)
if upload.size:
data["size"] = upload.size
if album and album.release_date:
@ -347,7 +347,7 @@ def get_channel_episode_data(upload, channel_id):
"genre": "Podcast",
"size": upload.size if upload.size else "",
"duration": upload.duration if upload.duration else "",
"bitrate": upload.bitrate / 1000 if upload.bitrate else "",
"bitRate": upload.bitrate / 1000 if upload.bitrate else "",
"contentType": upload.mimetype or "audio/mpeg",
"suffix": upload.extension or "mp3",
"status": "completed",

Wyświetl plik

@ -202,7 +202,7 @@ def test_get_album_serializer(factories):
"contentType": upload.mimetype,
"suffix": upload.extension or "",
"path": serializers.get_track_path(track, upload.extension),
"bitrate": 42,
"bitRate": 42,
"duration": 43,
"size": 44,
"created": serializers.to_subsonic_date(track.creation_date),
@ -344,7 +344,7 @@ def test_channel_episode_serializer(factories):
"genre": "Podcast",
"size": upload.size,
"duration": upload.duration,
"bitrate": upload.bitrate / 1000,
"bitRate": upload.bitrate / 1000,
"contentType": upload.mimetype,
"suffix": upload.extension,
"status": "completed",