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: Help with filter and now playing script (Colums UI) (Read 1592 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help with filter and now playing script (Colums UI)

I'm pretty happy with my current config, but I unfortunately my -very- limited scripting abilities prevent me from making the final few tweaks. My first problem is with my 'now playing' script. Normally it looks like this:



but when a track title is too long it ends up looking like this:



Is there a way to make the title become smaller when the total width is longer than the 'now playing' box?

Here the script I currently use:

Code: [Select]
[$set_font(%default_font_face%,$add(%default_font_size%,14),) $rgb()
[%artist%]]$crlf()

[$set_font(%default_font_face%,$add(%default_font_size%,12),) $rgb()
[%title%]]$crlf()

[$set_font(%default_font_face%,$add(%default_font_size%,9),) $rgb(130,200,200)[%album%]]$crlf()

[$set_font(%default_font_face%,$add(%default_font_size%,2),) $rgb()
[%_time_elapsed% / ]%_length%]$crlf()$crlf()

[$set_font(%default_font_face%,$add(%default_font_size%,2),)
$rgb(0,190,250)
[$info(codec) - $info(bitrate) kbps - $info(bitspersample)-bit - $info(samplerate) KHz]]

I realise that this is probably horibly written, so any suggestion on how to improve it would be much appreciated!

My second scripting problem is regarding the Artist filter. Is there a way to sort it like this:


Help with filter and now playing script (Colums UI)

Reply #1
You can use $len(%title%) to get title length in characters, than use some math to make font size according title length, thou it won't work in your example because you title is just too log. Maybe you should right-click on item details panel and deselect word wrapping

If I understand right you second problem, then you can't do that kind of grouping inside filter panel

Help with filter and now playing script (Colums UI)

Reply #2
Thanks for the tip! Too bad it's not possible to sort the filter, are there any other sorting components that can do this?

There is one more thing I was wondering. My NGPlaylist looks like this:



My grouping script:

Code: [Select]
$puts(sep,$transition(' '$trim($repeat('―',2)),$rgb(200,200,200),$rgb(200,200,200)))
$rgb(200,200,200)%album artist%
$get(sep)
$rgb(0,190,220) '('%date%') '
$puts(normal,$rgb(200,200,200))
$puts(light,$rgb(164,180,134))
$puts(bright,$rgb(205,135,52))

$get(normal)
$replace(%album%,
'(',$get(light)'(',
')',')'$get(normal),
'[',$get(bright)'[',
']',']'$get(normal),
'EP',$get(bright)'[EP]',
'12"',$get(bright)'[12"]',
'7"',$get(bright)'[7"]')


$if(%discnumber%,
$get(sep)$rgb(99,128,107) Disc %discnumber%[ of %totaldiscs%]
,)

I added a blank grouping field under it to have the second line to make som more space between the title and the album tracks. Is there a way to do the same thing over the title as well? So there is a blank space between the last song of an album and the title of the next album?


 
SimplePortal 1.0.0 RC1 © 2008-2021