XBMC will be renamed to Kodi for v14. Read here for more details

Add-on:Global Search

From Kodi
Jump to: navigation, search

Global Search
Author: ronie

Type: Program
Version: 2.0.8
Repo: XBMC.org (v13)
XBMC.org (v12)

Source: Source code
Summary: Search your library.
Home icon grey.png   ▶ Add-ons ▶ Global Search
Attention talk.png See Global Search on the XBMC Forum for more information.

This addon can find any item in your video and music library.

Contents

1 Installing

To install this add-on you must do so from the Add-on manager from within XBMC by going to:

  1. Settings
  2. Add-ons
  3. Get add-ons
  4. XBMC.org Add-ons
  5. Program Add-ons
  6. Global Search
  7. Install

2 Introduction

This script can be used as a search function

3 Skin integration

Here you can find the information needed on how to integrate this script into your skin.

3.1 Dependency

Add this to your addon.xml to make it install along with your skin.

 <requires>
   <import addon="xbmc.gui" version="3.00"/>
   <import addon="script.globalsearch" version="0.1.7"/>
 </requires>

Note: Please check on what minimum version you need and change it accordingly

3.2 Running the addon

The addon can be run in two ways: - the user executes the addon - the script executes the addon:

   RunScript(script.globalsearch)


You can specify which categories should be searched (this overrides the user preferences set in the addon settings):

   RunScript(script.globalsearch,movies=true)
   RunScript(script.globalsearch,tvshows=true&musicvideos=true&songs=true)
Available options:
  • movies
  • tvshows
  • episodes
  • musicvideos
  • artists
  • albums
  • songs

4 Available ListItems

4.1 Movies

Labels Description
ListItem.Label
ListItem.Icon
ListItem.Property(Fanart_Image)
ListItem.Property(Genre)
ListItem.Property(Plot)
ListItem.Property(Plotoutline)
ListItem.Property(Duration)
ListItem.Property(Studio)
ListItem.Property(Tagline)
ListItem.Property(Year)
ListItem.Property(Trailer)
ListItem.Property(Playcount)
ListItem.Property(Rating)
ListItem.Property(StarRating)
ListItem.Property(Mpaa)
ListItem.Property(Director)
ListItem.Property(Writer)
ListItem.Property(VideoResolution)
ListItem.Property(VideoCodec)
ListItem.Property(VideoAspect)
ListItem.Property(AudioCodec)
ListItem.Property(AudioChannels)
ListItem.Property(Path)

4.2 TV Shows

Label: TV Shows Description
ListItem.Label
ListItem.Icon
ListItem.Property(Episode)
ListItem.Property(Mpaa)
ListItem.Property(Year)
ListItem.Property(Fanart_Image)
ListItem.Property(Genre)
ListItem.Property(Plot)
ListItem.Property(Premiered)
ListItem.Property(Studio)
ListItem.Property(Rating)
ListItem.Property(StarRating)
ListItem.Property(Playcount)
ListItem.Property(Path)
TV Shows: Seasons Description
ListItem.Label
ListItem.Icon
ListItem.Property(Episode)
ListItem.Property(Fanart_Image)
ListItem.Property(TvShowTitle)
ListItem.Property(Playcount)
ListItem.Property(Path)
Labels: Episodes Description
ListItem.Label
ListItem.Icon
ListItem.Property(Episode)
ListItem.Property(Plot)
ListItem.Property(Rating)
ListItem.Property(StarRating)
ListItem.Property(Director)
ListItem.Property(Fanart_Image)
ListItem.Property(Season)
ListItem.Property(Duration)
ListItem.Property(TvShowTitle)
ListItem.Property(Premiered)
ListItem.Property(Playcount)
ListItem.Property(VideoResolution)
ListItem.Property(VideoCodec)
ListItem.Property(VideoAspect)
ListItem.Property(AudioCodec)
ListItem.Property(AudioChannels)
ListItem.Property(Path)

4.3 Musicvideos

Labels Description
ListItem.Label
ListItem.Icon
ListItem.Property(Album)
ListItem.Property(Artist)
ListItem.Property(Fanart_Image)
ListItem.Property(Director)
ListItem.Property(Genre)
ListItem.Property(Plot)
ListItem.Property(Duration)
ListItem.Property(Studio)
ListItem.Property(Year)
ListItem.Property(Playcount)
ListItem.Property(VideoResolution)
ListItem.Property(VideoCodec)
ListItem.Property(VideoAspect)
ListItem.Property(AudioCodec)
ListItem.Property(AudioChannels)
ListItem.Property(Path)

4.4 Music

Label: Artists Description
ListItem.Label
ListItem.Icon
ListItem.Property(Artist_Born)
ListItem.Property(Artist_Died)
ListItem.Property(Artist_Formed)
ListItem.Property(Artist_Disbanded)
ListItem.Property(Artist_YearsActive)
ListItem.Property(Artist_Mood)
ListItem.Property(Artist_Style)
ListItem.Property(Fanart_Image)
ListItem.Property(Artist_Genre)
ListItem.Property(Artist_Description)
ListItem.Property(Path)
Label: Albums Description
ListItem.Label
ListItem.Icon
ListItem.Property(Artist)
ListItem.Property(Album_label)
ListItem.Property(Genre)
ListItem.Property(Fanart_Image)
ListItem.Property(Album_Description)
ListItem.Property(Album_Theme)
ListItem.Property(Album_Style)
ListItem.Property(Album_Rating)
ListItem.Property(StarRating)
ListItem.Property(Album_Type)
ListItem.Property(Album_Mood)
ListItem.Property(Year)
ListItem.Property(Path)
Labels: Songs Description
ListItem.Label
ListItem.Icon
ListItem.Property(Artist)
ListItem.Property(Album)
ListItem.Property(Genre)
ListItem.Property(Comment)
ListItem.Property(Track)
ListItem.Property(Rating)
ListItem.Property(StarRating)
ListItem.Property(Playcount)
ListItem.Property(Duration)
ListItem.Property(Fanart_Image)
ListItem.Property(Year)
ListItem.Property(Path)

4.5 script-globalsearch-infodialog.xml

You can use the same labels as above, only add a 'Container(100).' prefix to them. for example:

   Container(100).ListItem.Label
   Container(100).ListItem.Property(Plot)

5 Control id's

As always, do not change or remove any of the id's mentioned below! If you want to get rid of some of them, just position them outside of the screen.

Any id not mentioned above, but used in the default xml files, can safely be changed or removed.

5.1 script-globalsearch-main.xml

control id Description
100 Main group id. All code should be included in this group. The script will set this id to hidden when playing a trailer
110 Label containing the number of found movies
111 Container for found movies
119 The script will set this id to visible when movies are found
120 Label containing the number of found tv shows
121 Container for found tv showso
129 The script will set this id to visible when tv shows are found
130 Label containing the number of found seasons
131 Container for found seasons
139 The script will set this id to visible when seasons are found
140 Label containing the number of found episodes
141 Container for found episodes
149 The script will set this id to visible when episodes are found
150 Label containing the number of found music videos
151 Container for found music videos
159 The script will set this id to visible when music videos are found
160 Label containing the number of found artists
161 Container for found artists
169 The script will set this id to visible when artists are found
170 Label containing the number of found albums
171 Container for found albums
179 The script will set this id to visible when albums are found
180 Label containing the number of found songs
181 Container for found songs
189 The script will set this id to visible when songs are found
190 'Searching...' label, visible when the script is searching
191 Search category label, visible when the script is searching
198 'No results found' label, visible when no results are found
199 'New search' button, visible when the script finished searching


5.2 script-globalsearch-infodialog.xml

control id Description
100 Hidden list containing the selected ListItem
110 The script will set this id to visible when the selected item is a movie
120 The script will set this id to visible when the selected item is a tv show
130 The script will set this id to visible when the selected item is a season
140 The script will set this id to visible when the selected item is a episode
150 The script will set this id to visible when the selected item is a music video
160 The script will set this id to visible when the selected item is a artist
170 The script will set this id to visible when the selected item is a album
180 The script will set this id to visible when the selected item is a song
191 First button (OK), but you can specify a diffrent label for it if you like
192 Second button. The script will set the button label and the visible condition
193 Third button. The script will set the button label and the visible condition

5.3 script-globalsearch-contextmenu.xml

control id Description
997 Context menu top texture
998 Context menu middle texture
999 Context menu bottom texture
1001 First context menu button, the script will handle the visible condition
1002 Second context menu button, the script will handle the visible condition
Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox