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: foo_uie_single_column_playlist (Read 741252 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

foo_uie_single_column_playlist

Reply #225
I have a suggestion that makes this plugin more usable with hybrid displays (single tracks and albums) - If the total count for a group of items is 1, Display just the header or just the single item itself. Right now it seems funny when it shows the header and a single item for every single track.


Disagree - I have several albums that consist of one track.  The proper answer, in my opinion, is to allow conditionals to work properly in the "group by" box.  Something like this:

$if($stricmp($strstr(%playlist_name%,'(S)'),0),%album%,%list_total%)

Should group by album unless "(S)" is in the playlist name, in which case it should show one header for the whole playlist (since it's grouping by list_total, which is a constant for every file.)

Doesn't work as is though.

foo_uie_single_column_playlist

Reply #226
I wonder how a single track can be called an album though. Even if its a single physical file with many parts considered as tracks, its usually displayed as parts using cue files and the such.

foo_uie_single_column_playlist

Reply #227
I have several albums that include a separate bonus disc that contains a single track. Under the current setup these single track discs are handled just like any other multidisc album and I would like them to continue to be handled that way. I group my tracks by disc, not necessarily by album.

Depending on your application, you should be able to formulate some tagz code in the Group By section to handle several loose files as a single group.. maybe something like $ifgreater(%totaltracks%,1,%album%,).

mquander: Have you applied any logic to your playlist sort string so that your tracks appear together in one large group instead of being distributed accross your lists as several small subgroups?  I tried applying similar code to my online radio station playlist to group by genre and learned that "group by" only determines where the group headers go it does not determine the position of any tracks in your playlist.

foo_uie_single_column_playlist

Reply #228
I have several albums that include a separate bonus disc that contains a single track. Under the current setup these single track discs are handled just like any other multidisc album and I would like them to continue to be handled that way. I group my tracks by disc, not necessarily by album.

Depending on your application, you should be able to formulate some tagz code in the Group By section to handle several loose files as a single group.. maybe something like $ifgreater(%totaltracks%,1,%album%,).


I agree.  I also have some albums (example, example) that were simply released as one track, and not broken up into subsections.  That might be a bit unorthodox, but I don't see anything wrong with it, and I would like them to display properly as well.

Quote
mquander: Have you applied any logic to your playlist sort string so that your tracks appear together in one large group instead of being distributed accross your lists as several small subgroups?  I tried applying similar code to my online radio station playlist to group by genre and learned that "group by" only determines where the group headers go it does not determine the position of any tracks in your playlist.


Well, I don't see how that would solve the issue.  I want to be able to cook up playlists that only have one (or none, but one is fine as I can make one useful one) header, because they consist of tracks that might belong to whichever random albums or genres or et cetera.

I mean, the arrangement thing is another issue, but I don't think there's any solution to that issue besides draggable playlist items, just like the default Columns UI playlist display.  I need to be able to arrange playlist tracks in a literally completely arbitrary order.

foo_uie_single_column_playlist

Reply #229
@ mquander:

$if() with %playlist_name% in the group by section should be fixed for the next version.  I had a similar problem.  For now try something like this:

$if($strstr(%cwb_activelist%,'(S)'), %cwb_activelist%, %album%)

foo_uie_single_column_playlist

Reply #230
@ mquander:

$if() with %playlist_name% in the group by section should be fixed for the next version.  I had a similar problem.  For now try something like this:

$if($strstr(%cwb_activelist%,'(S)'), %cwb_activelist%, %album%)


Great, thanks very much!  That worked perfectly.

Here's another potential solution to the drag-and-drop question:  Enable dragging around playlists, but only allow dragging a track within its group (can't drag up and down between groups, so the group headers never move.)  Since "singles" playlists will presumably have one big group, this should be flexible enough to suit most people.

foo_uie_single_column_playlist

Reply #231
For singletrack, I just tagged them with SINGLETRACK tag. I also use a sorting string that will list those tracks before a full album.

in group by, I use this

$if(%singletrack%,,%album%%disc%)

foo_uie_single_column_playlist

Reply #232
Forgive me for being a noob, but since we're on the topic of sort strings, how would I write a string to sort by artist, then album, then year.

So the artists would be alphabetical order, and the albums for each artist would go in order of most recent to oldest. I tried a few things, but none of them seemed to do anything close.

 

foo_uie_single_column_playlist

Reply #233
If I understand correctly then this %artist%|$sub(9999,%date%)|%album%

foo_uie_single_column_playlist

Reply #234
If I understand correctly then this %artist%|$sub(9999,%date%)|%album%


That doesn't work either. Odd.
I'm supposed to put it on the "Group by" bit aren't I?

foo_uie_single_column_playlist

Reply #235
That sort string should be put in Preferences -> General -> Sort incoming files by and in the Group by field you just need %album%. I suppose you have all the tag correctly.

foo_uie_single_column_playlist

Reply #236
Thankyou tool, your suggestion was simple yet right...

and yotsuya i have already tried all meta-data editing that i can think of to fix it as i explained in my post, perhaps not clearly enough, but thanks for the input nonetheless.

Many thanks.

foo_uie_single_column_playlist

Reply #237
I need some help figuring this out, I know it has to be simple, but I cant seem to figure out the right script code to change the background color of selected items. I must be missing it somewhere but if someone could point me to the code that governs that, it would be greatly appreciated!

foo_uie_single_column_playlist

Reply #238
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-10-36-106 pencolor-null),)

