Closed Zren closed 1 year ago
would you mind checking if this issue is still present?
I don't think this will work with flatpak.
For local songs which has local accessible album cover art, strawberry uses that URL directly in mpris:artUrl. But for embedded covers and streams, strawberry uses the temporary saved cover in /tmp.
The /tmp location used by Strawberry in flatpak is not accessible to the outside system (https://docs.flatpak.org/en/latest/sandbox-permissions.html).
I suggest to patch https://github.com/strawberrymusicplayer/strawberry/blob/master/src/covermanager/currentalbumcoverloader.cpp#L42 to use QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
instead.
This is the only place strawberry uses /tmp, most other code uses QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
on unix, and QStandardPaths::writableLocation(QStandardPaths::TempLocation)
on other systems to avoid using /tmp.
And i'm not a fan of using /tmp at all, the only reason it's used here is because, if strawberry is forcefully shutdown or crashing, it's more likely /tmp is on a ramdisk on modern system and it will be cleared on boot, if they were in the cache location (~/.cache/strawberry/strawberry/), it might fill up with temporary covers over time.
https://www.reddit.com/r/kde/comments/x93cro/how_can_i_make_strawberry_player_show_the_songs/inoff58/?context=3
When strawberry is running, you should be able to get the thumbnail exposed to mpris with:
The user was not able to find the thumbnail file in
/tmp/
.Notes: Strawberry seems to be using
QDir::tempPath()
for the temp dir.cpp temp_file_pattern_(QDir::tempPath() + "/strawberry-cover-XXXXXX.jpg"),