Kodi Community Forum
GUI.ActivateWindow and Movies (and window hierachy) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: GUI.ActivateWindow and Movies (and window hierachy) (/showthread.php?tid=379355)



GUI.ActivateWindow and Movies (and window hierachy) - bossanova808 - 2024-11-04

I have a couple questions about the GUI.ActivateWindow built-in, as I am seeing some weird behaviour. 

(Note I am getting the info I need via VideoPlayer.* info labels & these calls are happening onPlaybackStopped).

1. I am able to open the window for a TV show to a particular season using the TvShowDBID using:
videodb://tvshows/titles/{TvShowDBID}/{SeasonNumber}

...however, when I do that, it then requires me to press back twice to go back up the hierarchy - the first time I hit back it appears to go back, but just reloads that season folder.   This is janky. 
Is there a way to prevent that?  If I change it to:
videodb://tvshows/titles/{TvShowDBID}/{SeasonNumber}, return

...I then don't need the double back, but it also means there is no hierarchy - a back will go back to wherever the user was before that point.   I'd like the hierarchy to be there, but without the weird double back behaviour being required.  Is that possible?

2.  How do I do the same thing for a movie?  I presumed it was just:
videodb://movies/titles/{DBID}'

..but that is just opening the Movies root...so I think I must somehow have the wrong ID here - but I've checked, and the ID is the same as that in themovie table in the db, though.  Everything looks fine to me but it just won't work:

Code:

2024-11-05 07:42:35.844 T:25320   debug <general>: JSONRPC: Incoming request: {"jsonrpc": "2.0", "id": 1, "method": "GUI.ActivateWindow", "params": {"window": "videos", "parameters": ["videodb://movies/titles/2358", "return"]}}
2024-11-05 07:42:35.844 T:25320   debug <general>: ### Switchback 1.0.0: KODI JSON RPC result: {"id":1,"jsonrpc":"2.0","result":"OK"}

(I don't really get why there is a separate TvShowDBID and not a MovieID - and given there isn't, what ID should I be using with this to get it to open a specific movie?)


RE: GUI.ActivateWindow and Movies (and window hierachy) - bossanova808 - 2024-11-06

Anyone??

Particularly the second question - I just can't seem to get Kodi to go to a specific movie...am now testing with a keymap entry to make it much quicker, but none of these work:

ActivateWindow(videos,videodb://movies/titles/2358)
ActivateWindow(videos,library://movies/titles/2358)
ActivateWindow(videos,videodb://movies/titles/1822)
ActivateWindow(videos,videodb://movies/2358)

The ID is 100% for sure in the DB (and I have tried others just in case of a glitch with that one):

Image

...the docs here are only list the roots: https://kodi.wiki/view/Opening_Windows_and_Dialogs

I must be missing something really obvious but I just can't see it - am I going crazy or should the above be workingHuh?  How can I navigate to a specific movie?  I just don't get why it works for TV episodes but not movies....