foo_uie_single_column_playlist

Reply #239
- I'd like to see separate row heights for group and item. I like two lines of text for the groups and one line for the items.

- For me the keyboard does nothing inside the playlist. I can't use the arrow keys, or use shortcuts.

- Row height doesn't apply correctly after changing it.

- Grabbing Album Art from the locations provided by the album art plugin.

foo_uie_single_column_playlist

Reply #240
BUG REPORT
im affraid this is not the right place but i hope that someone will see this and aprove with me or proven me wrong.
The bug i encounter is that when i use $imgabs with %path% and $replace it works for me marvelously BUT... when i have comma in path the imgabs isnt somehow parsed correctly (=it does not draw image at all (incorrect path i presume))

example:

i use tool++ layout with replace workaround:
Code: [Select]
$imageabs(4,$add(24,$mul(-21,%tracknumber%)),$replace($replace(%path%,U:\mp3,..\..\..\user\mp3),%filename_ext%,folder.png),)



i have directorys named by "%artist% - %album% [%date%]" scheme and as you can see on image when there is no comma in directory name its fine but when there is it doesnt work. is it bug or am i missing something?

(edit: its not in "&" in album title rammstein album "Reise, reise" does just the same, PJ Harveys "Stories From The City, Stories From The Sea" same)

foo_uie_single_column_playlist

Reply #241
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-10-36-106 pencolor-null),)



Thanks, that works very well, but I cant seem to get the font color to change correctly, is just gives me invalid syntax error everytime I try to input the font color code.

Code: [Select]
$if(%_selected%,
$font(calibri,10,bold,0-0-0)
,
$font(calibri,10,bold,0-0-0)
)



So what am I doing wrong?

foo_uie_single_column_playlist

