[RELEASE] mIRC Now Playing script

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hjbotha Offline
Member
Posts: 59
Joined: May 2009
Reputation: 0
Post: #11
(2013-02-03 12:58)qpop Wrote:  Has anybody had any luck making this work with Frodo? I guess it's something to do with the http interface requiring JSON interaction but I am not technically minded enough to fix it...

I've literally just discovered myself that it doesn't work with Frodo. Don't know anything about JSON so I'll have to do some research before I can rewrite the parser. Will post here when I do but could be a while.
find quote
qpop Offline
Junior Member
Posts: 4
Joined: Feb 2013
Reputation: 0
Post: #12
http://wiki.xbmc.org/index.php?title=JSON_RPC has some solid information.

If only there was a "if your script used to say this then make it say this..."!
find quote
hjbotha Offline
Member
Posts: 59
Joined: May 2009
Reputation: 0
Post: #13
(2013-02-03 13:03)qpop Wrote:  http://wiki.xbmc.org/index.php?title=JSON_RPC has some solid information.

If only there was a "if your script used to say this then make it say this..."!

Indeed. It's a lot more complicated than one might think. I'd basically have to rewrite this from scratch to make it work properly and I don't currently have the time or inclination to do so. Sorry. If someone else feels like taking it on, feel free to use my code as you see fit, though, as I said, you're better off starting from scratch.

The hurdles I've identified so far are:

1. There is no good way of interacting with JSON from an mIRC script. There is a script snippet available but it's old and obtuse and uses an external javascript library. You're probably better off writing your own parser.
2. Whereas before all the information was available from XBMC on one neatly bulleted web page, now you'd have to make at least 3 separate queries if you want it not to be error-prone.

I think you would need to:
1. Get the active player ID
2. Get the currently playing media in that player
3. Determine if it's audio, a TV show or a movie
4. Get the media info
5. Parse and output

Probably the simplest solution, but not terribly elegant, is to use an external program written in some other language that will query XBMC and write details about the currently playing media to a file for mIRC to read and parse. I'll ponder this avenue but I don't know Python (the logical choice) at all.

Good luck! And sorry again...
(This post was last modified: 2013-02-05 14:24 by hjbotha.)
find quote
qpop Offline
Junior Member
Posts: 4
Joined: Feb 2013
Reputation: 0
Post: #14
Thanks for the update - I have 0 technical knowledge with scripting so I will wait and hope!
find quote
ezechiel1917 Offline
Aeon Group
Posts: 646
Joined: Jun 2005
Location: Czech Republic
Post: #15
This is a great script! Hopefully it will be upgraded to Frodo sometime in future Smile I wish I had the needed skills...

Ubuntu 13.04 | XBMC PRE-13.0 | VDR + VNSI4 @ Technotrend CT-3650 CI | Transparency! skin | trakt.tv | FlexRAID
find quote
hjbotha Offline
Member
Posts: 59
Joined: May 2009
Reputation: 0
Post: #16
For people that are following this thread, it seems someone has written an alternative that works with Frodo.

http://forum.xbmc.org/showthread.php?tid=159264

About to try it myself.
find quote
Post Reply