Closed elesto closed 1 year ago
Sorry, I don't really understand what you want to describe. Maybe it's the fault of your system's Media Store (providing messy random thumbnail🤔)?
When playing a song the thumbnails displayed are wrong. The app chooses a seemingly random thumbnail from my songs and displays it for every song in that folder.
Im not a dev so I dont know the details about androids media store. Have you been able to reproduce this using my example? I can help you troubleshoot.
When playing a song the thumbnails displayed are wrong. The app chooses a seemingly random thumbnail from my songs and displays it for every song in that folder.
Im not a dev so I dont know the details about androids media store. Have you been able to reproduce this using my example? I can help you troubleshoot.
Are your thumbnails embedded in song files?
Yes I use yt-dlp for this. I use this command yt-dlp -x -f bestaudio --audio-quality 5 --audio-format mp3 --embed-thumbnail "https://www.youtube.com/watch?v=iZ0Jm_EqXd0"
It uses ffmpeg to embed the thumbnail I think
Well, I used yt-dlp
to try steps you said. Here is the conclusion:
Yes, you're right. But why?
I checked MediaStore
databases and used ffmpeg
to read metadata (aka. "Music Tags"), and found that yt-dlp
doesn't write any music tags (such as Artist
, Album
, Year
etc.) into songs. And since these files were put into one folder and files were not tagged with Album
, so Android take the folder name (actually containing path but not showing) as these files' Album name. However, now here is the key point: MediaStore
only read album covers (and save this albums thumbnail in dir './thumbnail' under music path), and as we known, an Album has only a cover artwork traditionally, so MediaStore
randomly chooses artwork of any of song files in the same album as Album cover. As a result, when fetching files downloaded by yt-dlp
, Phonograph Plus fetches from MediaStore
but only obtaining thumbnail that Android supposes , however, that is not true.
This is just thumbnail just belongs to any file under this folder because Android "thinks" they belong to one album, but actually every file has a distinct (video) thumbnail, MediaStore
is "wrong".
But how to fix? (temperately)
ignore media store covers
(Phonograph Plus then fetches directly from file bypassing thumbnail MediaStore provided);Album
tags to these downloaded files. WARNNING: Try not to use Phonograph Plus's tag editor in high version Android, editor is unmaintained now and a kind of "rusty" and "shaky".Thanks for investigating! Im using "ignore media store covers" as workaround for now. So basically a fix for this isnt possible because its a fault of yt-dlp
Thanks for investigating! Im using "ignore media store covers" as workaround for now. So basically a fix for this isnt possible because its a fault of yt-dlp
😂Actually, in the future, I am planning to add a preference to allow ”ignore media store covers when tags are not complete” for those songs like this. This is a compromise that it can let songs with complete tags using MediaStore thumbnails while let songs with no tags using directly fetched thumbnails from file.
But, considering there are some more important works to do and codes about thumbnails loading are not easy to modify (gently and elegantly) , the plan would be postponed (to next month?🤔).
It's been over 1 year.
We have Trouble Shooting & FAQ now. Close!
I use the music player in folder view. I have a folder with 10 songs in it all with different artwork embedded. The artwork displays fine in the tiny folder view icons but when playing the song the artwork defaults to a seemingly random artwork in that folder and displays it for each song in the folder. This is true for the notification widget and the song playing window. I used yt-dlp which uses ffmpeg to embed the artwork from YouTube.com.
Selecting "ignore media store covers" fixes it but slows down loading time. Its a workaround that I use for now.
How to reproduce
yt-dlp -x -f bestaudio --audio-quality 5 --audio-format mp3 --embed-thumbnail --write-sub --sub-lang en --convert-subs lrc --add-metadata "YT URL HERE"