Skip to main content

Topic: Multiple front album covers in Default UI (Read 581 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • nelive
  • [*]
Multiple front album covers in Default UI
Hi,

I've been using foobar2000 for a decade and I love its highly modular design, which allows me to get control of pretty much everything I like, especially the layout. I wonder if there is any component that can display more album art than as specified in Preferences: Display. Currently, only Front, Back and Disc covers, and Artist can be displayed.

I attach my current layout where I have a big front cover at the top-left corner and a smaller one near the middle bottom. Is it possible to display two different front covers in these panels? Reason I ask for this is because it is quite often that an album is released (having a front cover) and re-reissued as a different version or in a later year (possibly having a different front cover). I'd like to display the front cover for both the original release and the current version that I have.

I know in the Album Art Panel, there's fifth item called "Icon" but that only displays the image embedded in the media files. I can pretend to use this icon as an alternative front cover but I really don't like to modify the media files, i.e. I prefer to indicate a path to where the image file is located, then I can do tweaking like using title formatting. (FYI, for tagging I use m-TAGS, so I don't touch my media files at all)

Hope I have made myself clear above.
Many thanks.

  • nelive
  • [*]
Re: Multiple front album covers in Default UI
Reply #1
After reading the "Support forum rules", I think this post is more appropriate for "General - (fb2k)" but I can't figure how to move it. Can someone please help? Sorry, my first posts here.

  • WilB
  • [*][*][*][*][*]
Re: Multiple front album covers in Default UI
Reply #2
JScript biography now allows setting custom paths for the front cover, and that could be used for the second front cover panel. Custom front cover paths are checked before falling back to trying the album art reader front cover patterns, and so if it found a different cover it would load it. To just use it as an album art viewer you may want to switch off auto-fetch for biographies, album reviews and artist images, else it will download them automatically. For settings, right click > menu > sources > server settings. This should open biography.ini. Custom paths support title formatting and can be enabled and set therein: ADVANCED heading. Requires JScript panel and that you add that to your layout before importing and using the script.

Download here
Discussion thread here

Once installed all you need to do is:
1) Enable "Check Custom Paths"
2) Enter the required custom path (full path minus extension). An example path is shown below.
3) Disable [AUTO-FETCH] of items as required
4) You may need to left click, any where in the panel, to toggle it from artist mode to album mode

Code: [Select]
[ADVANCED]
Image [Cover] Check Custom Paths=1
Image [Cover] Custom Path 1=$directory_path(%path%)\alternate_cover
  • Last Edit: 19 May, 2017, 08:49:45 AM by WilB

  • nelive
  • [*]
Re: Multiple front album covers in Default UI
Reply #3
Many thanks for the script. It looks promising. However, I couldn't manage to get the front cover shown, neither alternative front cover nor the default one. The settings in biography.ini are
Code: [Select]
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=0
Biography [Lastfm] Auto-Fetch=0
Album Review [Allmusic] Auto-Fetch=0
Album Review [Lastfm] Auto-Fetch=0
Image [Artist] Auto-Fetch=0
Image [Cover] Auto-Fetch=0
[NAMES]
%BIO_ALBUMARTIST%=$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ARTIST%=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ALBUM%=$meta(album,0)
[PATHS]
Album Review [Allmusic] Folder Location=%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1))
Album Review [Lastfm] Folder Location=%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1))
Biography [Allmusic] Folder Location=%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1))
Biography [Lastfm] Folder Location=%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1))
Image [Artist] Folder Location=%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%
Image [Cover] Folder Location=$directory_path(%path%)
Image [Cover] File Name=cover_front
[MISCELLANEOUS]
Album Name Auto-Clean=0
Album Review [Allmusic] Include Partial Matches=0
Album Review & Cover [Lastfm] Use Lastfm Autocorrect=0
Cache Expiry (days: minimum 28)=28
Image [Artist] Auto-Add New=0
Image [Artist] Fetch Number (maximum 20)=0
Image [Artist] Cycle Time (seconds)=0
Lastfm Server=www.last.fm
Lastfm Server Fallback To www.last.fm=0
Mouse Left Button Click: Map To Double-Click=0
Show More Tags=0
Various Artists=Various Artists
[ADVANCED]
Image [Cover] Check Custom Paths=1
Image [Cover] Custom Path 1=$directory_path(%path%)\cover_front_version
Image [Cover] Custom Path 2=Z:\Volumes\Metal\cover_front_version
Image [Cover] Custom Path 3=
Image [Cover] Custom Path 4=
Image [Cover] Custom Path 5=

I disabled everything apart from [ADVANCED]. I tried 2 custom paths, one points to the same location as media files (where I store cover_front_version.jpg) and the other to a testing absolute path. My default front cover is named cover_front.jpg

I attach the screenshot of menu when I right-click on the panel. Do I need to tweak any other thing there?

Technical information:
foobar2000 v1.3.15
JScript Panel 1.2.2
JScript Biography 0.8.1
I'm actually runing foobar2000 in Mac OS X via Wineskin, if that helps.

  • WilB
  • [*][*][*][*][*]
Re: Multiple front album covers in Default UI
Reply #4
I copied your settings and created some corresponding cover files & it all worked. I assume you saved biography.ini, restarted foobar2000, and cover exists (which it seems to as it's in other panel) etc.

JScript panel requires windows vista or later, & I suspect that the problem may be with the use of Mac OS X with wine. JScript panel has been reported to run under WINE with Ubuntu. A quick search found these posts here and here. I've no experience with wine so I can't advise any further. Perhaps the linked posts will help you set it up on wine.

HTH
  • Last Edit: 19 May, 2017, 07:11:46 PM by WilB

  • nelive
  • [*]
Re: Multiple front album covers in Default UI
Reply #5
Many thanks for your suggestions. After much fiddling with a number of wine installations, I could get an image to be shown in the panel, on some occasions. I haven't been able to pin down what makes it work. A more annoying problem is that when it works, the cover won't be updated on song change. The panel is kind of sluggish, I have to minimise the window and re-open it to see the cover updated. I guess I just live with that for the time being.

Anyway, is it possible to just have a simple panel showing a static image from local source? I tried to modify your script deleting the parts I think unnecessary, without luck. Well, you know, I know next to nothing about Javascript.

  • WilB
  • [*][*][*][*][*]
Re: Multiple front album covers in Default UI
Reply #6
I did find a couple of minor draw issues that are fixed for the next release, but they weren't relevant to the image only mode that you're using. In all my tests on windows the covers correctly updated on song change, provided a cover_front_version existed in the music folder. If it didn't exist then it would load the specified stub path that you included and so may not then be expected to change. Not sure if its the reason, but ensure Sources > Nowplaying is ticked if you always want the image to follow the now playing track as opposed to the selected track. Obviously if any issue can be confirmed to be due to the script code rather than a problem caused by running under wine I will correct it.

Regarding load speed I have not found the panel to be sluggish on windows. The function is called directly from on_playback_new track. There are a couple of items called before it, but they do nothing in the mode you're using & commenting them out made no speed difference. Checking custom paths is the first thing that it then does. It checks if the cover exists (very fast < 1 millisecond on my windows pc), and if it does it loads it asynchronously and draws the image (this mostly will depend on how long it takes to load the image from the hard drive, but its still fast ~12-50 milliseconds on my windows pc).

I also compared load times on two windows set-ups with DUI album art viewer, with the panels next to each other, including switching the order. Perhaps surprisingly, at least on these two windows set-ups, JScript biography loaded covers slightly faster than DUI album art viewer.

As other users haven't reported these kinds of things, the issues may lay with running JScript panel under wine. Of course it's possible with JScript panel to just have a simple panel showing a static image from local source, but its not obvious to me why that would be any faster.
  • Last Edit: 20 May, 2017, 07:34:07 AM by WilB