Opening Windows and Dialogs

From Official Kodi Wiki
Revision as of 20:15, 2 August 2014 by Ned Scott (talk | contribs)
Jump to navigation Jump to search
Home icon grey.png   ▶ Development ▶ Add-on development ▶ Opening Windows and Dialogs

You can use the ActivateWindow() Built In Function to open a certain Window.

This command can be assigned to a button in a skin or mapped to a key in your Keymap.

Example:

  • This will take you directly to the settings section of xbmc:
ActivateWindow(Settings)


Some windows even allow you to jump directly to a sub-section of that window.

Example:

  • If you want a button in your skin or on your remote to take you directly to the movie listing, you let that button do:
ActivateWindow(Videos,MovieTitles)


Below is a list of the available sub-sections in the Video- and MusicLibrary.

VideoLibrary

section frodo gotham
VideoLibrary videodb:// videodb://
     
Movies videodb://1/ videodb://movies/
MovieGenres videodb://1/1/ videodb://movies/genres/
MovieTitles videodb://1/2/ videodb://movies/titles/
MovieYears videodb://1/3/ videodb://movies/years/
MovieActors videodb://1/4/ videodb://movies/actors/
MovieDirectors videodb://1/5/ videodb://movies/directors/
MovieStudios videodb://1/6/ videodb://movies/studios/
MovieSets videodb://1/7/ videodb://movies/sets/
MovieCountries videodb://1/8/ videodb://movies/countries/
MovieTags videodb://1/9/ videodb://movies/tags/
RecentlyAddedMovies videodb://4/ videodb://recentlyaddedmovies/
     
TvShows videodb://2/ videodb://tvshows/
TvShowGenres videodb://2/1/ videodb://tvshows/genres/
TvShowTitles videodb://2/2/ videodb://tvshows/titles/
TvShowYears videodb://2/3/ videodb://tvshows/years/
TvShowActors videodb://2/4/ videodb://tvshows/actors/
TvShowStudios videodb://2/5/ videodb://tvshows/studios/
RecentlyAddedEpisodes videodb://5/ videodb://recentlyaddedepisodes/
     
MusicVideos videodb://3/ videodb://musicvideos/
MusicVideoGenres videodb://3/1/ videodb://musicvideos/genres/
MusicVideoTitles videodb://3/2/ videodb://musicvideos/titles/
MusicVideoYears videodb://3/3/ videodb://musicvideos/years/
MusicVideoArtists videodb://3/4/ videodb://musicvideos/artists/
MusicVideoAlbums videodb://3/5/ videodb://musicvideos/albums/
MusicVideoDirectors videodb://3/6/ videodb://musicvideos/directors/
MusicVideoStudios videodb://3/7/ videodb://musicvideos/studios/
RecentlyAddedMusicVideos videodb://6/ videodb://recentlyaddedmusicvideos/
     
Playlists special://videoplaylists/ special://videoplaylists/
Video Add-ons addons://sources/video/ addons://sources/video/
Files sources://video/ sources://video/

MusicLibrary

section frodo gotham
MusicLibrary musicdb:// musicdb://
     
Genres musicdb://1/ musicdb://genres/
Artists musicdb://2/ musicdb://artists/
Albums musicdb://3/ musicdb://albums/
Songs musicdb://4/ musicdb://songs/
Top100 musicdb://5/ musicdb://top100/
Top100Songs musicdb://5/1/ musicdb://top100/songs/
Top100Albums musicdb://5/2/ musicdb://top100/albums/
RecentlyAddedAlbums musicdb://6/ musicdb://recentlyaddedalbums/
RecentlyPlayedAlbums musicdb://7/ musicdb://recentlyplayedalbums/
Compilations musicdb://8/ musicdb://compilations/
Years musicdb://9/ musicdb://years/
Singles musicdb://10/ musicdb://singles/
     
Playlists special://musicplaylists/ special://musicplaylists/
Music Add-ons addons://sources/audio/ addons://sources/audio/

Programs =

section frodo gotham
Programs
     
Addons addons://sources/executable/ addons://sources/executable/
AndroidApps [1] androidapp://sources/apps/

Notes

  1. "AndroidApps" is not a true sub-section name, so it can't be used in the context ActivateWindow(window,sub-section). You must instead use ActivateWindow(window,dir), using the full path.