Opening Windows and Dialogs: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ronie
No edit summary
No edit summary
(48 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{mininav|[[Development]]|[[Add-on development]]}}
You can use the ActivateWindow() [[List of Built In Functions|Built In Function]] to open a certain [[Window IDs|Window]].  
You can use the ActivateWindow() [[List of Built In Functions|Built In Function]] to open a certain [[Window IDs|Window]].  


Line 4: Line 6:


'''Example:'''
'''Example:'''
* This will take you directly to the settings section of xbmc:
* This will take you directly to the settings section/window of xbmc:
<pre>ActivateWindow(Settings)</pre>
<pre>ActivateWindow(Settings)</pre>




Some windows even allow you to jump directly to a sub-section of that window.  
Some windows allow you to jump directly to a sub-section of that window.  To do this, you can use either the sub-section's name or its path.


'''Example:'''
'''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:
* 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:
<pre>ActivateWindow(Videos,MovieTitles)</pre>
<pre>ActivateWindow(Videos,MovieTitles)</pre>
or
<pre>ActivateWindow(Videos,videodb://movies/titles/)</pre>






Below is a list of the available sub-sections in the Video- and MusicLibrary.
Below is a list of the available sub-sections in the Videos, Music, and Programs sections/windows.


=== '''VideoLibrary:''' ===
== Videos ==
{| class="wikitable"
{| class="prettytable"
! Sub-section Name !! Path
|-
|-
|VideoLibrary ||videodb://
|Root ||library://video/
|-
|-
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
|-
|-
|Movies ||videodb://1/
|Movies ||videodb://movies/
|-
|-
|MovieGenres ||videodb://1/1/
|MovieGenres ||videodb://movies/genres/
|-
|-
|MovieTitles ||videodb://1/2/
|MovieTitles ||videodb://movies/titles/
|-
|-
|MovieYears ||videodb://1/3/
|MovieYears ||videodb://movies/years/
|-
|-
|MovieActors ||videodb://1/4/
|MovieActors ||videodb://movies/actors/
|-
|-
|MovieDirectors ||videodb://1/5/
|MovieDirectors ||videodb://movies/directors/
|-
|-
|MovieStudios ||videodb://1/6/
|MovieStudios ||videodb://movies/studios/
|-
|-
|MovieSets ||videodb://1/7/
|MovieSets ||videodb://movies/sets/
|-
|-
|MovieCountries ||videodb://1/8/
|MovieCountries ||videodb://movies/countries/
|- {{frodo table row}}
|-  
|MovieTags ||videodb://1/9/ || [[Future frodo feature]] [[Category:Frodo feature]]
|MovieTags ||videodb://movies/tags/
|-
|-
|RecentlyAddedMovies ||videodb://4/
|RecentlyAddedMovies ||videodb://recentlyaddedmovies/
|-  
|-  
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
|-
|-
|TvShows ||videodb://2/
|TvShows ||videodb://tvshows/
|-
|-
|TvShowGenres ||videodb://2/1/
|TvShowGenres ||videodb://tvshows/genres/
|-
|-
|TvShowTitles ||videodb://2/2/
|TvShowTitles ||videodb://tvshows/titles/
|-
|-
|TvShowYears ||videodb://2/3/
|TvShowYears ||videodb://tvshows/years/
|-
|-
|TvShowActors ||videodb://2/4/
|TvShowActors ||videodb://tvshows/actors/
|-
|-
|TvShowStudios ||videodb://2/5/
|TvShowStudios ||videodb://tvshows/studios/
|-
|-
|RecentlyAddedEpisodes ||videodb://5/
|RecentlyAddedEpisodes ||videodb://recentlyaddedepisodes/
|-
|InProgressTvShows ||videodb://inprogresstvshows
|-
|-
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
|-
|-
|MusicVideos ||videodb://3/
|MusicVideos ||videodb://musicvideos/
|-
|-
|MusicVideoGenres ||videodb://3/1/
|MusicVideoGenres ||videodb://musicvideos/genres/
|-
|-
|MusicVideoTitles ||videodb://3/2/
|MusicVideoTitles ||videodb://musicvideos/titles/
|-
|-
|MusicVideoYears ||videodb://3/3/
|MusicVideoYears ||videodb://musicvideos/years/
|-
|-
|MusicVideoArtists ||videodb://3/4/
|MusicVideoArtists ||videodb://musicvideos/artists/
|-
|-
|MusicVideoAlbums ||videodb://3/5/
|MusicVideoAlbums ||videodb://musicvideos/albums/
|-
|-
|MusicVideoDirectors ||videodb://3/6/
|MusicVideoDirectors ||videodb://musicvideos/directors/
|-
|-
|MusicVideoStudios ||videodb://3/7/
|MusicVideoStudios ||videodb://musicvideos/studios/
|-
|-
|RecentlyAddedMusicVideos ||videodb://6/
|RecentlyAddedMusicVideos ||videodb://recentlyaddedmusicvideos/
|-
|-
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
Line 88: Line 95:
|-
|-
|Video Add-ons ||addons://sources/video/
|Video Add-ons ||addons://sources/video/
|-
|Files ||sources://video/
|-
|}
|}


=== '''MusicLibrary''' ===
== Music ==
{| class="wikitable"
{| class="prettytable"
! Sub-section Name !! Path
|-
|-
|MusicLibrary ||musicdb://
|Root ||library://music/
|-
|-
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
|-
|-
|Genres ||musicdb://1/
|Genres ||musicdb://genres/
|-
|-
|Artists ||musicdb://2/
|Artists ||musicdb://artists/
|-
|-
|Albums ||musicdb://3/
|Albums ||musicdb://albums/
|-
|-
|Songs ||musicdb://4/
|Song ||musicdb://songs/
|-
|-
|Top100 ||musicdb://5/
|Top100 ||musicdb://top100/
|-
|-
|Top100Songs ||musicdb://5/1/
|Top100Songs ||musicdb://top100/songs/
|-
|-
|Top100Albums ||musicdb://5/2/
|Top100Albums ||musicdb://top100/albums/
|-
|-
|RecentlyAddedAlbums ||musicdb://6/
|RecentlyAddedAlbums ||musicdb://recentlyaddedalbums/
|-
|-
|RecentlyPlayedAlbums ||musicdb://7/
|RecentlyPlayedAlbums ||musicdb://recentlyplayedalbums/
|-
|-
|Compilations ||musicdb://8/
|Compilations ||musicdb://compilations/
|-
|-
|Years ||musicdb://9/
|Years ||musicdb://years/
|-
|-
|Singles ||musicdb://10/
|Singles ||musicdb://singles/
|-
|-
| &nbsp; ||&nbsp;
| &nbsp; ||&nbsp;
|-
|Files ||sources://music/
|-
|-
|Playlists ||special://musicplaylists/
|Playlists ||special://musicplaylists/
|-
|-
|Music Add-ons ||addons://sources/audio/
|Music Add-ons ||addons://sources/audio/
|}
== Programs ==
{| class="prettytable"
! Sub-section Name !! Path
|-
|Addons ||addons://sources/executable/
|-
|AndroidApps ||androidapp://sources/apps/
|}
== AddonBrowser ==
{| class="prettytable"
! Sub-section Name !! Path
|-
|My add-ons ||addons://user/<type>/ (see for available types https://github.com/xbmc/xbmc/blob/master/xbmc/addons/Addon.cpp#L73)
|-
|Update available ||addons://outdated/
|-
|Currently downloading add-ons ||addons://downloading/
|-
|Recently updated ||addons://recently_updated/
|-
|Install from repository ||addons://repos/
|-
|Install from zip ||addons://install/
|-
|Search ||addons://search/
|}
== PVR ==
There are different PVR windows, one for every PVR content type (channels, recordings, timers, timer rules, search) not a single PVR window with sub sections denoting the different content types.
Currently, most PVR windows cannot be activated using user supplied paths. Support for more windows may be added in the future.
Example: <pre>ActivateWindow(TVRecordings,pvr://recordings/tv/active/FooDirectory/)</pre> will open the TV recordings window prepoulated with the recordings contained in directory FooDirectory.
{| class="prettytable"
! Window Name !! Path !! Notes !! Kodi version
|-
|TVChannels || pvr://channels/tv/<GROUPNAME> || Replace <GROUPNAME> with the name of the specific tv channel group || Kodi 19
|-
|TVGuide || pvr://channels/tv/<GROUPNAME> || Replace <GROUPNAME> with the name of the specific tv channel group || Kodi 19
|-
|TVRecordings ||pvr://recordings/tv/active/<DIRECTORY>/ || Replace <DIRECTORY> with the name of the recording directory to display
|-
|TVTimers || || ||
|-
|-
| &nbsp; ||&nbsp;
|TVTimerRules || || ||
|-
|TVSearch || || ||
|-
|RadioChannels || pvr://channels/radio/<GROUPNAME> || Replace <GROUPNAME> with the name of the specific radio channel group || Kodi 19
|-
|RadioGuide || pvr://channels/radio/<GROUPNAME> || Replace <GROUPNAME> with the name of the specific radio channel group || Kodi 19
|-
|RadioRecordings ||pvr://recordings/radio/active/<DIRECTORY>/ ||Replace <DIRECTORY> with the name of the recording directory to display
|-
|RadioTimers || || ||
|-
|RadioTimerRules || || ||
|-
|-
| &nbsp; ||lastfm://
|RadioSearch || || ||
|}
|}


[[Category:Remotes]]
== Notes ==
[[Category:Skin Development]]
<references />
 
[[Category:Skin development]]
[[Category:Add-on development]]
[[Category:Python]]
[[Category:Python]]

Revision as of 10:43, 7 July 2019

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/window of xbmc:
ActivateWindow(Settings)


Some windows allow you to jump directly to a sub-section of that window. To do this, you can use either the sub-section's name or its path.

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)

or

ActivateWindow(Videos,videodb://movies/titles/)


Below is a list of the available sub-sections in the Videos, Music, and Programs sections/windows.

Videos

Sub-section Name Path
Root library://video/
   
Movies videodb://movies/
MovieGenres videodb://movies/genres/
MovieTitles videodb://movies/titles/
MovieYears videodb://movies/years/
MovieActors videodb://movies/actors/
MovieDirectors videodb://movies/directors/
MovieStudios videodb://movies/studios/
MovieSets videodb://movies/sets/
MovieCountries videodb://movies/countries/
MovieTags videodb://movies/tags/
RecentlyAddedMovies videodb://recentlyaddedmovies/
   
TvShows videodb://tvshows/
TvShowGenres videodb://tvshows/genres/
TvShowTitles videodb://tvshows/titles/
TvShowYears videodb://tvshows/years/
TvShowActors videodb://tvshows/actors/
TvShowStudios videodb://tvshows/studios/
RecentlyAddedEpisodes videodb://recentlyaddedepisodes/
InProgressTvShows videodb://inprogresstvshows
   
MusicVideos videodb://musicvideos/
MusicVideoGenres videodb://musicvideos/genres/
MusicVideoTitles videodb://musicvideos/titles/
MusicVideoYears videodb://musicvideos/years/
MusicVideoArtists videodb://musicvideos/artists/
MusicVideoAlbums videodb://musicvideos/albums/
MusicVideoDirectors videodb://musicvideos/directors/
MusicVideoStudios videodb://musicvideos/studios/
RecentlyAddedMusicVideos videodb://recentlyaddedmusicvideos/
   
Playlists special://videoplaylists/
Video Add-ons addons://sources/video/
Files sources://video/

Music

Sub-section Name Path
Root library://music/
   
Genres musicdb://genres/
Artists musicdb://artists/
Albums musicdb://albums/
Song musicdb://songs/
Top100 musicdb://top100/
Top100Songs musicdb://top100/songs/
Top100Albums musicdb://top100/albums/
RecentlyAddedAlbums musicdb://recentlyaddedalbums/
RecentlyPlayedAlbums musicdb://recentlyplayedalbums/
Compilations musicdb://compilations/
Years musicdb://years/
Singles musicdb://singles/
   
Files sources://music/
Playlists special://musicplaylists/
Music Add-ons addons://sources/audio/

Programs

Sub-section Name Path
Addons addons://sources/executable/
AndroidApps androidapp://sources/apps/

AddonBrowser

Sub-section Name Path
My add-ons addons://user/<type>/ (see for available types https://github.com/xbmc/xbmc/blob/master/xbmc/addons/Addon.cpp#L73)
Update available addons://outdated/
Currently downloading add-ons addons://downloading/
Recently updated addons://recently_updated/
Install from repository addons://repos/
Install from zip addons://install/
Search addons://search/

PVR

There are different PVR windows, one for every PVR content type (channels, recordings, timers, timer rules, search) not a single PVR window with sub sections denoting the different content types.

Currently, most PVR windows cannot be activated using user supplied paths. Support for more windows may be added in the future.

Example:

ActivateWindow(TVRecordings,pvr://recordings/tv/active/FooDirectory/)

will open the TV recordings window prepoulated with the recordings contained in directory FooDirectory.

Window Name Path Notes Kodi version
TVChannels pvr://channels/tv/<GROUPNAME> Replace <GROUPNAME> with the name of the specific tv channel group Kodi 19
TVGuide pvr://channels/tv/<GROUPNAME> Replace <GROUPNAME> with the name of the specific tv channel group Kodi 19
TVRecordings pvr://recordings/tv/active/<DIRECTORY>/ Replace <DIRECTORY> with the name of the recording directory to display
TVTimers
TVTimerRules
TVSearch
RadioChannels pvr://channels/radio/<GROUPNAME> Replace <GROUPNAME> with the name of the specific radio channel group Kodi 19
RadioGuide pvr://channels/radio/<GROUPNAME> Replace <GROUPNAME> with the name of the specific radio channel group Kodi 19
RadioRecordings pvr://recordings/radio/active/<DIRECTORY>/ Replace <DIRECTORY> with the name of the recording directory to display
RadioTimers
RadioTimerRules
RadioSearch

Notes