mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
bug fixes
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ def get_image(_map: tuple[str, Album]):
|
||||
matching_tracks = AlbumStore.get_album_tracks(album.albumhash)
|
||||
|
||||
for track in matching_tracks:
|
||||
if extract_thumb(track.filepath, track.image):
|
||||
if extract_thumb(track.filepath, track.albumhash + ".webp"):
|
||||
break
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ class IndexTracks:
|
||||
for track in tracks:
|
||||
try:
|
||||
extract_thumb(
|
||||
track["filepath"], track["trackhash"] + ".webp", overwrite=True
|
||||
track["filepath"], track["albumhash"] + ".webp", overwrite=True
|
||||
)
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
|
||||
+6
-1
@@ -159,6 +159,11 @@ def get_tags(filepath: str, config: UserConfig):
|
||||
except Exception as e: # noqa: E722
|
||||
return None
|
||||
|
||||
try:
|
||||
other = tags.other
|
||||
except AttributeError:
|
||||
other = {}
|
||||
|
||||
metadata: dict[str, Any] = {
|
||||
"album": tags.album,
|
||||
"albumartists": tags.albumartist,
|
||||
@@ -172,7 +177,7 @@ def get_tags(filepath: str, config: UserConfig):
|
||||
"track": tags.track,
|
||||
"disc": tags.disc,
|
||||
"genres": tags.genre,
|
||||
"copyright": " ".join(tags.other.get("copyright", [])),
|
||||
"copyright": " ".join(other.get("copyright", [])),
|
||||
"extra": {},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user