Page 1 of 1

"Now Playing" Mirc script.

Posted: 04 Feb 2006 21:59
by hondaman
I know this is pretty silly in the overall scheme of things, but I would like a "Now Playing" script for mirc and vlc.

For those who dont know what that is, when you open a media player, say, winamp, and play a song, movie, etc, and have a proper script for mirc, the script will display on irc what exactly you are listening to or watching.

Thank you!

Posted: 04 Feb 2006 22:33
by Guest
It is trivial to create something like this. Big issue is that mIRC is Windows only.
Best thing would be to write info to text file which could be used by any program (other IRC clients, desktop extenders, LED displays)

Posted: 05 Feb 2006 13:44
by dionoea
I don't know how mirc handles this ... but i've already added a "Now playing..." msn plugin in the dev version. If people want to add support for other functions, feel free to look at modules/misc/msn.c .

Posted: 14 Feb 2006 19:30
by jacoby
I don't know how mirc handles this ... but i've already added a "Now playing..." msn plugin in the dev version. If people want to add support for other functions, feel free to look at modules/misc/msn.c .
Is there a good chance that this could be extended to dump now playing info into a text file? I would get so much milage out of that.

Posted: 25 Apr 2006 01:42
by snappas
I have been looking for something like this for ages, if anyone could script such a thing, or explain on how it could be done, that would be awesome.

Posted: 25 Apr 2006 18:46
by dionoea
E-bola on #videolan (Freenode) has a working script.

Re: "Now Playing" Mirc script.

Posted: 17 Jun 2010 12:32
by blader
Anyone out there that has a working script?

I'm trying to get this to work

http://www.home.no/inf3rn0/NowPlaying/

But it does nothing.

Re: "Now Playing" Mirc script.

Posted: 02 Aug 2011 00:27
by KingDemo
Terribly sorry for Necroing this topic but
for those that haven't found one yet i found a working one here:
http://www.hawkee.com/snippet/7593/

Re: "Now Playing" Mirc script.

Posted: 28 Apr 2012 11:18
by Toddler Naruto
None of those scripts are working for me, sigh if only GTSDLL had included VLC as a compatible player, before it's creators abandoned it...

Re: "Now Playing" Mirc script.

Posted: 28 Jun 2013 16:17
by ColaMiXeD

Code: Select all

alias vlc { sockclose vlc sockopen vlc localhost 8080 sockmark vlc $1 } on *:sockopen:vlc: { if ($sockerr) { echo -a VLC läuft anscheinend nicht. | return } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: $sock($sockname).addr sockwrite -n $sockname Connection: close sockwrite -n $sockname } on *:sockread:vlc: { var %t | sockread %t if ($regex(%t,/<(?:info name=")?(\S+?)"?>(?:<!\[CDATA\[)?(.*?)(?:\]\]>)?</(?:\1|info)>/i)) && ($regml(2) != $null) { set %vlc. $+ $regml(1) $regml(2) } } on *:sockclose:vlc: { var %out 14[7VLC-Player14] NowPlaying: $iif(%vlc.artist,$v1 -) %vlc.title if ($sock($sockname).mark == echo) { echo -a %out } elseif ($v1 == say) { msg $active %out } else { var %x 1 while ($var(vlc.*,%x)) { echo -a $v1 => $var(vlc.*,%x).value inc %x } } unset %vlc.* } menu channel { - VLC .Im Channel Anzeigen: /vlc say .Nur Echo zeigen: /vlc echo }
doesn´t work since update 2.0.7 , any ideas? :)


Thx ...

Re: "Now Playing" Mirc script.

Posted: 07 Jul 2013 02:23
by Chromatic
I managed to get a piece of code working well enough with the latest version of VLC.

Make sure you have your http server running in VLC (and restart). (The 127.0.0.1:8080) As this pulls from the generated XML file.

As for setting up IRC, I am going to assume you have that down.

This code works fine for displaying The filename, The encoding, and the Frames per second of the video.

I have it modified for an ontext call,.. in this particular code snippet it is !VidInfo , but change whatever you want for your needs.

Code: Select all

on *:TEXT:!vidinfo*:#: { sockclose vlc sockopen vlc localhost 8080 } on *:sockopen:vlc: { if $sockerr > 0 { echo -at vlc not running | sockclose vlc } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: localhost sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:vlc: { if $sockerr > 0 { echo -a error | sockclose vlc } sockread %vlcx ;echo -a %vlcx if (*name='filename'>* iswm %vlcx) { if ($regex(%vlcx,<info name='filename'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { set %vlcann1 $regml(1) } } if (*name='Frame rate'>* iswm %vlcx) { if ($regex(%vlcx,<info name='Frame rate'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %vlcann2 $regml(1) } } if (*name='Codec'>* iswm %vlcx) { if ($regex(%vlcx,<info name='Codec'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %vlcann3 $regml(1) msg $active VLC %vlcann1 :: %vlcann3 $+ @ $+ %vlcann2 fps unset %vlcann1 } } }
Hope that helps you out!

Chromatic

Re: "Now Playing" Mirc script.

Posted: 02 Feb 2014 00:00
by RageWorthy
Thanks Chromatic, I was able to get the script to work. The only problem I am having now is that it won't display other tags! I change the word "codec" to "title" and it outputs nothing there! Is there something I am missing? The tags are working when I chack localhost:8080/requests/status.xml but they won't get pulled by mirc!

Re: "Now Playing" Mirc script.

Posted: 11 Apr 2014 11:54
by ColaMiXeD
now it works :)

set password to Lua Interface an add it to the script

Code: Select all

menu channel { VLC - Now Playing: { sockclose vlc sockopen vlc localhost 8080 } } on *:sockopen:vlc:{ if $sockerr > 0 { echo -at 4VLC ist nicht gestartet | sockclose vlc } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: localhost sockwrite -n $sockname Authorization: Basic $encode(:MYPASSWORD,m) sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:vlc: { if $sockerr > 0 { echo -a error | sockclose vlc } sockread %vlcx ;echo -a %vlcx if (*name='artist'>* iswm %vlcx) { if ($regex(%vlcx,<info name='artist'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { set %artist $regml(1) } } if (*name='title'>* iswm %vlcx) { if ($regex(%vlcx,<info name='title'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %title $regml(1) } } if (*name='album'>* iswm %vlcx) { if ($regex(%vlcx,<info name='album'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %album $regml(1) msg $active 7VLC::14 %artist 15-14 %title unset %artist unset %title unset %album } } }
Have fun :) and thanks to Chromatic

Re: "Now Playing" Mirc script.

Posted: 17 Feb 2020 14:40
by User81
I have set everywthing but doesn't work, i have mirc 7.59

In http://127.0.0.1:8080/
is written:

La password dell'interfaccia web non è stata impostata.
Usa --http-password, o imposta una password in
Preferenze > Tutto > Interfacce principali > Lua > HTTP Lua > Password.


but the password is set, even in the mirc script !!