Question / Help Now Playing Simple (foobar2000 component) script help

bossjedizohan

New Member
I use foobar to play my music library.
When I'm streaming I use the Now Playing Simple component to output the song info to a text file and capture that with OBS.
The issue I'm having is that the script I wrote for NPS: http://pastebin.com/SrMJDtUX
does this when paused:

THE
MUSIC
IS PAUSED
Beastie Boys
"Bodhisattva Vow"
0:39/3:08

Any idea what's wrong with my script?

This is how it looks in OBS
, which is fine but I'd rather not have the extraneous text when the music is paused.

I asked about this in the IRC but no one could help me out. Other programs like SMG were suggested but NPS is honestly the most convenient thing for me to use at it runs from within foobar and never requires my attention aside from setting up the script.

Thank You

EDIT
The extra line break after the final lines is required because OBS has an issue with aligning text properly without it when using custom text extents
 

HomeWorld

Developer
You have a misplaced comma for the first if.
  1. $if(%isplaying%,
  2. $if(%ispaused%,
  3. THE
  4. $crlf()MUSIC
  5. $crlf()IS PAUSED
  6. $crlf()
  7. )
  8. ,
  9. %artist%
  10. $crlf()"%title%"
  11. $crlf()%playback_time%/%length%
  12. $crlf()
  13. )
 

bossjedizohan

New Member
You have a misplaced comma for the first if.
  1. $if(%isplaying%,
  2. $if(%ispaused%,
  3. THE
  4. $crlf()MUSIC
  5. $crlf()IS PAUSED
  6. $crlf()
  7. )
  8. ,
  9. %artist%
  10. $crlf()"%title%"
  11. $crlf()%playback_time%/%length%
  12. $crlf()
  13. )

That closes the command before it gets to the else though so it only outputs text if the music is paused
 

bossjedizohan

New Member
God I'm a dummy! Figured it out:


$if(%ispaused%,
THE
$crlf()MUSIC
$crlf()IS PAUSED
$crlf(),
%artist%
$crlf()"%title%"
$crlf()%playback_time%/%length%
$crlf()
)
 
Top