SHARE
TWEET

VLC Now Playing video wickedradio

illpastethat Mar 17th, 2013 358 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Written by nick1 original by TheNiteLyfe @ Hawkee
  2. alias vnp {
  3.   if (!$sock(vlc)) {
  4.     sockopen vlc 127.0.0.1 8080
  5.     sockmark vlc msg $active
  6.   }
  7. }
  8. on *:sockopen:vlc:{
  9.   sockwrite -nt vlc GET /requests/status.xml HTTP/1.1
  10.   sockwrite -nt vlc Host: 127.0.0.1 $str($crlf,2)
  11. }
  12. on *:sockread:vlc:{
  13.   if ($sockerr) { echo -a Error: $sock(vlc).wsmsg }
  14.   var %v
  15.   sockread %v
  16.   if (*<info name='title'>* iswm %v) {
  17.     var %x $replace($remove($gettok(%v,8,62),</info),&#39;,',&amp;,&,&#146;,',&quot;,")
  18.     if ((%x != %np.last) && (%x != $null)) {
  19.       set %np.last %x
  20.       $sock(vlc).mark $bracketcolor(VLC Player) Now Playing:12 %np.last
  21.     }
  22.     sockclose vlc
  23.   }
  24.   elseif (*<info name='filename'>* iswm %v) {
  25.     var %x $replace($remove($gettok(%v,2,62),</info),&#39;,',&amp;,&,&#146;,',&quot;,")
  26.     $sock(vlc).mark $bracketcolor(VLC Player) Now Playing:12 %x
  27.     sockclose vlc
  28.   }  
  29. }
  30. alias -l bracketcolor {
  31.   return $+(12,[,04,$1-,12,],10)
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top