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: [Not My Release] ELPlaylist (Read 523611 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [Not My Release] ELPlaylist

Reply #1000
Thanks much! I'll try out this code as soon as I can. I know I should post when I do so, but it seems I can't edit what I've previously posted, and I wanted to say the heart issue has been fixed.

Re: [Not My Release] ELPlaylist

Reply #1001
So, thanks for taking the time to answer. I am, however, still stuck. Somehow it only draws the line on top of the track titles, rather than actually affecting the size of the group.

I figure any chance of getting this resolved rests on sharing my (simplified) config:

"Track List":

Code: [Select]
//Text Colors
$puts(text_color,$if(%el_isplaying%,%playing_text_color%,%text_color%))
$puts(text_color_alt,$if(%el_isplaying%,%playing_text_color%,%text_color_alt%))
$puts(text_color,$if(%el_selected%,%selected_text_color%,$get(text_color)))
$puts(text_color_alt,$if(%el_selected%,%selected_text_color%,$get(text_color_alt)))

//Track Number
$font(,10,)
$drawtextex($if2(%tracknumber%,00),$add(%art_size%,15),0,30,%el_height%,$get(text_color_alt),hcenter vcenter)

//Track Title
$drawtextex([%track artist%' - '][%title%],$add(%art_size%,50),0,$sub(%el_width%, $add(%art_size%,195)),%el_height%,$get(text_color),vcenter end_ellipsis)

//Track Length
$drawtextex(%length%,$sub(%el_width%,35),0,90,%el_height%,$get(text_color_alt),left vcenter end_ellipsis)

//Cover
$enabledraw(1)
$setworldtransform(2)
$imageabs(5,-47,%art_size%,%art_size%,$directory_path(%path%)\Cover.png,artreader)

"Group Header":

Code: [Select]
//Title Color
$puts(title_color,$if(%el_selected%, %selected_text_color%, %text_color%))
$puts(title_color2,$if(%el_selected%, %selected_text_color%, %text_color2%))

//Group Title
$font(,18,)
$drawtextex($if2(%album%,Unknown),322,-5,880,%el_height%,$get(title_color),end_ellipsis vcenter)
$font(,14,)
$drawtextex($if2(%date%,),322,15,880,%el_height%,$get(title_color2),end_ellipsis vcenter)

//Cover
$enabledraw(1)
$setworldtransform(1)
$imageabs(5,5,%art_size%,%art_size%,$directory_path(%path%)\Cover.png,artreader)

Row height:
Code: [Select]
26
Row number of group header:
Code: [Select]
2
Minimum row number of group:
Code: [Select]
$ifgreater(%el_direct_item_count%,1,$add(%el_item_count%,1),2)

Really hope to get this resolved, and thanks again for bearing with me.

Re: [Not My Release] ELPlaylist

Reply #1002
From what I gather from your code and screenshots the problem here is the fact that the cover is drawn both in the track list and the group header. The group header shows the top part and the rest is filled up with the cover drawn in the tracklist. Neat but it gets you into trouble with the rows in the tracklist of course. It seems to show the lower part of the cover in the tracklist a certain minimum amount of rows need to be present (each row is one track). If not enough rows are present then the cover in the tracklist gets cut off at the bottom.
Minimum row number of group is the part you need to look at. Of course you'd only want to add x amount of enough rows only when it's necessary when the group doesn't have enough rows otherwise empty rows will be added to every group.

Code: [Select]
$ifgreater(%el_direct_item_count%,1,$add(%el_item_count%,1),2)

This code in your minimum row number seems off to me. Change that last number see what it does or try this and again change that last number:

Code: [Select]
$ifgreater(%el_direct_item_count%,1,$add(%el_item_count%,1),$add(%el_item_count%,2))


Re: [Not My Release] ELPlaylist

Reply #1003
How nice! I think the problem has been fixed for the most part. The way it was fixed lies in what you said about that first code. (the numbers I played around being "7" and "8").

Code: [Select]
$ifgreater(%el_direct_item_count%,7,$add(%el_item_count%,1),8)

I say mostly fixed because sometimes, certain groups have uneven space. It doesn't happen much, and it's rather random, but it's there. I don't really understand what the code is doing for it to go away, so I tried many numbers (even changing the resting "1"), but I haven't gotten into a combination that doesn't do it. Do you have any idea why it happens?

I think the ideal code should do this:

if track count is lesser than 8 = add X rows
if track count is greater than 8 = add Y rows

Not sure what the value of X/Y would be, but it would just be a matter of testing it out. I didn't find a $iflesser function so I'm not sure if this is doable, though.

Regardless, as it is now it works great 90% of the time so if this isn't doable that's okay too. Again, thanks very very much to both of you. Really. This has been a pain to get right, and I couldn't have gotten nearly as far if it weren't for you.

Re: [Not My Release] ELPlaylist

Reply #1004
From the titleformatting help:

$ifgreater(A,B,C,D)    If the number A is greater than the number B, executes/returns C, otherwise executes/returns D.

Why would you need a $lesser function?  If D executes anything that's not greater than A.
But it seems you need a minimum of 8 rows. So instead perhaps you should try $ifequal. So if %el_direct_item_count% is 1 then add 7, if it's 2 then add 6 and so on until you end with 8.

Code: [Select]
$ifequal(%el_direct_item_count%,1,$add(%el_item_count%,7),
$ifequal(%el_direct_item_count%,2,$add(%el_item_count%,6),
$ifequal(%el_direct_item_count%,3,$add(%el_item_count%,5),
$ifequal(%el_direct_item_count%,4,$add(%el_item_count%,4),
$ifequal(%el_direct_item_count%,5,$add(%el_item_count%,3),
$ifequal(%el_direct_item_count%,6,$add(%el_item_count%,2),
$ifequal(%el_direct_item_count%,7,$add(%el_item_count%,1),
8)))))))

You'll probably need to put this into one single line.

Re: [Not My Release] ELPlaylist

Reply #1005
Shorter version of the above:
Code: [Select]
$ifgreater(%el_direct_item_count%,8,,$add(%el_direct_item_count%,$sub(8,%el_direct_item_count%)))

Re: [Not My Release] ELPlaylist

Reply #1006
Hi.
I'm trying to figure out how to get the %filesize% of all tracks in a playlist. Right now I have the following in Track List:

Code: [Select]
$font(Segoe UI,8,)
$ifgreater(%el_sum_length_seconds%,86400,
$drawtextex(%el_item_count% Songs',' $div(%el_sum_length_seconds%,86400) Days',' $div($mul(%filesize%,%el_item_count%),1000000000) GB,0,0,170,28,120-120-120-255,hcenter vcenter)
,
$ifgreater(%el_sum_length_seconds%,3600,
$drawtextex(%el_item_count% Song$ifequal(%el_item_count%,1,,s)',' $div(%el_sum_length_seconds%,3600) Hours',' $div($mul(%filesize%,%el_item_count%),1000000) MB,0,0,170,28,120-120-120-255,hcenter vcenter)
,
$drawtextex(%el_item_count% Song$ifequal(%el_item_count%,1,,s)',' $div(%el_sum_length_seconds%,60) Min',' $div($mul(%filesize%,%el_item_count%),1000000) MB,0,0,170,28,120-120-120-255,hcenter vcenter)
)
However, %filesize% is only related to the selected track, so it shows different numbers every time I select another track.
Any way to find out the size of all the el_items in the playlist?

Re: [Not My Release] ELPlaylist

Reply #1007
Group header is where you show totals and only for the grouping format and only with available ELplaylist custom fields such as %el_item_count% (counts items within group), %el_sum_length% (length of items within group). There is no custom sum filesize as far as I'm aware. But even if it were available you'd need to put the entire playlist within one group format which kinda negates the usefulness of ELplaylist.
However foo_uie_playlists_dropdown, a columns ui extension, can show what you want. If you want to go that route here's my display script:

Code: [Select]
%title%
$tab(2)
//%lock%
    $ifgreater(%size%,0,'['%size%']',)
   '['%length%']'

   $ifgreater(%filesize%,1073741823,
'['$div(%filesize%,1073741824) GB']',
'['$div(%filesize%,1048576) MB']'
)

This will show playlist item count, playlist total duration and playlist size formatted in GB

Also, I believe there's a jscript panel playlist organizer script out there that can probably do the same. Not sure about that one since I'm not using it.

Re: [Not My Release] ELPlaylist

Reply #1008
Hi.
I'm trying to figure out how to get the %filesize% of all tracks in a playlist. Right now I have the following in Track List:

Code: [Select]
$font(Segoe UI,8,)
$ifgreater(%el_sum_length_seconds%,86400,
$drawtextex(%el_item_count% Songs',' $div(%el_sum_length_seconds%,86400) Days',' $div($mul(%filesize%,%el_item_count%),1000000000) GB,0,0,170,28,120-120-120-255,hcenter vcenter)
,
$ifgreater(%el_sum_length_seconds%,3600,
$drawtextex(%el_item_count% Song$ifequal(%el_item_count%,1,,s)',' $div(%el_sum_length_seconds%,3600) Hours',' $div($mul(%filesize%,%el_item_count%),1000000) MB,0,0,170,28,120-120-120-255,hcenter vcenter)
,
$drawtextex(%el_item_count% Song$ifequal(%el_item_count%,1,,s)',' $div(%el_sum_length_seconds%,60) Min',' $div($mul(%filesize%,%el_item_count%),1000000) MB,0,0,170,28,120-120-120-255,hcenter vcenter)
)
However, %filesize% is only related to the selected track, so it shows different numbers every time I select another track.
Any way to find out the size of all the el_items in the playlist?

I find some solution. Not by ELP but with playlist switcher.
This command line will show you a active playlist/count number of all tracks/ total duration of all tracks in playlist /  total size of all tracks in playlist

Go to playlist switcher - General - (is checked) Use titleformating for playlist title in panel and clean the lower window and paste this:
$if(%is_playing%,'NOW PLAYING PLAYLIST >>>' $if(%is_active%,,$rgb(255,255,5)))%title%     TRACKS TOTAL - %size%     PLAYLIST TOTAL TIME - %length%        TOTAL SIZE - %filesize%


Re: [Not My Release] ELPlaylist

Reply #1009
I've modified a bit the default theme through lots of trial and error and have found something I can't explain.

I've modded the popup and wanted to have different popups for tracks and group headers, so I did this in the "Popup(Track)" tab:

Code: [Select]
$setcoordinate(1)
//////Track Info/////
$if($not(%el_is_group%),
$font(,9,bold) $drawstring(%tracknumber%. %title%,10,$add(12,$mul(%el_item_index%,20)),%el_width%,%el_height%,0-0-0,nowrap elipchar)
$font(,8,)
$puts(tech.info,%codec% $if3($info(bitspersample) Bit,$if($strstr($lower($info(codec_profile)),vbr),%codec_profile%,%codec_profile% %bitrate% kbps)))
$ifequal(%el_item_count%,1,$drawstring(%album%$crlf()%artist% '('%date%')'$crlf()%genre%$crlf()$get(tech.info)$crlf()Length: %length%,10,38,%el_width%,%el_height%,0-0-0,nowrap elipchar),)
,
$font(,9,bold) $drawstring(%artist%: %album% '('%date%')',10,6,,,,nowrap elipchar)
$font(,9,) $drawstring(%tracknumber%. %title%,10,$add(24,$mul(%el_item_index%,20)),%el_width%,%el_height%,0-0-0,nowrap elipchar)
)

This shows the lightly modded default popup when the mouse is over a track and the whole code after the comma when over a group header.

Everything is ok except that the text drawn by the 3rd code line starting from the bottom renders ugly. "aa" and "hq" options for $drawstring don't improve it.

This is the regular popup, which is just fine:



And this is the group header popup:



As you can see, the first line renders ugly.

It this a bug? Is there any rational explanation?


Re: [Not My Release] ELPlaylist

Reply #1010
Hi I am trying to automatically sort the playlist based on my Grouping > Group format:
$if(%album%,%album artist%|%album%|%discnumber%|%directoryname%)
Sort format:
%directoryname%,%album%,%discnumber%,%tracknumber%
I see there was an answer a page or 2 ago but the image hosting isn't working.
Could someone please tell me how?
Thanks very much

Re: [Not My Release] ELPlaylist

Reply #1011
Does anyone know if it's possible to force ELplaylist not to expand groups? In other words, when selecting the group header to keep the group locked.

Re: [Not My Release] ELPlaylist

Reply #1012
New to ELplaylist, sorry for a dumb question. Is there a way to set color to a particular text string, like $rgb() function in NG playlist?

Re: [Not My Release] ELPlaylist

Reply #1013
From the ELplaylist wiki:
Code: [Select]
$drawstring(text,x,y,W,H,rgba,OPTIONS[,OPTIONS2])
Example:
Code: [Select]
$drawstring(abcd,10,10,,,255-128-64-128,)

I'm guessing the a in rgba stands for "alpha" which is the transparency setting (set 0 to 255). Not sure, I usually use $drawtext which doesn't have that option.

Re: [Not My Release] ELPlaylist

Reply #1014
From the ELplaylist wiki:
Code: [Select]
$drawstring(text,x,y,W,H,rgba,OPTIONS[,OPTIONS2])
Example:
Code: [Select]
$drawstring(abcd,10,10,,,255-128-64-128,)

I'm guessing the a in rgba stands for "alpha" which is the transparency setting (set 0 to 255). Not sure, I usually use $drawtext which doesn't have that option.
I've seen that one, but it seems to put the string at specific coordinates, which is pretty inconvenient.

Re: [Not My Release] ELPlaylist

Reply #1015
Without coordinates, how would you imagine ELplaylist to know where to draw text?

Re: [Not My Release] ELPlaylist

Reply #1016
Like in NG playlist, for instance, starting after the last bit of text. But I guess that's not how ELplaylist operates.

Re: [Not My Release] ELPlaylist

Reply #1017
Hi. I hope that's the correct topic to ask a question. About foo_uie_esplaylist v0.6.9.1.2 (beta) in foobar v1.6.2 portable version. If I understand correctly this is the script string in charge of displaying the track of the song in track list menù:

$drawtextex($if2($num(%tracknumber%,0),n/a),34,0,$sub($get(cov.pad),38),$sub(%el_row_height%,3),$get(txt.col),right vcenter)

My question is how can I get the track display in Long Playing mode (e.g. A1, A2, A3, B1 etc.).
I saw that in the popup track it shows it correctly with this string in Popup(Track) menù:

$puts(text,[%tracknumber% ][$upper(%track artist%) $char(9679) ]%title%[ '('%subtitle%')'])

I tried playing with parameter ($if2($num(%tracknumber%,0),n/a) but obviously I'm on the high seas. What I ask is feasible? Thanks a lot.

Re: [Not My Release] ELPlaylist

Reply #1018
Hi all,

I have the following issue with ELPlaylist.
When I select an album to play, the header in the tracklist is not fixed and moves when I scroll the tracklist.
I wasn't able to fix the header on top and decided to use two panels: in one panel I only have the header without the tracklist (which accordingly has a small height) and in the other panel I have the tracklist only. The problem is that in the panel with the header only (even though the tracklist in not displayed) it always gets shifted. I guess it is due to the fact that there is a certain space reserved for the tracklist. One solution would be to permanently collapse the header (in that particular panel) but I wasn't able to figure out how do that, yet. Another solution would be to remove the space which is reserved for the tracklist (in that particular panel).

Can anyone help me on this?

Thanks a lot in advance!

Re: [Not My Release] ELPlaylist

Reply #1019
I have the following issue with ELPlaylist.
When I select an album to play, the header in the tracklist is not fixed and moves when I scroll the tracklist (...)

I guess it's not an issue but a normal behaviour and you will have the same with every playlist viewers.
Have you never put more than one album in your playlist ?

Re: [Not My Release] ELPlaylist

Reply #1020
I guess it's not an issue but a normal behaviour and you will have the same with every playlist viewers.
Have you never put more than one album in your playlist ?
[/quote]

Thanks very much for the reply.
No, I usually have only one album in queue...