Allow genre tags to be updated when rescanning files in-place

environments/review-docs-devel-1399dq/deployments/6607
Cédric Schieli 2020-10-11 16:14:58 +02:00
rodzic 968e66eb46
commit 4845325612
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 536E33BF3FD66325
4 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -937,6 +937,8 @@ def update_track_metadata(audio_metadata, track):
if obj_updated_fields:
obj.save(update_fields=obj_updated_fields)
tags_models.set_tags(track, *new_data.get("tags", []))
if track.album and "album" in new_data and new_data["album"].get("cover_data"):
common_utils.attach_file(
track.album, "attachment_cover", new_data["album"].get("cover_data")

Wyświetl plik

@ -1364,6 +1364,7 @@ def test_update_track_metadata(factories):
"license": "Dummy license: http://creativecommons.org/licenses/by-sa/4.0/",
"copyright": "Someone",
"comment": "hello there",
"genre": "classical",
}
tasks.update_track_metadata(metadata.FakeMetadata(data), track)
@ -1382,6 +1383,9 @@ def test_update_track_metadata(factories):
assert str(track.artist.mbid) == data["musicbrainz_artistid"]
assert track.album.artist.name == "Edvard Grieg"
assert str(track.album.artist.mbid) == "013c8e5b-d72a-4cd3-8dee-6c64d6125823"
assert sorted(track.tagged_items.values_list("tag__name", flat=True)) == [
"classical"
]
def test_fs_import_not_pending(factories):

Wyświetl plik

@ -0,0 +1 @@
Allow genre tags to be updated when rescanning files in-place (#1246)

Wyświetl plik

@ -145,6 +145,7 @@ Funkwhale will pick up the new title. The following fields can be updated this w
- Track title
- Track position and disc number
- Track license and copyright
- Track genre
- Album cover
- Album title
- Album mbid