Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: mediabridge Library in Webserver

  1. #1
    Join Date
    Mar 2005
    Posts
    726

    Default mediabridge Library in Webserver

    Ok I am almost done moving all the netremote funtions over to the Girder webserver for my tablets however I have a couple of issues I am sorting out one is how to view the JRMC library and select songs or playlists using the webserver.

    the other is tying in XBMC so that it has controls showing up as a Reciever like the JRMC does currently

    Thanks,

    Yonu

  2. #2
    Join Date
    Mar 2005
    Posts
    726

    Default

    is atleast the JRMC stuff doable? and if so how do I do it and just for reference I have 4 zones

  3. #3
    Join Date
    Jun 2005
    Posts
    339

    Default

    yonu -

    I'm thinking that the 'easier' approach would be to go directly to JRMC via their web interface.

    I know that there are a few apps out that that do this, but I haven't seen a documented web interface doc to know if it's possible to recreate mediabridge functionality via web...

  4. #4

    Default

    You can always check out web interface at http://192.168.1.10:52199/LibraryServer/
    I think what I describe here require JRMC 17 or better

    I have used the stuff at http://192.168.1.10:52199/MCWS/v1/ to build up the code below.
    It is not perfect and can for sure be done in a better and faster way. I run this script every 2 sec to get an update.
    Code:
    JRMC_Zones = {}
    varJRMC_Zones = win.URLDownloadToMemory("http://192.168.1.10:52199/MCWS/v1/Playback/Zones")
    _, _, NumberZones = string.find(varJRMC_Zones,"\"NumberZones\">(%d)")
    --zonecount = 1
    --_, _, NameZones = string.find(varJRMC_Zones,"\"ZoneName"..zonecount.."\">(%a*)")
    --print(NameZones)
    --print(varJRMC_Zones)
    JRMC_Zones["ZoneName"] = {}
    --print("test12345: "..NumberZones)
    --JRMC_Zones.Zones = NumberZones
    for c = 0, NumberZones - 1 do
    	_, _, NameZones = string.find(varJRMC_Zones,"\"ZoneName"..c.."\">(%a*)")
    	JRMC_Zones.ZoneName["ZoneName"..c] = NameZones
    	--http://192.168.1.10:52199/MCWS/v1/Playback/Info?Zone=Allrum&ZoneType=Name
    end
    for k, v in pairs(JRMC_Zones.ZoneName) do
    	varJRMC_PlayingNow = win.URLDownloadToMemory("http://192.168.1.10:52199/MCWS/v1/Playback/Info?Zone="..v.."&ZoneType=Name")
    	JRMC_Zones["Zone_"..v] = {}
    	_, _, JRMC_Zones["Zone_"..v].ImageURL = string.find(varJRMC_PlayingNow,"\"ImageURL\">([^<]*)")
    	_, _, JRMC_Zones["Zone_"..v].status = string.find(varJRMC_PlayingNow,"\"Status\">([^<]*)")
    	_, _, JRMC_Zones["Zone_"..v].artist = string.find(varJRMC_PlayingNow,"\"Artist\">([^<]*)")
    	_, _, JRMC_Zones["Zone_"..v].album = string.find(varJRMC_PlayingNow,"\"Album\">([^<]*)")
    	_, _, JRMC_Zones["Zone_"..v].name = string.find(varJRMC_PlayingNow,"\"Name\">([^<]*)")
    	--_, _, test1 = string.find(varJRMC_PlayingNow,"\"ImageURL\">(%w*[^<]*)")
    	--print(test1)
    	--print(test2)
    	--print(varJRMC_PlayingNow)
    	print ("JRMC Updated")
    end
    You could most likely "re-skin" webgizmo, http://192.168.1.10:52199/Gizmo/ with your own look and feel. That was/is my plan but my knowledge and time is somewhat limited.....

  5. #5
    Join Date
    Mar 2005
    Posts
    726

    Default

    sorry for the late replies work has had my busy

    on the code you posed where should I place this?

    Thanks,
    Yonu

  6. #6
    Join Date
    Mar 2005
    Posts
    726

    Default

    ok I got the code placed in a scripting node and runnign however I have to ask does it simply pass the contents to cariables or what?

    Thanks,
    Yonu

  7. #7

    Default

    For now it is only downloading "playing Now" info from the different zones you have as well as the zones and place them in tables (JRMC_Zones). See it as a starting point and build whatever functionality you want.
    The reason why I do this from within Girder is to be able to trigger actions based on play states. You could also implement this directly in your Girder webpage and get full library browsing functionality, check out webgizmo for a working example.

  8. #8
    Join Date
    Mar 2005
    Posts
    726

    Default

    ok got ya

    Thanks,
    Yonu

  9. #9
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,477

    Default

    I discovered this by accident. Has this script been developed more? It looks like a great start, but I can only see one zone there, not all of my zones. Tried to uncommend the zonecount line and put in 11, but that didn't help.
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

  10. #10

    Default

    Hi
    I have not really done any further development of this scriptother then modifying it for girder 6.

    If you connect to the link below with you ip adress instead of mine for the jrmc server with a browser you should get the full response that I decode In the script

    http://192.168.1.10:52199/MCWS/v1/Playback/Zones

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •