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: Foobar stream custom columns (Read 1324 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar stream custom columns

Hi!

I have a problem with custom columns. I use this command:
Code: [Select]
$if(%isplaying%, >>> %filename%, %filename%) $if($stricmp($left(%path%,7),'http://'), %artist% - %title%) $if($stricmp($left(%path%,8),'https://'), %artist% - %title%))
This works fine for local files but not for streams.
When I listen to a stream I see this in the playlist (http://nap.casthost.net:8878/;stream.mp3): ;stream Killarmy - Red Dawn [1998]
But this is what i want to see: Killarmy - Red Dawn [1998]
And if I'm not listening to a stream, I see this: ;stream ? - GtronicRadio
But this is what i want to see: GtronicRadio

Can anyone help me with this?

Re: Foobar stream custom columns

Reply #1
The %filename% is the part that returns ";stream" - you can see it there at the end of the URL - ";stream.mp3". So remove the two %filename%.

Also not sure why you need two $if functions for http:// and https:// when they both do the same - just the first one is enough.

Re: Foobar stream custom columns

Reply #2
The two %filename% are required for local files, and the second $if function for https streams.

Re: Foobar stream custom columns

Reply #3
Hi!

I have a problem with custom columns. I use this command:
Code: [Select]
$if(%isplaying%, >>> %filename%, %filename%) $if($stricmp($left(%path%,7),'http://'), %artist% - %title%) $if($stricmp($left(%path%,8),'https://'), %artist% - %title%))
This works fine for local files but not for streams.
When I listen to a stream I see this in the playlist (http://nap.casthost.net:8878/;stream.mp3): ;stream Killarmy - Red Dawn [1998]
But this is what i want to see: Killarmy - Red Dawn [1998]
And if I'm not listening to a stream, I see this: ;stream ? - GtronicRadio
But this is what i want to see: GtronicRadio

Can anyone help me with this?

Get rid of the ; before stream. Stream works fine without it. Change "%artist% - %title%" with "[%artist% - ]%title%".
When streaming %artist% is only known when actually playing.
When streaming %title% has actual title of the playing song when actually playing, otherwise it has the station name.

Re: Foobar stream custom columns

Reply #4
Thx!

I managed to solve it based on your answer.

Code: [Select]
$if(%isplaying%, >>> $if3($if($stricmp($left(%path%,7),'http://'),[%artist% - ]%title%),$if($stricmp($left(%path%,8),'https://'),[%artist% - ]%title%),%filename%),$if3($if($stricmp($left(%path%,7),'http://'),[%artist% - ]%title%),$if($stricmp($left(%path%,8),'https://'),[%artist% - ]%title%),%filename%))

Works for local files and streams.

 

Re: Foobar stream custom columns

Reply #5
Thx!

I managed to solve it based on your answer.

Code: [Select]
$if(%isplaying%, >>> $if3($if($stricmp($left(%path%,7),'http://'),[%artist% - ]%title%),$if($stricmp($left(%path%,8),'https://'),[%artist% - ]%title%),%filename%),$if3($if($stricmp($left(%path%,7),'http://'),[%artist% - ]%title%),$if($stricmp($left(%path%,8),'https://'),[%artist% - ]%title%),%filename%))

Works for local files and streams.

You are welcome.

BTW. I differentiate streams not by checkling for http:// or https:// but by $if($strstr(%path%),//),STREAM,OTHER) . You cannot use a single / since youtube sources use single / as well.