Fix broken links

This commit is contained in:
solsTiCe d'Hiver 2017-07-19 16:41:31 +02:00
parent fc8a35428f
commit 9b9fd94051
1 changed files with 19 additions and 19 deletions

38
main.py
View File

@ -20,42 +20,42 @@ _handle = int(sys.argv[1])
# In a "real life" plugin you will need to get info and links to video files/streams # In a "real life" plugin you will need to get info and links to video files/streams
# from some web-site or online service. # from some web-site or online service.
VIDEOS = {'Animals': [{'name': 'Crab', VIDEOS = {'Animals': [{'name': 'Crab',
'thumb': 'http://www.vidsplay.com/vids/crab.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/crab-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/crab.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/crab.mp4',
'genre': 'Animals'}, 'genre': 'Animals'},
{'name': 'Alligator', {'name': 'Alligator',
'thumb': 'http://www.vidsplay.com/vids/alligator.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/alligator-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/alligator.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/alligator.mp4',
'genre': 'Animals'}, 'genre': 'Animals'},
{'name': 'Turtle', {'name': 'Turtle',
'thumb': 'http://www.vidsplay.com/vids/turtle.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/turtle-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/turtle.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/turtle.mp4',
'genre': 'Animals'} 'genre': 'Animals'}
], ],
'Cars': [{'name': 'Postal Truck', 'Cars': [{'name': 'Postal Truck',
'thumb': 'http://www.vidsplay.com/vids/us_postal.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/us_postal-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/us_postal.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/us_postal.mp4',
'genre': 'Cars'}, 'genre': 'Cars'},
{'name': 'Traffic', {'name': 'Traffic',
'thumb': 'http://www.vidsplay.com/vids/traffic1.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic1-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/traffic1.avi', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic1.mp4',
'genre': 'Cars'}, 'genre': 'Cars'},
{'name': 'Traffic Arrows', {'name': 'Traffic Arrows',
'thumb': 'http://www.vidsplay.com/vids/traffic_arrows.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic_arrows-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/traffic_arrows.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic_arrows.mp4',
'genre': 'Cars'} 'genre': 'Cars'}
], ],
'Food': [{'name': 'Chicken', 'Food': [{'name': 'Chicken',
'thumb': 'http://www.vidsplay.com/vids/chicken.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/bbq_chicken-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/bbqchicken.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/bbqchicken.mp4',
'genre': 'Food'}, 'genre': 'Food'},
{'name': 'Hamburger', {'name': 'Hamburger',
'thumb': 'http://www.vidsplay.com/vids/hamburger.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/hamburger-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/hamburger.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/hamburger.mp4',
'genre': 'Food'}, 'genre': 'Food'},
{'name': 'Pizza', {'name': 'Pizza',
'thumb': 'http://www.vidsplay.com/vids/pizza.jpg', 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/pizza-screenshot.jpg',
'video': 'http://www.vidsplay.com/vids/pizza.mp4', 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/pizza.mp4',
'genre': 'Food'} 'genre': 'Food'}
]} ]}
@ -165,7 +165,7 @@ def list_videos(category):
# This is mandatory for playable items! # This is mandatory for playable items!
list_item.setProperty('IsPlayable', 'true') list_item.setProperty('IsPlayable', 'true')
# Create a URL for a plugin recursive call. # Create a URL for a plugin recursive call.
# Example: plugin://plugin.video.example/?action=play&video=http://www.vidsplay.com/vids/crab.mp4 # Example: plugin://plugin.video.example/?action=play&video=http://www.vidsplay.com/wp-content/uploads/2017/04/crab.mp4
url = get_url(action='play', video=video['video']) url = get_url(action='play', video=video['video'])
# Add the list item to a virtual Kodi folder. # Add the list item to a virtual Kodi folder.
# is_folder = False means that this item won't open any sub-list. # is_folder = False means that this item won't open any sub-list.