From 194bf5e277c7069b0e8eb36d26017e2b65789738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alban=20F=C3=A9ron?= Date: Sun, 1 Nov 2020 15:44:56 +0100 Subject: [PATCH] Add test for M4A embedded art --- tests/api/test_media.py | 7 +++---- tests/assets/formats/silence.m4a | Bin 0 -> 13072 bytes 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100755 tests/assets/formats/silence.m4a diff --git a/tests/api/test_media.py b/tests/api/test_media.py index b24f6ad..66c4fc1 100644 --- a/tests/api/test_media.py +++ b/tests/api/test_media.py @@ -1,10 +1,9 @@ #!/usr/bin/env python -# coding: utf-8 # # This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # -# Copyright (C) 2017 Alban 'spl0k' Féron +# Copyright (C) 2017-2020 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. @@ -52,7 +51,7 @@ class MediaTestCase(ApiTestBase): ) self.trackid = track.id - self.formats = [("mp3", "mpeg"), ("flac", "flac"), ("ogg", "ogg")] + self.formats = ["mp3", "flac", "ogg", "m4a"] for i in range(len(self.formats)): track_embeded_art = Track( title="[silence]", @@ -61,7 +60,7 @@ class MediaTestCase(ApiTestBase): artist=artist, album=album, path=os.path.abspath( - "tests/assets/formats/silence.{0}".format(self.formats[i][0]) + "tests/assets/formats/silence.{0}".format(self.formats[i]) ), root_folder=folder, folder=folder, diff --git a/tests/assets/formats/silence.m4a b/tests/assets/formats/silence.m4a new file mode 100755 index 0000000000000000000000000000000000000000..9e9675cb3a6f75f7a35e8ba9b80f3e1a1ce18725 GIT binary patch literal 13072 zcmeHtcT`i|v*-!EcMzmEDS`%&j&zYCMNq0>LeoeKy+i1z2%<=DB1NQ%5K0gNNN*}i z3-zN50R-voCiuC2x4iZKdhd^W?>8&6X7-24C7*7s-2ZfI1ILwW0ze%AfX;t-)o;MH{{#G| zw(5US{+9*;01$+Ec|e_TntNVO=RQgQ4>-U74$g)D$0%Fq z;#eLR`~UO2?tVHqP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