forked from phil65/context.extendedinfo.dialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addon.py
27 lines (19 loc) · 2.1 KB
/
addon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
import xbmc
def main():
if xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,movie) + !String.IsEmpty(ListItem.DBID)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedinfo,dbid=%s,id=%s)' % (xbmc.getInfoLabel('ListItem.DBID'),xbmc.getInfoLabel('ListItem.IMDBNumber')))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,movie)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedinfo,name=\'"%s"\',year=%s)' % (xbmc.getInfoLabel('ListItem.Title'),xbmc.getInfoLabel('ListItem.Year')))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,tvshow) + !String.IsEmpty(ListItem.IMDBNumber) + !String.StartsWith(ListItem.IMDBNumber,tt)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedtvinfo,id=%s)' % xbmc.getInfoLabel('ListItem.IMDBNumber'))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,tvshow)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedtvinfo,name=\'"%s"\',name=\'"%s"\',year=%s)' % (xbmc.getInfoLabel('ListItem.TVShowTitle'),xbmc.getInfoLabel('ListItem.OriginalTitle'),xbmc.getInfoLabel('ListItem.Year')))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,season)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=seasoninfo,dbid=%s,tvshow=\'"%s"\',season=%s)' % (xbmc.getInfoLabel('ListItem.DBID'),xbmc.getInfoLabel('ListItem.TVShowTitle'),xbmc.getInfoLabel('ListItem.Season')))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,episode)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedepisodeinfo,dbid=%s,tvshow=\'"%s"\',season=%s,episode=%s)' % (xbmc.getInfoLabel('ListItem.DBID'),xbmc.getInfoLabel('ListItem.TVShowTitle'),xbmc.getInfoLabel('ListItem.Season'),xbmc.getInfoLabel('ListItem.Episode')))
elif xbmc.getCondVisibility('String.IsEqual(ListItem.DBType,actor) | String.IsEqual(ListItem.DBType,director)'):
xbmc.executebuiltin('RunScript(script.extendedinfo,info=extendedactorinfo,name=\'"%s"\')' % xbmc.getInfoLabel('ListItem.Label'))
if __name__ == '__main__':
main()