2011-01-18, 06:01
Let's say I have a smart playlist that includes some movie sets. When I open the contextual menu with a smart playlist selected and choose "Queue Item" or "Play", the video playlist is properly converted to a static one. (i.e. the items in the set are extracted to each be part of the list) However, if I try to queue that smart playlist through code, the sets show up as the sets themselves, not the movies within.
Is there a way to mimic XBMC's "Queue Item" functionality in Python? I've tried:
XBMC.PlayMedia()
XBMC.PlayList().add()
Both operate in the latter fashion mentioned above
XBMC.PlayList().load()
Doesn't like the format of the smart playlist
I looked up the contextual menu in the source. CGUIWindowVideoBase::OnQueueItem seems to work similarly to the PlayList.add() route, but calls CGUIWindowVideoBase::AddItemToPlayList, which appears to have some recursion magic--to handle things like folders and sets, I'm guessing--that we don't have access to in the Python library. Am I correct? Is there any way to properly convert a smart playlist to a static one?
Thanks for your time...hope I explained my question well enough...hehe
Is there a way to mimic XBMC's "Queue Item" functionality in Python? I've tried:
XBMC.PlayMedia()
XBMC.PlayList().add()
Both operate in the latter fashion mentioned above
XBMC.PlayList().load()
Doesn't like the format of the smart playlist
I looked up the contextual menu in the source. CGUIWindowVideoBase::OnQueueItem seems to work similarly to the PlayList.add() route, but calls CGUIWindowVideoBase::AddItemToPlayList, which appears to have some recursion magic--to handle things like folders and sets, I'm guessing--that we don't have access to in the Python library. Am I correct? Is there any way to properly convert a smart playlist to a static one?
Thanks for your time...hope I explained my question well enough...hehe