Help - Search - Members - Calendar
Full Version: foo_uie_single_column_playlist
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
chaosblade
I have %album artist% tagged to 'Various Artists' in those. Normal albums only have %artist%, but %album artist% resolves to that anyway.
BlindSeer
This component is shaping up nicely. However, I'd love to be able to resize images to larger dimensions, not just smaller.
marc2003
QUOTE(blaxima @ Sep 30 2006, 21:21) *

Is there anyway to display in the header "various artist" when having multiple artists all under the same abum, like in a soundtrack for example? For me it shows as the name of the album but dispays the first artist name only.


as chaosblade mentioned, you need to tag your va albums with the %album artist% tag. then you can display headers like this.....

group display
CODE

$if2(%album artist%,%artist%)


because you have multiple artists you might want to show each one in the item display?

item display
CODE
$if(%album artist%,%artist%' - ',)


it should look something like this

IPB Image





Yotsuya
QUOTE(marc2003 @ Sep 30 2006, 17:43) *
group display
CODE

$if2(%album artist%,%artist%)


item display
CODE
$if(%album artist%,%artist%' - ',)


Foobar automatically maps %artist% onto any missing %album artist%. So you can simplify the first code to:
CODE
%album artist%


Going further with that concept, if you want to specifically test for wether or not a file has an album artist tag you should use $meta(album artist). So for the second code you might want something more like this:

CODE
$if($meta(album artist),[%artist% - ],)%title%
marc2003
yup your post makes more sense than mine..... smile.gif

but if

QUOTE(Yotsuya @ Sep 30 2006, 22:51) *

Foobar automatically maps %artist% onto any missing %album artist%.


by rights my code should also display the artist when the %album artist% tag does not exist as i'm not meta testing? huh.gif

edit: yet again i'm posting before engaging my brain... rolleyes.gif i did actually use $meta in my original code

thanks yotsuya for clearing things up for me. smile.gif
Yotsuya
if %artist% exists, %album artist% will exist. So $if(%album artist%,%artist%' - ',) is somewhat redundant and can be simplified to [%artist% - ]. The only exception being if a song has an album artist tag but no artist tag. In which case your code would display a '? - ' while the simplified version would not.
blaxima
@ChaosBladE, marc2003, Yotsuya

Thanx, its all good now
maziu
QUOTE(marc2003 @ Sep 30 2006, 17:43) *

item display
CODE
$if(%album artist%,%artist%' - ',)



%album artist% returns %artist% even if the Album Artist tag is not set. This should get around that:
CODE
$if($meta(Album Artist),%artist% - )


Crapy, Yotsuya beat me to it.
cristina
hi. I borrowed Ceciperez's code (thanks a lot for sharing, btw), and added a line another member said, to make it show album art properly. like this:

CODE
$imageabs(9,$if($strcmp(%tracknumber%,01),0,$add(24,$mul(-24,%tracknumber%))),simple\albumborder.png,)
$imageabs(10,$if($strcmp(%tracknumber%,01),1,$add(25,$mul(-24,%tracknumber%))),$replace($replace(cover\%artist% - %album%.png,',',),?,),)
$imageabs2(82,82,0,$sub($mul(%_height%,%tracknumber%),%_height%),,%_height%,10,,$replace(%path%,%filename_ext%,[%album artist% - %album%]_front.jpg),)


I have every album cover inside the album folder, named like this: artist - album_front.jpg ( pulp - different class_front.jpg, for example). But some images are not named exactly the same way as the album, comas missing, or whatever, so they don' show. How can I make it show any image named *_front.jpg that is inside the album folder? I tried writing that in the code, but it don't work.

I'm sure this is easy and I feel dumb asking. help this newbe please tongue.gif thanks
CepiPerez
QUOTE(cristina @ Sep 30 2006, 23:18) *

hi. I borrowed Ceciperez's code (thanks a lot for sharing, btw), and added a line another member said, to make it show album art properly. like this:

CODE
$imageabs(9,$if($strcmp(%tracknumber%,01),0,$add(24,$mul(-24,%tracknumber%))),simple\albumborder.png,)
$imageabs(10,$if($strcmp(%tracknumber%,01),1,$add(25,$mul(-24,%tracknumber%))),$replace($replace(cover\%artist% - %album%.png,',',),?,),)
$imageabs2(82,82,0,$sub($mul(%_height%,%tracknumber%),%_height%),,%_height%,10,,$replace(%path%,%filename_ext%,[%album artist% - %album%]_front.jpg),)


I have every album cover inside the album folder, named like this: artist - album_front.jpg ( pulp - different class_front.jpg, for example). But some images are not named exactly the same way as the album, comas missing, or whatever, so they don' show. How can I make it show any image named *_front.jpg that is inside the album folder? I tried writing that in the code, but it don't work.

