Bug 505985

Summary: Imported songs take the album art of a random photo in the music folder
Product: [Applications] Elisa Reporter: Jadenn Hillier <jadenn>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.12.3   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Elisa Tracks Listing
Dolphin File Listing

Description Jadenn Hillier 2025-06-22 16:59:05 UTC
Created attachment 182528 [details]
Elisa Tracks Listing

STEPS TO REPRODUCE
1. Have songs in ~/Music
2. Have one or more images in the same folder
2. Open Elisa

OBSERVED RESULT
Elisa picks an image from the music folder at random and uses that as the album art for every track.

EXPECTED RESULT
Tracks should display their own album art from the MP3 etag. Viewing the underlying files in Dolphin correctly displays each track's album art.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Almalinux 10.0
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.1
Comment 1 Jadenn Hillier 2025-06-22 17:00:53 UTC
Created attachment 182529 [details]
Dolphin File Listing
Comment 2 Bug Janitor Service 2025-06-27 19:56:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/697
Comment 3 Jack Hill 2025-07-05 19:46:24 UTC
Git commit 89c0fc4ac0ae643cc493f31a72ef890930adda16 by Jack Hill.
Committed on 05/07/2025 at 19:31.
Pushed by jackh into branch 'master'.

Remove unneeded cover file cache in file listing

This is unneeded and buggy for the following reasons:
1. It was only storing external cover files
2. These cover files are already cached on a directory basis in
   filescanner
3. The file url was used as the key, but the search for the cached cover
   was using the album title as the key
4. Even if we started using the album title as the key, it is possible
   for separate albums to have the same title
5. We wouldn't want to cache by track url either because this would mean
   the database wouldn't update if the cover file was modified

Test-plan:
Tested manually by copying a music file into a folder that already
contained an image file. Previously Elisa would use the external image
file regardless of whether the music file had an embedded cover. Now
Elisa uses the embedded cover.

M  +0    -32   autotests/localfilelistingtest.cpp
M  +8    -2    src/abstractfile/abstractfilelistener.cpp
M  +3    -17   src/abstractfile/abstractfilelisting.cpp
M  +2    -4    src/abstractfile/abstractfilelisting.h
M  +1    -3    src/android/androidfilelisting.cpp
M  +5    -0    src/databaseinterface.h
M  +1    -3    src/file/localfilelisting.cpp
M  +1    -0    src/filescanner.cpp
M  +3    -3    src/modeldataloader.cpp
M  +2    -2    src/modeldataloader.h
M  +1    -1    src/models/editabletrackmetadatamodel.cpp
M  +1    -1    src/models/editabletrackmetadatamodel.h

https://invent.kde.org/multimedia/elisa/-/commit/89c0fc4ac0ae643cc493f31a72ef890930adda16