Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to display embedded artwork or artwork file (Read 5269 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to display embedded artwork or artwork file

Hi everybody, here's what I'd like to achieve (with the standard artwork component) :
- If the selected track has embedded artwork, display it
- If the selected track doesn't have embedded artwork, display the album artwork located in a specific folder

So far and despite a lot of efforts, I haven't been able to achieve this. Any hints ? Thanks.

(for the record I have foobar 1.3.9, I plan on updating to 1.4.0 when it's stable)

Re: How to display embedded artwork or artwork file

Reply #1
Hi everybody, here's what I'd like to achieve (with the standard artwork component) :
- If the selected track has embedded artwork, display it
- If the selected track doesn't have embedded artwork, display the album artwork located in a specific folder

So far and despite a lot of efforts, I haven't been able to achieve this. Any hints ? Thanks.

(for the record I have foobar 1.3.9, I plan on updating to 1.4.0 when it's stable)

Isn't that the way it works out of the box? It does for me, as long as the folder's image is properly named according to Preferences | Display | Album Art.

Re: How to display embedded artwork or artwork file

Reply #2
Well, for me it doesn't :
- Either my prefs > display > album art are set accordingly, and then the album covers are displayed for every track of any given album, even if individual tracks have different embedded covers,
- Or I leave prefs > display > album empty, and then all the embedded track covers are displayed, but of course I lose all the album covers.

For titleformat lovers, here's the code that I put into prefs > display > album. There are 13 different ways/paths to look for my album artwork, because my album artwork can be named in many ways :
- A regular album artwork can be named : Album artist - (Year) Album title.jpg
- A compilation album can be named : Album title (Year).jpg
- A remastered album can be named : Album artist - (Original Year-Remaster Year) Album title [RM].jpg (to differentiate it from the original edition that I may own too)
- Plus there are singles, OSTs, classical music, CD boxes... you get the idea.

Code: [Select]
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))\%directoryname%.jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2)) - %directoryname%.jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))'\('[$left(%original release date%,4)-]$left(%date%,4)') '$replace(%album%,'?','_',':','-','/','-')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'].jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))' - ('[$left(%original release date%,4)-]$left(%date%,4)') '$replace(%album%,'?','_',':','-','/','-')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'].jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))'\('%original production date%') '$replace(%album%,'?','_',':','-','/','-')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'].jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))' - ('%original production date%') '$replace(%album%,'?','_',':','-','/','-')[' ['%edition%']'][' ('$if($strcmp($strchr(1234567890,$left(%discnumber%,1)),0),,'CD ')%discnumber%')'].jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))'\('[$left(%original release date%,4)-]$left(%date%,4)') ['Single'] '$replace(%single%,'?','_',':','-','/','-').jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))' - ('[$left(%original release date%,4)-]$left(%date%,4)') ['Single'] '$replace(%single%,'?','_',':','-','/','-').jpg
$replace($directory_path($directory_path($directory_path(%path%))),Z:\SYNC\AUDIO,X:\ARTWORK,AUDIO,ARTWORK) - $directory(%path%,2)\$directory(%path%,1).jpg

$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))'\('%original production date%') ['Single'] '$replace(%single%,'?','_',':','-','/','-').jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))' - ('%original production date%') ['Single'] '$replace(%single%,'?','_',':','-','/','-').jpg
$replace($directory_path($directory_path($directory_path(%path%))),Z:\SYNC\AUDIO,X:\ARTWORK,AUDIO,ARTWORK) - $directory(%path%,2) - $directory(%path%,1).jpg

$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2))\$replace(%directoryname%,$substr(%directoryname%,$sub($strchr(%directoryname%,'['),1),$strchr(%directoryname%,']')),).jpg
$puts(a,$replace(%path%,D:\AUDIO,D:\AUDIO\ARTWORK))$left($get(a),$sub($strstr($get(a),%directoryname%),2)) - $replace(%directoryname%,$substr(%directoryname%,$sub($strchr(%directoryname%,'['),1),$strchr(%directoryname%,']')),).jpg
So yes, it's pretty complicated. But it has been working beautifully for all my albums these last few years... except for the fact that I can't see the embedded track covers.