I'm sure this is easy and I feel dumb asking. help this newbe please tongue.gif thanks



Try this code:
$imageabs2(80,80,0,$add($mul(%_height%,$sub(%tracknumber%,2)),$muldiv(%_height%,5,6)),,,10,,$replace($replace($replace(%path%,%filename_ext%,%artist% - %album%_front.png),',',),?,),)

Sorry, this is the code (tested and jpg format)
$imageabs2(80,80,0,$add($mul(%_height%,$sub(%tracknumber%,2)),$muldiv(%_height%,5,6)),,,11,-3,$replace($replace($replace(%path%,%filename_ext%,%artist% - %album%_front.jpg),',',),?,),)
cristina
hey thanks a lot for the reply.. you tested it and it's working? Cause here it doesn't sad.gif None of the covers are displaying now...but thanks for taking the time to try it

Pd. no seras de cataluņa no? ese avatar y ese nombre... tongue.gif
CepiPerez
QUOTE(cristina @ Oct 1 2006, 01:33) *

hey thanks a lot for the reply.. you tested it and it's working? Cause here it doesn't sad.gif None of the covers are displaying now...but thanks for taking the time to try it

Pd. no seras de cataluņa no? ese avatar y ese nombre... tongue.gif


I test it and it works, but your covers must be ARTIST - ALBUM_front.jpg
Check the spelling of the artist or the album name.
The code ignores the comas and the "?" symbols in the names.

PS: Soy de Argentina, si queres preguntame en Mensaje Privado, pero no creas que soy experto.
Sam Stoat
Is there a way to check if a file exists?

I want to use $imageabs2 to display a 'No Cover' image if there's no album cover in the album's folder. I've tried overlaying the album art on top of the 'No Cover' image, which works great for normal sized covers, but not for tall or wide images.
jimbo11883
QUOTE(Sam Stoat @ Oct 1 2006, 05:50) *

Is there a way to check if a file exists?

I want to use $imageabs2 to display a 'No Cover' image if there's no album cover in the album's folder. I've tried overlaying the album art on top of the 'No Cover' image, which works great for normal sized covers, but not for tall or wide images.


I second this feature request... smile.gif
mazy
QUOTE(Sam Stoat @ Oct 1 2006, 12:50) *
Is there a way to check if a file exists?

maybe album art panel could provide service to feed album art file names ... as i don't want to see duplicit features here and there ...

however text file feed to track info, for example, would be nice.
chaosblade
How are they duplicate features if they are entirely different components from different authors?
jimbo11883
QUOTE(ChaosBladE @ Oct 1 2006, 13:35) *

How are they duplicate features if they are entirely different components from different authors?


Good point... tongue.gif
mazy
QUOTE(ChaosBladE @ Oct 1 2006, 20:35) *
How are they duplicate features if they are entirely different components from different authors?

i just can't pass on adding almost complete subset of album art panel features to another plugin. it's a lot of work, issues to come etc. plugins with interesting features which could be handy to use in other plugins, should provide services / api instead.
Sam Stoat
QUOTE(mazy @ Oct 1 2006, 21:42) *
i just can't pass on adding almost complete subset of album art panel features to another plugin. it's a lot of work, issues to come etc. plugins with interesting features which could be handy to use in other plugins, should provide services / api instead.
Why is it a subset of Album Art panel? My question was about detecting the existence of any files, not only album art pics.

As well as detecting album art, it could be used to detect if a fps or m3u playlist exists for the current album, or, if your tracks' filenames contain the tracknumber, to see if all tracks in an album are present. For those who share their setups, it could even be used to check for a needed plugin and display a message if it's missing.

I can understand why it might not belong as part of Single Column Playlist. It would be a handy command in ColumnsUI, Album Info Panel, or even Album Art panel. As a collection of new commands, maybe foo_cwb_hooks would be a better place for it.
alphaex32
Could we please have support for buttons like in the trackinfo mod? It'd be awesome to set ratings in the playlist like in wmp or itunes.
fraganator
QUOTE(marc2003 @ Oct 1 2006, 05:43) *

IPB Image

Would you mind showing me how you put the album art in the group section please? I've had a look through the thread but couldn't find anything about it. Thanks!
CepiPerez
QUOTE(fraganator @ Oct 2 2006, 00:24) *

QUOTE(marc2003 @ Oct 1 2006, 05:43) *

IPB Image

Would you mind showing me how you put the album art in the group section please? I've had a look through the thread but couldn't find anything about it. Thanks!



Use this code in Group Dysplay:

$imageabs(0,0,covers\%artist% - %album%.png,)