Reply #242
Cartman:
My guess would be that at some point the the filename is being processed as code and therefore the comma is breaking the processing. I would suggest attempting a workaround by prefixing any commas in your filename with single quotes to have them processed as text. For example:
Code: [Select]
$imageabs(4,$add(24,$mul(-21,%tracknumber%)),$replace($replace($replace(%path%,U:\mp3,..\..\..\user\mp3),%filename_ext%,folder.png),',',''','),)

*this is untested and you may need to debug it

BTW did you pull that code from my post on the appearance thread? :)


shard13:
The only thing odd that I see about the code you posted is that both fonts specified are identical, however this shouldnt give you invalid syntax. In fact, when I paste it into a panel here I do not get any error. Do you have a calibri font installed?

Break it down piece by piece. Does $if(%_selected%,SELECTED,NOT SELECTED) work? does simply $font(calibri,10,bold,0-0-0)TEST work? How about using just $font(calibri,10,,), or how about something different like $font(verdana,10,bold,0-0-0)?

Additional: I myself use this bit of code when coloring my text:
$font(tahoma,7,,$if(%_selected%,233-233-233,0-0-0))

foo_uie_single_column_playlist

Reply #243
shard13:
The only thing odd that I see about the code you posted is that both fonts specified are identical, however this shouldnt give you invalid syntax. In fact, when I paste it into a panel here I do not get any error. Do you have a calibri font installed?

Break it down piece by piece. Does $if(%_selected%,SELECTED,NOT SELECTED) work? does simply $font(calibri,10,bold,0-0-0)TEST work? How about using just $font(calibri,10,,), or how about something different like $font(verdana,10,bold,0-0-0)?

Additional: I myself use this bit of code when coloring my text:
$font(tahoma,7,,$if(%isplaying%,233-233-233,0-0-0))



OK, I fixed the syntax error, I was adding the *)* at the end of it, thus cuasing problems. Right now my problem is that I want to have selected items be a different color then currently playing items, and I cant seem to get the font color to work. I have calibri and everything, but it just wont seem to work.

Here is my Item Info Code

Code: [Select]
$if(%_isplaying%,$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-0-0-0)
,
$padding(4,0)
$ifequal($mod(%_playlist_number%,2),0,
$drawrect(0,0,0,0,brushcolor-250-250-250 pencolor-240-240-240)
,
$drawrect(0,0,0,0,brushcolor-255-255-255 pencolor-240-240-240)
)
)
$padding(4,0)
$if(%_isplaying%,$font(calibri,10,bold,255-255-255),$font(calibri,10,bold,164-171-179))?

$if(%_isplaying%,
$font(calibri,10,bold,255-255-255)
,
$font(calibri,9,bold,180-180-180)
)

$align(left,center)[Disc %discnumber% ][%tracknumber%. ]

$if(%_isplaying%,
$font(calibri,10,bold,255-255-255)
,
$font(calibri,10,bold,129-138-150)
)
$if($meta_test(album artist),%artist%' - ')

$if(%_isplaying%,
$font(calibri,10,bold,255-255-255)
,
$font(calibri,8.5,bold,120-120-120)
)%title%

$if(%_isplaying%,
$font(calibri,8.5,bold,255-255-255)
,
$font(calibri,8.5,bold,200-200-200)
)
$align(right,center)%length%

$if(%_selected%,$imageabs(0,0,images\overlay.png,))

$if(%_selected%,$drawrect(0,0,0,0,brushcolor-200-200-200 pencolor-null),)
)
$if(%_selected%,
$font(calibri,10,bold,0-0-0)
,
$font(calibri,10,bold,0-0-0)
)


I just end up with a grey box that I cant see any words in, and I dont want that. If you could look over my code and tell me what is going on wrong, it would be greatly apreciated!

Thanks.

foo_uie_single_column_playlist

Reply #244
Shard13:
- in order for a $font() statement to work it must come before the text it's supposed to apply to. the last several lines of your code need to be moved toward the top.
- this may have been fixed in recent versions, but older versions of this component would break colors and fonts after an $align() so you need to put $font() after $align() and not before it in order to work.
- the script is processed in the order it is written if you use a $drawrect() function after you tell it to display text, the rectangle will draw over your text. again, code toward the end should be moved toward the top.
- there appears to be a mismatched end parenthesis toward the end I dunno what it's supposed to go to

I took the liberty in restructuring your code, give it a try:
Code: [Select]
// Backgrounds
$ifequal($mod(%list_index%,2),0,
$drawrect(0,0,0,0,brushcolor-250-250-250 pencolor-240-240-240)
,
$drawrect(0,0,0,0,brushcolor-255-255-255 pencolor-240-240-240)
)

$if(%_isplaying%,$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-0-0-0),)
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-200-200-200 pencolor-null),)

// Text
$padding(4,0)
$font(calibri,10,bold,$if(%_isplaying%,255-255-255,164-171-179))↘

$align(left,center)
$font(calibri(10,bold,180-180-180)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
[Disc %discnumber% ][%tracknumber%. ]
$font(calibri(10,bold,129-138-150)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
$if($meta_test(album artist),%artist%' - ')
$font(calibri(10,bold,120-120-120)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%title%

$align(right,center)
$font(calibri(8.5,bold,200-200-200)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%length%

// Overlay
$if(%_selected%,$imageabs(0,0,images\overlay.png,),)

foo_uie_single_column_playlist

Reply #245
Shard13:
- in order for a $font() statement to work it must come before the text it's supposed to apply to. the last several lines of your code need to be moved toward the top.
- this may have been fixed in recent versions, but older versions of this component would break colors and fonts after an $align() so you need to put $font() after $align() and not before it in order to work.
- the script is processed in the order it is written if you use a $drawrect() function after you tell it to display text, the rectangle will draw over your text. again, code toward the end should be moved toward the top.
- there appears to be a mismatched end parenthesis toward the end I dunno what it's supposed to go to

I took the liberty in restructuring your code, give it a try:
Code: [Select]
// Backgrounds
$ifequal($mod(%list_index%,2),0,
$drawrect(0,0,0,0,brushcolor-250-250-250 pencolor-240-240-240)
,
$drawrect(0,0,0,0,brushcolor-255-255-255 pencolor-240-240-240)
)

$if(%_isplaying%,$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-0-0-0),)
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-200-200-200 pencolor-null),)

// Text
$padding(4,0)
$font(calibri,10,bold,$if(%_isplaying%,255-255-255,164-171-179))↘

$align(left,center)
$font(calibri(10,bold,180-180-180)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
[Disc %discnumber% ][%tracknumber%. ]
$font(calibri(10,bold,129-138-150)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
$if($meta_test(album artist),%artist%' - ')
$font(calibri(10,bold,120-120-120)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%title%

$align(right,center)
$font(calibri(8.5,bold,200-200-200)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%length%

// Overlay
$if(%_selected%,$imageabs(0,0,images\overlay.png,),)


That seems to have cuased a bigger problem....

Take a look at this.


It seems to have nullified the font colors all together, I tried finding the cuase, but I am uncertain where to start.

Thanks for you help though.

foo_uie_single_column_playlist

Reply #246
shard13,

All of the lines starting with "$font" are missing a "," where a "(" is instead.  I think this might work.

Code: [Select]
// Backgrounds
$ifequal($mod(%list_index%,2),0,
$drawrect(0,0,0,0,brushcolor-250-250-250 pencolor-240-240-240)
,
$drawrect(0,0,0,0,brushcolor-255-255-255 pencolor-240-240-240)
)

$if(%_isplaying%,$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-0-0-0),)
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-200-200-200 pencolor-null),)

// Text
$padding(4,0)
$font(calibri,10,bold,$if(%_isplaying%,255-255-255,164-171-179))↘

$align(left,center)
$font(calibri,10,bold,180-180-180)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
[Disc %discnumber% ][%tracknumber%. ]
$font(calibri,10,bold,129-138-150)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
$if($meta_test(album artist),%artist%' - ')
$font(calibri,10,bold,120-120-120)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%title%

$align(right,center)
$font(calibri,8.5,bold,200-200-200)$if(%isplaying%,$font(,,,255-255-255),)$if(%_selected%,$font(,,,0-0-0),)
%length%

// Overlay
$if(%_selected%,$imageabs(0,0,images\overlay.png,),)
I hope that works.

foo_uie_single_column_playlist

Reply #247
Thanks a ton Kockroach, that did it perfectly, albeit I need to fix a couple font style problems, but that is well within in my capability.

And thanks to Yotsuya also for helping. I now understand the scripting a *bit* better

foo_uie_single_column_playlist

Reply #248
Here's a good question... Is it possible to do dynamic album ratings?
For example, I have an album, and every track has a rating from 0 (no rating) to 5 stars. Is there some way to place a dynamic number of stars into the group display?

Basically, can I get an average of the %RATING% fields in the album?

foo_uie_single_column_playlist

Reply #249
Cartman:
My guess would be that at some point the the filename is being processed as code and therefore the comma is breaking the processing. I would suggest attempting a workaround by prefixing any commas in your filename with single quotes to have them processed as text. For example:
--
*this is untested and you may need to debug it


Yeah that was something i also thought so i tried this:
Code: [Select]
$replace(%path%,',',''',''')

just to find out how escape codes with ' with commas are interpreted. this seems to be doing just what i need. ive implemented it in imagabs but result is seen on screenshot  (ive changed artist tag in group code to see prarsed path and it looks how it should... but it doesnt work). I still think that problem is in that comma breaks processing but it looks there isnt easy path around

[a href="http://img247.imageshack.us/my.php?image=fots4.png" target="_blank"]) ... just those comas are giving me headache