kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Merge branch '1246-rescan-update-genre-tags' into 'develop'
Allow genre tags to be updated when rescanning files in-place See merge request funkwhale/funkwhale!1225environments/review-docs-devel-1399dq/deployments/6607
commit
4252ae3444
|
@ -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")
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Allow genre tags to be updated when rescanning files in-place (#1246)
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue