1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-09 19:52:16 +00:00
This commit is contained in:
Alban Féron 2021-11-06 17:45:25 +01:00
parent f8c3d99e87
commit 91cb3fb179
No known key found for this signature in database
GPG Key ID: 8CE0313646D16165

View File

@ -301,7 +301,9 @@ def _cover_from_collection(obj, extract=True):
cover_path = os.path.join(obj.path, obj.cover_art) cover_path = os.path.join(obj.path, obj.cover_art)
elif isinstance(obj, Album): elif isinstance(obj, Album):
track_with_folder_cover = obj.tracks.select(lambda t: t.folder.cover_art is not None).first() track_with_folder_cover = obj.tracks.select(
lambda t: t.folder.cover_art is not None
).first()
if track_with_folder_cover is not None: if track_with_folder_cover is not None:
cover_path = _cover_from_collection(track_with_folder_cover.folder) cover_path = _cover_from_collection(track_with_folder_cover.folder)