View now playing on another XBMC computer?
#1
Hello, I have two computers running xbmc and want to have one computer find out what is playing on the other (music).

Is this possible? So if one computer is playing an album, the other could find out what is playing on it and maybe even choose to play the same album or song.

This would be great.

-Thanks
Reply
#2
XBMC can't tell what another XBMC installation is playing.

XBMC does allow other hosts on the network to get this info, and this is used by several remote control apps e.g. the Apple and Android smartphone apps. I'm not sure what the remote control options are on Windows.

You could write a script (in effect an XBMC macro) to make XBMC query another XBMC installation, but it's not a task for the beginner.
Reply
#3
The Default web interface also has this info (you'll need to make sure it's on - Settings > Network):

http://[ip address of XBMC machine]:8080/

Again, to jhsrennie's point, it's outside of XBMC.
Reply
#4
The web interface may be good enough...but any idea how i can remove the xbmc logo and all the stuff on the top so as to clean up that page?
Reply
#5
OK, the web interface works but not well.

I setup a key to do a systemexec which runs a script that kills all web browsers and then opens the web interface up in internet explorer. The idea is one button on my remote will open up the web interface to the other xbmc install. The script works great when run by itself, but when run from inside xbmc, xbmc minimizes, opens the script, then maximizes over it so you don't see the internet explorer page.

What it want to do is have xbmc remail in fullscreen and have internet explorer just open on top of it. I will setup my script to close internet explorer if pressed again, thus returning you to xbmc.

Any ideas on how to keep xbmc full screen (and not minimize) but run internet explorer on top of it?
Reply
#6
You could have your script do something like:

Code:
child = subprocess.Popen("iexplore.exe")
rc = child.wait()
Reply
#7
Where would I enter that script in? Also, how do i go about having one button open and close that script?
Reply
#8
You need to write a short Python program to open IE. In effect you're writing an XBMC macro. As a test I created the file D:\temp\OpenXBMCWeb.py containing:

Code:
import subprocess

print "Starting script OpenXBMCWeb.py"

# Open IE with the web interface of the target PC
child = subprocess.Popen("\"C:\Program Files (x86)\Internet Explorer\iexplore.exe\" http://rattle:82/")
rc = child.wait()

# Run XBMC: this will simply set the focus back to the current instance
child = subprocess.Popen("C:\Program Files (x86)\XBMC\XBMC.exe")

It should be fairly obvious what the script does. My PC is called "rattle" and is set to use port 82 for the XBMC web interface, which is why the argument to Internet Explorer is "http://rattle:82/". Change this to the PC name and port you want to use.

The are various ways to run the script. For testing I mapped it to the keypress ctrl-space. See http://wiki.xbmc.org/index.php?title=Mod...yboard.xml for info on key mappings. Grab KeyMapEdit from http://xbmcmce.sourceforge.net/, choose whatever key you want and set the action to "RunScript(D:\temp\OpenXBMCWeb.py)". Change the script path and name to whatever you've called the script.
Reply
#9
I have tried this but xbmc just says script error.

Any ideas?
-Thanks
Reply
#10
A debug log will tell you what the error is. Enable debug logging and press \ (backslash) to run XBMC in a window. Now run the script and as soon as you get an error press Windows-R and in the Run dialog type:

Code:
"%appdata%\xbmc\xbmc.log"

(including the quotes) and click Ok and the log will open in Notepad. Go to the end of the log and look for the Python error. For example if I introduce a deliberate error into my script I see:

Code:
DEBUG: CApplication::OnKey: ctrl-space (1f020) pressed, action is RunScript(D:\temp\OpenXBMCWeb.py)
  INFO: initializing python engine.
DEBUG: new python thread created. id=6
DEBUG: Thread XBPyThread start, auto delete: 0
DEBUG: Python thread: start processing
NOTICE: -->Python Interpreter Initialized<--
DEBUG: XBPyThread::Process - The source file to load is D:\temp\OpenXBMCWeb.py
DEBUG: XBPyThread::Process - Setting the Python path to
DEBUG: XBPyThread::Process - Entering source directory D:\temp etc stuff deleted
NOTICE: Starting script OpenXBMCWeb.py
  INFO: -->Python script returned the following error<--
ERROR: Error Type: <type 'exceptions.AttributeError'>
ERROR: Error Contents: 'module' object has no attribute 'PopenXXX'
ERROR: Traceback (most recent call last):
                             File "D:\temp\OpenXBMCWeb.py", line 6, in <module>
                               child = subprocess.PopenXXX("\"C:\Program Files (x86)\Internet Explorer\iexplore.exe\" http://rattle:82/")
                           AttributeError: 'module' object has no attribute 'PopenXXX'
  INFO: -->End of Python script error report<--
Reply
#11
OK, it was because I'm using windows xp and Program Files (x86) needed to be changed to just Program Files.

It now opens IE, but it will not close IE. I am using F9 as my "hotkey"

Any ideas? Alternatively if I could program IE to close out when F9 was pressed, that would work too. XBMC would see F9 and open IE and IE would then see the next F9 press and close itself.

-Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
View now playing on another XBMC computer?0