Help - Search - Members - Calendar
Full Version: SCPL with album covers
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
cmdrpaddy
Hello,
I have been fixing the album art for my music over the last few days and I have run into a problem. I am using SCPL and whenever there is an entry (typically a single) with exactly 3 tracks the art isn't displayed. If there is less that three tracks the art is cropped (any idea how to fix this without changing the "group rows" option?) and if there is more than 3 tracks it displays the art properly.
This is the code I'm using to display the art:
CODE
$imageabs2(80,65,,,80,180,10,$if($strcmp(%tracknumber%,01),1,$add(24,$mul(-24,%tracknumber%))),$replace(%path%,%filename_ext%,)cover.*, ALPHA-255)

For example this is what appears when I look at my Muse singles:
http://www.maths.tcd.ie/~pbarrett/untitled1.JPG

as you can see the entries for Cave #1 and Cave #2 have no art but Cave (Vinilo) does.
thanks for any help.
wraaaa
Hi
I just did a quick glance on your screenshot and noticed that the albums with the art not showing also have something in common other than the fact that they have 3 tracks. They all include a # in the album name. Check if the # is also in the folder. If it is, the art will not show up in SCPL or trackinfomod. This is a known issue with the way the components are coded, and the only way to workaround is to rename the folders. Check to see if that's the case for other stuff. It might not have anything to do with the album having 3 tracks.
wraithdu
Well, couple of things to start off.

1. If you are stretching your image to 80x65, then there is no effect incropping it to 80x180.
2. Without the 'nokeepaspect' option your images will likely be 65x65. It is better to choose a resolution you want and use 'nokeepaspect' to unconditionally stretch the image.
3. You should specify correct cropping instead of redrawing the entire image for each row and changing the Y coordinate offset.
4. Decide what the minimum number of tracks you want to display album art for.
5. Using %tracknumber% is unreliable, especially if you have incomplete albums in your playlist. Using %_itemindex% and %_itemcount% is better.
6. Using alpha-255 is pointless since it's the same as not including that option (255=totally opaque)

Say you want to display art for an album with 3 or more tracks at 70x70. I will assume your rows are 24px high, so that gives us 72px to work with your art. Your code should look something like this to give you a one px pad at the top and bottom of your three rows showing the art-

CODE
$ifgreater(%_itemcount%,2,
$imageabs2(70,70,0,$eval({%_height%*{%_itemindex%-1}}-1),70,%_height%,10,0,$replace(%path%,%filename_ext%,cover.*),nokeepaspect)
,)
cmdrpaddy
QUOTE(wraaaa @ Mar 12 2007, 19:28) *

Hi
I just did a quick glance on your screenshot and noticed that the albums with the art not showing also have something in common other than the fact that they have 3 tracks. They all include a # in the album name. Check if the # is also in the folder. If it is, the art will not show up in SCPL or trackinfomod. This is a known issue with the way the components are coded, and the only way to workaround is to rename the folders. Check to see if that's the case for other stuff. It might not have anything to do with the album having 3 tracks.


I just checked the other albums the art wasn't appearing for and all the file paths had # in them. Thanks for that.
cmdrpaddy
QUOTE(wraithdu @ Mar 12 2007, 19:43) *

Well, couple of things to start off.

1. If you are stretching your image to 80x65, then there is no effect incropping it to 80x180.
2. Without the 'nokeepaspect' option your images will likely be 65x65. It is better to choose a resolution you want and use 'nokeepaspect' to unconditionally stretch the image.
3. You should specify correct cropping instead of redrawing the entire image for each row and changing the Y coordinate offset.
4. Decide what the minimum number of tracks you want to display album art for.
5. Using %tracknumber% is unreliable, especially if you have incomplete albums in your playlist. Using %_itemindex% and %_itemcount% is better.
6. Using alpha-255 is pointless since it's the same as not including that option (255=totally opaque)

Say you want to display art for an album with 3 or more tracks at 70x70. I will assume your rows are 24px high, so that gives us 72px to work with your art. Your code should look something like this to give you a one px pad at the top and bottom of your three rows showing the art-

CODE
$ifgreater(%_itemcount%,2,
$imageabs2(70,70,0,$eval({%_height%*{%_itemindex%-1}}-1),70,%_height%,10,0,$replace(%path%,%filename_ext%,cover.*),nokeepaspect)
,)



Thanks for the help. I use tracknumber because it can help me find albums that are not tagged correctly. I also used to use the alpha and just kept it there for future editing.

I still can't figure out how to display the proper art for 2 track singles without shrinking the whole image for every album. Is there a way to add an extra line at the end of two track entries that will allow the whole image to be displayed (desirable) or do I have to increase the number of group rows (undesirable).
wraithdu
QUOTE(cmdrpaddy @ Mar 12 2007, 14:33) *

Thanks for the help. I use tracknumber because it can help me find albums that are not tagged correctly. I also used to use the alpha and just kept it there for future editing.

I still can't figure out how to display the proper art for 2 track singles without shrinking the whole image for every album. Is there a way to add an extra line at the end of two track entries that will allow the whole image to be displayed (desirable) or do I have to increase the number of group rows (undesirable).

You can use %track% in your display of the track name, no problem. Just use %_itemcount% like my example in your image code. You'll still see the actual track number, but the images will work correctly even if tracks are missing.

You can't add blank rows at the end of a group, sorry. So for 2 tracks or less, you have to either shrink the art or not display it at all. Increasing the Group Rows only affects the group header. Since you don't display art in the header, this does nothing for you.
cmdrpaddy
QUOTE(wraithdu @ Mar 13 2007, 02:24) *

QUOTE(cmdrpaddy @ Mar 12 2007, 14:33) *

Thanks for the help. I use tracknumber because it can help me find albums that are not tagged correctly. I also used to use the alpha and just kept it there for future editing.

I still can't figure out how to display the proper art for 2 track singles without shrinking the whole image for every album. Is there a way to add an extra line at the end of two track entries that will allow the whole image to be displayed (desirable) or do I have to increase the number of group rows (undesirable).

You can use %track% in your display of the track name, no problem. Just use %_itemcount% like my example in your image code. You'll still see the actual track number, but the images will work correctly even if tracks are missing.

You can't add blank rows at the end of a group, sorry. So for 2 tracks or less, you have to either shrink the art or not display it at all. Increasing the Group Rows only affects the group header. Since you don't display art in the header, this does nothing for you.


Thanks for the help. The two track thing is annoying.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.