Re: How to display embedded artwork or artwork file

Reply #3
Well, for me it doesn't :
- Either my prefs > display > album art are set accordingly, and then the album covers are displayed for every track of any given album, even if individual tracks have different embedded covers,
- Or I leave prefs > display > album empty, and then all the embedded track covers are displayed, but of course I lose all the album covers.

Yes, you're right. I spoke from memory, always a dangerous thing to do. I checked just now and the behavior is as you describe: the folder image overrides the individual embedded track images. I don't know how to change that behavior, but I'd like to know if it's possible, too.

Re: How to display embedded artwork or artwork file

Reply #4
Take a look at Preferences -> Advanced -> Display -> Album art.

Re: How to display embedded artwork or artwork file

Reply #5
Wow. @Case , you solved my issue in 30 seconds. "Prefer embedded" was the key.
I would never have thought it would be buried in the Advanced prefs.
You rule, man !
BTW do you have any idea on how to solve this cover-related issue with EsPlaylist ? https://hydrogenaud.io/index.php/topic,79030.msg950982.html#msg950982

Re: How to display embedded artwork or artwork file

Reply #6
I don't know anything about EsPlaylist, sorry. I gave it a try and it appeared to only show album art in grouped view. With for example the album grouping the art was always shown with respect to the core's album art configuration. Though any changes to cover paths only had effect after restarting the player.

Re: How to display embedded artwork or artwork file

Reply #7
If I have an album where different tracks have unique artwork foobar2000 will show the embedded artwork from the first song for all of the songs.
The behavior I would expect is to show each tracks own embedded artwork as those tracks are played.
If the tracks are not from the same album it does that but if they are from the same album it keeps the first songs artwork as it plays through the album.
@Case , would you happen to know a fix or work around for that?

Re: How to display embedded artwork or artwork file

Reply #8
If I have an album where different tracks have unique artwork foobar2000 will show the embedded artwork from the first song for all of the songs.
The behavior I would expect is to show each tracks own embedded artwork as those tracks are played.
If the tracks are not from the same album it does that but if they are from the same album it keeps the first songs artwork as it plays through the album.
@Case , would you happen to know a fix or work around for that?
I guess you are referring to ELP where the embedded art of the first track of the sorted group will be used if you either use $albumart or $drawimage/$imageabs with the option artreader.

$albumart will always try embedded art first and revert to search for external (following Preferences/Display/Front cover) if no embedded art is found.

The "trick" I use is to retrieve external art first if %el_is_group% (group header or popup on group header) by using $imageabs/$drawimage without the option artreader,
On popup track or when playing I prefer to display embedded art (using $albumart or $imageabs with option artreader),

See attached video.


Re: How to display embedded artwork or artwork file

Reply #10


I have played arround with viewing album art and embeded art, sometimes the trick is renaming the album art image to whatever is standard for foobar without any extra components added, i dont remember the exact naming or file format used, but its a good question.
River

Re: How to display embedded artwork or artwork file

Reply #11

perhaps use : 'albumart.jpg'  or album art.jpg'  or 'albumartsmall.jpg'  those might work.  i can't exactly remember.
River

Re: How to display embedded artwork or artwork file

Reply #12
though to embed art into a specific file or track, i think you would need an extra component to do it like discogs tagger.
River

Re: How to display embedded artwork or artwork file

Reply #13
I have foobar2000 set to prefer embedded art, and if that's not there it will look for cover.jpg, folder.jpg, etc (the usual), none of that is the problem.
The problem is showing individual tracks embedded art when they are part of an album.
Imagine an artist releasing a digital album and embedding unique art for each individual track.
Then when playing it in foobar2000 the image would change when it goes from track 1 to track 2, etc.
BUT it doesn't, it just continues to show the embedded art in track 1.
Now, if I have two tracks with different embedded art and they don't get grouped together in the playlist because they are from different artists and different albums, then foobar2000 will change the art when the song changes.
BUT, if they are grouped together in an album foobar2000 just shows the embedded art from the first track the whole time.


 

Re: How to display embedded artwork or artwork file

Reply #15
Thank you, I'll have a look at that!