Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Tracks displaying wrong embedded artworks #494

Open
ghost opened this issue Feb 11, 2025 · 6 comments
Open

[BUG] Tracks displaying wrong embedded artworks #494

ghost opened this issue Feb 11, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Feb 11, 2025

If there are two or more files that share the same name and they have embedded artwork, all files with the same name will use the artwork of one of the identically named files instead of their respective embedded artwork. I believe this only relates to files with embedded artwork and not folders with "cover" or "folder" images in them, although I have not verified this. This issue is present on three different android devices I have used.

Expected Behavior

Each track should display its respective embedded artwork.

Current Behavior

If I have 3 files called "Song", (referred to as Song 1, 2 and 3 for explanation), each with different artwork, tracks "Song" 2 and "Song" 3 will instead display the artwork of "Song" 1. The incorrect artwork will also be displayed in the media player notification.

Steps to Reproduce

  1. Have multiple files with same name in music library with their own respective artworks.
  2. View said files artworks and observe incorrect artworks.

Screenshots

Screenshot_20250211-002544.png

screen-20250211-002642.mp4

The above video shows the problem clearly. You can see the correct artwork for the track is displayed when you open the "edit tags" menu.

Logs

logs_4.8.6_250101116.txt

Possible Solution

I would presume cached artwork files are named after the respective file name that the artwork is associated with. When caching artworks (assuming my presumption is correct, I haven't read the code myself), naming them with the schema {title}{artist}{album} would prevent these conflicts in the future.

@ghost ghost added the bug Something isn't working label Feb 11, 2025
@ghost ghost changed the title [BUG] [BUG] Embedded artworks not being fetched correctly Feb 11, 2025
@ghost ghost changed the title [BUG] Embedded artworks not being fetched correctly [BUG] Tracks displaying wrong embedded artworks Feb 11, 2025
@MSOB7YY
Copy link
Member

MSOB7YY commented Feb 11, 2025

thats expected behaviour since artworks are saved based on their filename, u can change that by enabling "group artworks by album" and maybe specify "album identifiers"

I would presume cached artwork files are named after the respective file name that the artwork is associated with. When caching artworks (assuming my presumption is correct, I haven't read the code myself), naming them with the schema {title}{artist}{album} would prevent these conflicts in the future.

exactly as u pre assumed, except that i didnt like this as default, since tags can be changed more than filename + for me atleast i have some music with similar tags (nightcore/sped up/slowed/etc), i guess "group artworks by album" would do it for ya, or i guess u should name ur files properly like for example "[track] artist - title (album)", lemme know if i missed smth or if u disagree

@ghost
Copy link
Author

ghost commented Feb 11, 2025

thats expected behaviour since artworks are saved based on their filename, u can change that by enabling "group artworks by album" and maybe specify "album identifiers"

Noted, thank you!

i guess "group artworks by album" would do it for ya, or i guess u should name ur files properly like for example "[track] artist - title (album)", lemme know if i missed smth or if u disagree

"group artworks by album" solves my original issue but instead creates another. This is a bit of an edge case but this setting doesn't take into account tracks with separate embedded artworks in the same album (presumably by design). I have a few tagged albums where the songs within each have their own different embedded artwork, however with this setting enabled it just uses a random artwork from a song in the album for all the songs in the album. If you'd prefer to keep the naming schema the same for cached artworks, your idea of naming my files more appropriately will suffice, thank you for the suggestion!

@ghost
Copy link
Author

ghost commented Feb 11, 2025

Screenshot_20250211-135936.png

"group artworks by album" disabled

Screenshot_20250211-135956.png

"group artworks by album" enabled

I assume this behaviour is intended however. Based on your response, I'll decide if I should just rename my files.

@MSOB7YY
Copy link
Member

MSOB7YY commented Feb 11, 2025

This is a bit of an edge case but this setting doesn't take into account tracks with separate embedded artworks in the same album

thats not edge case i guess, it was requested on discord few days ago, i might or might not look into implementing it (tho it would be pain so idk yet)

I assume this behaviour is intended however. Based on your response, I'll decide if I should just rename my files.

the only solutions we have:

  1. implement per-track artwork (with group artworks by album)
  2. use full paths instead of filenames, this will work but will affect performance too much, and also too pain to change it everywhere without breaking smth
  3. u renaming ur files, i assume this is also too much pain considering how many files u got, but an easy solution for it is using "Auto Tagger" app to auto rename files based on their tags, im sure this would be the easiest and fastest solution for now, lemme know if ur going to use this or need help with it

@ghost
Copy link
Author

ghost commented Feb 11, 2025

thats not edge case i guess, it was requested on discord few days ago, i might or might not look into implementing it (tho it would be pain so idk yet)

Guess I'm not alone then haha.

  1. use full paths instead of filenames, this will work but will affect performance too much, and also too pain to change it everywhere without breaking smth

Could you use file hashes instead i.e you name the cache files with part or all of the hash of a file? How big of a performance hit would there be to calculate file hashes based on files? Maybe you could create the hashes using just the metadata of a track instead?

The above is just an idea, not sure of its potential problems or performance implications.

  1. u renaming ur files, i assume this is also too much pain considering how many files u got, but an easy solution for it is using "Auto Tagger" app to auto rename files based on their tags, im sure this would be the easiest and fastest solution for now, lemme know if ur going to use this or need help with it

This is pittifully easy for me, don't worry! I use a tool called Tagger which makes bulk metadata editing a breeze.

@MSOB7YY
Copy link
Member

MSOB7YY commented Feb 11, 2025

Could you use file hashes instead

thats what i was refering to, but a hash for file path not the file itself

Maybe you could create the hashes using just the metadata of a track instead?

thats the same but file path would be better

The above is just an idea, not sure of its potential problems or performance implications.

yah its actually used by most players, i just didnt want the overhead of hashing all the time.. or maybe we can hash once and save it with the track details, that could be better but one more reason i used clear names for the file is to easily access them without being tied/hidden to the track file only, for example i can go to artworks folder and know which artwork is for which track etc

I use a tool called Tagger which makes bulk metadata editing a breeze.

thats cool, it looks awesome i will use it for windows. the one i sent u is for android too so we have both options ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant