Is there a syntax (or a component that adds a similar syntax) for checking if what is being played is local or being streamed over the internet, that would work similar to %ispaused%? I'm customizing foo_discord_rich and want to automatically switch the second line when listening to a online radio.
Currently it looks like this in the attached pictures.
FIrst line:
🎧%title%[ '//' %artist%]
Second line:
[💿%album%$ifgreater(%totaltracks%,1, '['%tracknumber%/%totaltracks%']',)]
I was planning of something like "$if(
%islocal%,
*insert old second line here* ,📻[%path%
*or* %radioname%])", but I've looked at the title formatting syntax reference document that comes with foobar2000 and didn't find something that could solve this.
Update: I tried using $ifequal and $substr to detect if %path% started with "http", but it didn`t work because apparently $ifequal is for numbers only...?
$ifequal($substr(%path%,1,4),http,📻,💿)
So then I converted "http" to a number and IT WORKED!
$ifequal($replace($substr(%path%,1,4),http,1337),1337,📻,💿)
I don't know if there is a better way to do this, but at least it is working as expected for now :D
The final result looks like this. I really don't know how to format, so here is a beautiful and awkward long line
$ifequal($replace($substr(%path%,1,4),http,1337),1337,📻,💿)[%album%[ '('$year(%date%)')']$ifgreater(%totaltracks%,1, '['%tracknumber%/%totaltracks%']',)]
You could also use %length%
$if(%length%, <local>, <streaming>)
You could also use %length%
$if(%length%, <local>, <streaming>)
Oh that's a good idea, this is way easier. I will use this one then, thanks!
$if($stricmp($left(%path%,4),http),