aboutsummaryrefslogtreecommitdiff
path: root/addons/metadata.demo.movies
diff options
context:
space:
mode:
authorphate89 <phates89@gmail.com>2017-02-02 18:04:30 +0100
committerphate89 <phates89@gmail.com>2018-02-18 12:37:29 +0100
commitc1dd82b736a402f32f95cfa2faf47838e03cdf18 (patch)
tree5c009df40460a25dded244c801da25a25f36a33e /addons/metadata.demo.movies
parentc946a1c849b116147ddae7758bf7aeeb7a56e8b4 (diff)
Use our existing python api to set info in video python scrapers
Diffstat (limited to 'addons/metadata.demo.movies')
-rw-r--r--addons/metadata.demo.movies/demo.py97
1 files changed, 37 insertions, 60 deletions
diff --git a/addons/metadata.demo.movies/demo.py b/addons/metadata.demo.movies/demo.py
index 06aa7352fa..09b6d437cb 100644
--- a/addons/metadata.demo.movies/demo.py
+++ b/addons/metadata.demo.movies/demo.py
@@ -46,71 +46,48 @@ elif action == 'getdetails':
url=urllib.unquote_plus(params["url"])
if url == '/path/to/movie':
liz=xbmcgui.ListItem('Demo movie 1', offscreen=True)
- liz.setProperty('video.original_title', 'Demo måvie 1')
- liz.setProperty('video.sort_title', '2')
- liz.setProperty('video.ratings', '1')
- liz.setProperty('video.rating1.value', '5')
- liz.setProperty('video.rating1.votes', '100')
- liz.setProperty('video.user_rating', '5')
- liz.setProperty('video.top250', '3')
- liz.setProperty('video.unique_id', '123')
- liz.setProperty('video.imdb_id', '456')
- liz.setProperty('video.plot_outline', 'Outline yo')
- liz.setProperty('video.plot', 'Plot yo')
- liz.setProperty('video.tag_line', 'Tag yo')
- liz.setProperty('video.duration_minutes', '110')
- liz.setProperty('video.mpaa', 'T')
- liz.setProperty('video.trailer', '/home/akva/Videos/porn/bukkake.mkv')
- liz.setProperty('video.thumbs', '2')
- liz.setProperty('video.thumb1.url', 'DefaultBackFanart.png')
- liz.setProperty('video.thumb1.aspect', 'poster')
- liz.setProperty('video.thumb2.url', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.thumb2.aspect', 'banner')
- liz.setProperty('video.genre','Action / Comedy')
- liz.setProperty('video.country', 'Norway / Sweden / China')
- liz.setProperty('video.writing_credits', 'None / Want / To Admit It')
- liz.setProperty('video.director', 'spiff / spiff2')
- liz.setProperty('video.tvshow_links' ,'Demo show 1')
- liz.setProperty('video.actors', '2')
- liz.setProperty('video.actor1.name', 'spiff')
- liz.setProperty('video.actor1.role', 'himself')
- liz.setProperty('video.actor1.sort_order', '2')
- liz.setProperty('video.actor1.thumb', '/home/akva/Pictures/fish.jpg')
- liz.setProperty('video.actor1.thumb_aspect', 'banner')
- liz.setProperty('video.actor2.name', 'monkey')
- liz.setProperty('video.actor2.role', 'orange')
- liz.setProperty('video.actor2.sort_order', '1')
- liz.setProperty('video.actor1.thumb_aspect', 'poster')
- liz.setProperty('video.actor2.thumb', '/home/akva/Pictures/coffee.jpg')
- liz.setProperty('video.set_name', 'Spiffy creations')
- liz.setProperty('video.set_overview', 'Horrors created by spiff')
- liz.setProperty('video.tags', 'Very / Bad')
- liz.setProperty('video.studio', 'Studio1 / Studio2')
- liz.setProperty('video.fanarts', '2')
- liz.setProperty('video.fanart1.url', 'DefaultBackFanart.png')
- liz.setProperty('video.fanart1.preview', 'DefaultBackFanart.png')
- liz.setProperty('video.fanart1.dim', '720')
- liz.setProperty('video.fanart2.url', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.fanart2.preview', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.fanart2.dim', '1080')
- liz.setProperty('video.date_added', '2016-01-01')
+ liz.setInfo('video',
+ {'title': 'Demo movie 1',
+ 'originaltitle': 'Demo måvie 1',
+ 'sorttitle': '2',
+ 'userrating': 5,
+ 'top250': 3,
+ 'plotoutline': 'Outline yo',
+ 'plot': 'Plot yo',
+ 'tagline': 'Tag yo',
+ 'duration': 110,
+ 'mpaa': 'T',
+ 'trailer': '/home/akva//porn/bukkake.mkv',
+ 'genre': ['Action', 'Comedy'],
+ 'country': ['Norway', 'Sweden', 'China'],
+ 'credits': ['None', 'Want', 'To Admit It'],
+ 'director': ['spiff', 'spiff2'],
+ 'set': 'Spiffy creations',
+ 'setoverview': 'Horrors created by spiff',
+ 'studio': ['Studio1', 'Studio2'],
+ 'dateadded': '2016-01-01',
+ 'premiered': '2015-01-01',
+ 'showlink': ['Demo show 1']
+ })
+ #todo: missing actor thumb aspect
+ liz.setRating("imdb", 9, 100000, True )
+ liz.setRating("themoviedb", 8.9, 1000)
+ liz.setUniqueIDs({ 'imdb': 'tt8938399', 'tmdb' : '9837493' }, 'imdb')
+ liz.setCast([{'name': 'spiff', 'role': 'himself', 'thumbnail': '/home/akva/Pictures/fish.jpg', 'order': 2},
+ {'name': 'monkey', 'role': 'orange', 'thumbnail': '/home/akva/Pictures/coffee.jpg', 'order': 1}])
+ liz.addAvailableArtwork('DefaultBackFanart.png', 'banner')
+ liz.addAvailableArtwork('/home/akva/Pictures/hawaii-shirt.png', 'poster')
+ liz.setAvailableFanart([{'image': 'DefaultBackFanart.png', 'preview': 'DefaultBackFanart.png'},
+ {'image': '/home/akva/Pictures/hawaii-shirt.png', 'preview': '/home/akva/Pictures/hawaii-shirt.png'}])
xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=liz)
elif action == 'getartwork':
url=urllib.unquote_plus(params["id"])
if url == '456':
liz=xbmcgui.ListItem('Demo movie 1', offscreen=True)
- liz.setProperty('video.thumbs', '2')
- liz.setProperty('video.thumb1.url', 'DefaultBackFanart.png')
- liz.setProperty('video.thumb1.aspect', 'poster')
- liz.setProperty('video.thumb2.url', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.thumb2.aspect', 'banner')
- liz.setProperty('video.fanarts', '2')
- liz.setProperty('video.fanart1.url', 'DefaultBackFanart.png')
- liz.setProperty('video.fanart1.preview', 'DefaultBackFanart.png')
- liz.setProperty('video.fanart1.dim', '720')
- liz.setProperty('video.fanart2.url', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.fanart2.preview', '/home/akva/Pictures/hawaii-shirt.png')
- liz.setProperty('video.fanart2.dim', '1080')
+ liz.addAvailableArtwork('DefaultBackFanart.png', 'banner')
+ liz.addAvailableArtwork('/home/akva/Pictures/hawaii-shirt.png', 'poster')
+ liz.setAvailableFanart([{'image': 'DefaultBackFanart.png', 'preview': 'DefaultBackFanart.png'},
+ {'image': '/home/akva/Pictures/hawaii-shirt.png', 'preview': '/home/akva/Pictures/hawaii-shirt.png'}])
xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=liz)
elif action == 'nfourl':
nfo=urllib.unquote_plus(params["nfo"])