diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 04ac653..0000000 --- a/Readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Simple example plugin for Kodi mediacenter - -This is a simple yet fully functional example of a video plugin for [Kodi](http://kodi.tv) mediacenter. -Please read the comments in the plugin code for more details. -An installable .zip can be downloaded from "[Releases](https://github.com/romanvm/plugin.video.example/releases)" tab. -Do **not** try to install a .zip generated by GitHub. - -**Note**: the purpose of this example plugin is to show you how to organize and play your media content in Kodi. -The methods of obtaining such content, for example parsing websites or working with various APIs, -are beyond the scope of this example. - -The plugin uses a pre-defined set of free sample videos from [www.vidsplay.com](http://www.vidsplay.com/). - -**Warning**: the "master" branch is only compatible with Kody 19.0 ("Matrix") and above that uses Python 3 -runtime for addons. For older versions based on Python 2 see the "python2" branch. - -License: [GPL v.3](http://www.gnu.org/copyleft/gpl.html) diff --git a/addon.xml b/addon.xml index 921b040..898fafe 100644 --- a/addon.xml +++ b/addon.xml @@ -1,8 +1,8 @@ - + @@ -10,16 +10,16 @@ provider-name="Roman_V_M"> video - Example Kodi Video Plugin - An example video plugin for Kodi mediacenter. - Free sample videos are provided by www.vidsplay.com. + Reboot Your Inner Child + Reboot Your Inner Child + Reboot Your Inner Child - icon.png - fanart.jpg - resources\screenshot-01.jpg - resources\screenshot-02.jpg - resources\screenshot-03.jpg + resources/icon.png + resources/bgimg.jpg + resources/screenshot0.png + resources/screenshot1.png + resources/screenshot2.jpg - Updated with latest artwork metadata + Super secret Addon from Paul diff --git a/fanart.jpg b/fanart.jpg deleted file mode 100644 index 728657a..0000000 Binary files a/fanart.jpg and /dev/null differ diff --git a/icon.png b/icon.png deleted file mode 100644 index f3cdd9e..0000000 Binary files a/icon.png and /dev/null differ diff --git a/main.py b/main.py index 21ee70f..08693c4 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,8 @@ # Module: main -# Author: Roman V. M. -# Created on: 28.11.2014 +# Author: Paul Dino Jones +# Created on: 2022.05.03 # License: GPL v.3 https://www.gnu.org/copyleft/gpl.html -""" -Example video plugin that is compatible with Kodi 19.x "Matrix" and above -""" + import sys from urllib.parse import urlencode, parse_qsl import xbmcgui @@ -15,49 +13,16 @@ _URL = sys.argv[0] # Get the plugin handle as an integer number. _HANDLE = int(sys.argv[1]) + # Free sample videos are provided by www.vidsplay.com # Here we use a fixed set of properties simply for demonstrating purposes # In a "real life" plugin you will need to get info and links to video files/streams # from some web-site or online service. -VIDEOS = {'Animals': [{'name': 'Crab', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/crab-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/crab.mp4', - 'genre': 'Animals'}, - {'name': 'Alligator', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/alligator-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/alligator.mp4', - 'genre': 'Animals'}, - {'name': 'Turtle', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/04/turtle-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/04/turtle.mp4', - 'genre': 'Animals'} - ], - 'Cars': [{'name': 'Postal Truck', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/us_postal-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/us_postal.mp4', - 'genre': 'Cars'}, - {'name': 'Traffic', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic1-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic1.mp4', - 'genre': 'Cars'}, - {'name': 'Traffic Arrows', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic_arrows-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/traffic_arrows.mp4', - 'genre': 'Cars'} - ], - 'Food': [{'name': 'Chicken', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/bbq_chicken-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/bbqchicken.mp4', - 'genre': 'Food'}, - {'name': 'Hamburger', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/hamburger-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/hamburger.mp4', - 'genre': 'Food'}, - {'name': 'Pizza', - 'thumb': 'http://www.vidsplay.com/wp-content/uploads/2017/05/pizza-screenshot.jpg', - 'video': 'http://www.vidsplay.com/wp-content/uploads/2017/05/pizza.mp4', - 'genre': 'Food'} - ]} +VIDEOS = {'Live': [{'name': 'Nick Reboot', + 'thumb': 'https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,h_170,w_170,f_auto,b_white,q_auto:eco,dpr_1/v1412260035/rd4ity1ftukrlofrw3gw.png', + 'fanart': 'https://repo.brak.space/bgimg.jpg', + 'video': 'rtmp://nickreboot.brak.space/live/NickReboot', + 'genre': 'Live Stream'}]} def get_url(**kwargs): @@ -173,11 +138,12 @@ def list_videos(category): # 'mediatype' is needed for skin to display info for this ListItem correctly. list_item.setInfo('video', {'title': video['name'], 'genre': video['genre'], + 'fanart': video['fanart'], 'mediatype': 'video'}) # Set graphics (thumbnail, fanart, banner, poster, landscape etc.) for the list item. # Here we use the same image for all items for simplicity's sake. # In a real-life plugin you need to set each image accordingly. - list_item.setArt({'thumb': video['thumb'], 'icon': video['thumb'], 'fanart': video['thumb']}) + list_item.setArt({'thumb': video['thumb'], 'icon': video['thumb'], 'fanart': video['fanart']}) # Set 'IsPlayable' property to 'true'. # This is mandatory for playable items! list_item.setProperty('IsPlayable', 'true') @@ -194,7 +160,6 @@ def list_videos(category): # Finish creating a virtual folder. xbmcplugin.endOfDirectory(_HANDLE) - def play_video(path): """ Play a video by the provided path. @@ -235,7 +200,8 @@ def router(paramstring): else: # If the plugin is called from Kodi UI without any parameters, # display the list of video categories - list_categories() + #list_categories() + list_videos("Live") if __name__ == '__main__': diff --git a/resources/bgimg.jpg b/resources/bgimg.jpg new file mode 100644 index 0000000..95bd501 Binary files /dev/null and b/resources/bgimg.jpg differ diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000..719dd52 Binary files /dev/null and b/resources/icon.png differ diff --git a/resources/screenshot-01.jpg b/resources/screenshot-01.jpg deleted file mode 100644 index 1bec755..0000000 Binary files a/resources/screenshot-01.jpg and /dev/null differ diff --git a/resources/screenshot-02.jpg b/resources/screenshot-02.jpg deleted file mode 100644 index 71dae46..0000000 Binary files a/resources/screenshot-02.jpg and /dev/null differ diff --git a/resources/screenshot-03.jpg b/resources/screenshot-03.jpg deleted file mode 100644 index 69331a9..0000000 Binary files a/resources/screenshot-03.jpg and /dev/null differ diff --git a/resources/screenshot0.png b/resources/screenshot0.png new file mode 100644 index 0000000..6094399 Binary files /dev/null and b/resources/screenshot0.png differ diff --git a/resources/screenshot1.png b/resources/screenshot1.png new file mode 100644 index 0000000..0d5d013 Binary files /dev/null and b/resources/screenshot1.png differ diff --git a/resources/screenshot2.jpg b/resources/screenshot2.jpg new file mode 100644 index 0000000..c2e1769 Binary files /dev/null and b/resources/screenshot2.jpg differ