World's simplest script: start partymode and launch music vis/song info
#1
I'm trying write a script to put in autoexec.py to automatically start Party Mode, then launch the music visualization (the one you get when you hit X, so that I can use Left/Right to control tracks) then pull up that song info overlay (the one you get when you hit the White Button)

This is what I have so far, based on what I've been able to find in the wiki and elsewhere

Code:
import xbmc, xbmcgui
xbmc.executebuiltin("XBMC.PlayerControl(PartyMode)")
xbmc.executebuiltin("XBMC.ActivateWindow(visualisation)")
xbmc.executebuiltin("XBMC.ActivateWindow(musicoverlay)")

It doesn't seem to be going quite right, though, as the music plays, but then the music info overlay shows no info and the visualization doesn't play in the background. Where might I be going wrong?

Thanks for any help!
Reply
#2
depends on what you mean by the visualisation doesn't play in the background. If you mean it doesn't show at all, try adding some sleeps between commands.

xbmc.sleep(300) experiment with the time in msec.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
I'll play around with that. Aside from that, though, so you see anything odd in my script?
Reply
#4
This is what seems to work. XBMC needs the whole second to get everything ready and not have the party mode window spawn on top of the visualization. The visualization still does not show, but I'll blame that on some Win32/VMWare environment quirkiness as everything else seems to work and now the song info overlay is populated with real info.

Thanks for your help!!

Code:
import xbmc, xbmcgui, time

xbmc.sleep(1000)
xbmc.executebuiltin("XBMC.PlayerControl(PartyMode)")
xbmc.sleep(1000)
xbmc.executebuiltin("XBMC.ActivateWindow(visualisation)")
xbmc.sleep(300)
xbmc.executebuiltin("XBMC.ActivateWindow(musicoverlay)")
Reply
#5
It turns out I was incorrect about musicoverlay. That is not the window you need activated to show the song information you get when you hit the White button. That screen lies within MusicVisualization.xml (the window called by ActivateWindow(visualisation))

The thing is, the song info screen always fades out. How would one get it to star permanently? Can you simulate a button press in a script?
Reply
#6
Pressing WHITE once will put it on for all time, and leave it on for all time.

Additionally, I think you can simulate a button press via the HTTP interface (accessible from python).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
World's simplest script: start partymode and launch music vis/song info0