Replace the source of the covers if it doesn't work.
And change "Group rows" to 6 (or the height that you want).
fraganator
Thanks, that did the trick! I don't known why I didn't see the group rows option before. Now my cover art won't be getting chopped in half on my shorter albums.

Edit:

Hmm, now I'm getting an issue where the bottom part/right side of some covers aren't being drawn. Here's the code I'm using in the group display:

CODE

$imageabs2(110,110,,,,,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

IPB Image

Any idea why this is happening? It doesn't seem to happen on covers with a more square aspect ratio, just with wider/narrower ratios. Thanks again for any help.
4nt1
how do I have my tracks with alternating bg colours?
fraganator
Give this a try. Put it in the item display box:
CODE

$if($stricmp($mod(%_playlist_number%,2),1),$drawrect(0,0,0,0,brushcolor-245-245-245 pencolor-null),$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null))
sitemap
I would like to have a frame bottom, just like in columns UI; e.g. I am searching for the equivalent to this:
$set_style(frame-bottom,1,$rgb(230,228,229))

Thanks
maziu
QUOTE(sitemap @ Oct 2 2006, 07:47) *

I would like to have a frame bottom, just like in columns UI; e.g. I am searching for the equivalent to this:
$set_style(frame-bottom,1,$rgb(230,228,229))

Thanks


This is much more "raw" then ColumnsUI. Short of having these sort of specialized things like frames, you just draw rectangles where you want things. Want a frame at the bottom? Just draw a 1 pixel high rectangle across the bottom.

$drawrect(,$sub(%_height%,1),,,brushcolor-230-228-229 pencolor-null)
sitemap
Great. Thanks for answering
avish
Hi, i want to switch from Columns-UI to the single column playlist but im having a problem with using it within playlist tabs crying.gif

This is how my setup looks with columns-UI:

IPB Image

And when i try to put the single column playlist instead of Columns-UI i get this:

IPB Image

And i can't resize it down dry.gif

layout:
IPB Image

So, what am i doing wrong? huh.gif
Purple Monkey
Why does $font() always return true? Shouldn't it always return false like $rgb() does, otherwise
CODE
[$font(,10,,)%artist%]
&
CODE
$if3($font(,10,,)$meta(album artist),%artist%)

break!
chaosblade
Display and logic should always be separated. Display functions shouldn't really be used in logical $if tests.
Purple Monkey
But that just defeats the point of having [] and $if3 in the first place.
Yotsuya
As ChaosBladE indicated it is generally good form to keep display code and logic code spearated. There are several ways to restructure your code to accomplish what you are attempting.

CODE
$font(,10,,)[%artist%]$font()

-or-
CODE
$if(%artist%,$font(,10,,)%artist%,)


&

CODE
$if($meta(album artist),$font(,10,,),)%album artist%


Yes sometimes I think it would be nice if all passive strings such as $font, $rgb, etc would return as false because it lets you do some quick tricks with code, a strong argument can be made that $if($font()) should logically test if the $font() function returns anything at all .. which it does, the font. In fact I would like to be able to use $if($font(fontname,,,),) to test if a font is installed.

Code doesn't always perform the way we expect it to, every language has it's little quirks. There is usually more than one way to code something, you should keep alternative approaches in mind whenever coding anything.
Purple Monkey
I would of thought that it would be slightly more consistent compared to the default functions. Considering that $font is a display function it shouldn't really affect an $if statements anyway. To test for an installed font wouldn't a $isinstalled(fontname) be more appropriate?
CepiPerez
QUOTE(fraganator @ Oct 2 2006, 01:43) *

Thanks, that did the trick! I don't known why I didn't see the group rows option before. Now my cover art won't be getting chopped in half on my shorter albums.

Edit:

Hmm, now I'm getting an issue where the bottom part/right side of some covers aren't being drawn. Here's the code I'm using in the group display:

CODE

$imageabs2(110,110,,,,,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

IPB Image

Any idea why this is happening? It doesn't seem to happen on covers with a more square aspect ratio, just with wider/narrower ratios. Thanks again for any help.



Change the size of the cover (110,110) to 100,100. Or set the Group rows to 1 more.

FofR
For image source, is there any chance of using * as a wildcard? A lot of my album images are just in the directory of the album, with no specific filename.

An "if image exists" tag would also be helpful, I don't want to draw image borders if there is no image.

Also a "refresh" on command would be nice, for instance when a tag is updated.
4nt1
ok thanks guys for helping me get my alternating line colours working...

now how come whenever I put my mouse over a track and click it it doesnt highlight like in columns.. - now I know its something to do with my code but what are the basic setups for when a song is playing - when it is highlighted etc...

thanks again for all your useful help

also when i set the number of rows to 2 for the group... how do i put stuff on the second row..?
Yotsuya
4nt1:

To color the currently selected item you can use %_selected% like this:
$if(%_selected%,$imageabs($if($get(album_mode),115,0),-10,images\glass.png,))

To color the currently playing item you can use %isplaying% like this:
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-null),)

You can either use an $imageabs() function to overlay a transparency effect like I did in the first example or use $drawrect() to color the row like I did in the second example. Just place the code toward the top of your Item Display code.
4nt1
wow thanks for the quick feedback works like a charm

I ended up just drawing a rect around the now playing..
vonmeth
QUOTE(avish @ Oct 2 2006, 08:54) *

Hi, i want to switch from Columns-UI to the single column playlist but im having a problem with using it within playlist tabs crying.gif

This is how my setup looks with columns-UI:

IPB Image

And when i try to put the single column playlist instead of Columns-UI i get this:

IPB Image

And i can't resize it down dry.gif

layout:
IPB Image

So, what am i doing wrong? huh.gif


Weird problem.

Only way I found a way so you can resize it is doing the following:
CODE

Horizontal splitter
   |__Vertical splitter
          |__playlist tabs
          |__single column playlist view

Please note that single column playlist view is put under the vertical splitter, not the Playlist tabs. To resize it, you must use the vertical splitter, which is above the playlist tabs. It visually should look the same, as it did on my display.

Hope that helps.
avish
@vonmeth: Thank you! it works! now i can finally mess around with this awesome component biggrin.gif
FofR
A "refresh" in the context menu would be nice smile.gif
fraganator
QUOTE(CepiPerez @ Oct 3 2006, 05:06) *

QUOTE(fraganator @ Oct 2 2006, 01:43) *

Hmm, now I'm getting an issue where the bottom part/right side of some covers aren't being drawn. Here's the code I'm using in the group display:

CODE

$imageabs2(110,110,,,,,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

IPB Image

Any idea why this is happening? It doesn't seem to happen on covers with a more square aspect ratio, just with wider/narrower ratios. Thanks again for any help.


Change the size of the cover (110,110) to 100,100. Or set the Group rows to 1 more.


Thanks for the reply, but i'm afraid that didn't fix my issue. Here's another example of what I'm trying to fix (same code as before with a DVD cover image):
IPB Image

I'm thinking this may be a bug in $imageabs2, or I'm not using it correctly. Anyone have any more ideas?
FofR
A function I would like imageabs2 to do is stretch images to a desired height, width or aspect ratio.
kockroach
QUOTE(FofR @ Oct 3 2006, 10:16) *

A function I would like imageabs2 to do is stretch images to a desired height, width or aspect ratio.

Basically do what the Album Art panel does....I agree. That would be very nice to have.
vonmeth
QUOTE(fraganator @ Oct 3 2006, 05:17) *


Thanks for the reply, but i'm afraid that didn't fix my issue. Here's another example of what I'm trying to fix (same code as before with a DVD cover image):
IPB Image

I'm thinking this may be a bug in $imageabs2, or I'm not using it correctly. Anyone have any more ideas?


Could you give us your whole Group Display coding? Something else might be interrupting it.
blaxima
QUOTE(fraganator @ Oct 2 2006, 00:43) *

Thanks, that did the trick! I don't known why I didn't see the group rows option before. Now my cover art won't be getting chopped in half on my shorter albums.

Edit:

Hmm, now I'm getting an issue where the bottom part/right side of some covers aren't being drawn. Here's the code I'm using in the group display:

CODE

$imageabs2(110,110,,,,,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

IPB Image

Any idea why this is happening? It doesn't seem to happen on covers with a more square aspect ratio, just with wider/narrower ratios. Thanks again for any help.


I have this problem aswell and adjusting the row height only makes the headers larger but does not shot the bottom of the image. My problem however is with the overlay image like the cd case and not the album art.


I agree completly with others that being able to adjust the aspect ratio as I see fit would be great
Ken-chan
TERRESTIAL

Could you mod Browser as well, to allow us to input code in browser panels as well? I'd like to have the album art next to the albums I have in Browser mode, same goes for artists (although finding pictures for 500+ artists is a little bit extreme), it would truely rock the globe, imo.

Album list might be even more popular, so you might want to start with that. The display code you made/used is just too fantastic to ignore.

You're the new musicmusic!
blaxima
I'm used to highlighting x amount of tracks within a playlist (but not all) and being able to modify the tags.

So am I doing something wrong or is it not possible to (like in columns ui) modify the tracks for 1 album inside of a playlist containing many?
...Just Elliott
Is there any reason why imageabs2 seemingly randomly sizes my covers? Plus, using these heights / widths don't work

CODE
$imageabs2(75,75,,,,,3,3,$replace(%path%,%filename_ext%,cover.jpg),)


Changing 75 to 80 works. Any ideas?
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.