From 08d019dd0867f663cb1cf01eed9b539978a9a7f6 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 17 Apr 2019 11:55:34 +0100 Subject: [PATCH] default.py --- addon.xml | 4 ++-- default.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 default.py diff --git a/addon.xml b/addon.xml index 1b794b0..8dd8652 100644 --- a/addon.xml +++ b/addon.xml @@ -18,8 +18,8 @@ New.nbdom.net is an independent, listener-supported alternative news source. It operates on the principle of open source intelligence and provides podcasts, interviews, articles and videos about breaking news and important issues from 9/11 Truth and false flag terror to the Big Brother police state, eugenics, geopolitics, the central banking fraud and more.. en all - GNU GENERAL PUBLIC LICENSE. Version 3, June 2007 - http://forum.xbmc.org/showthread.php?tid=177772 + GPL-2.0 + http://news.nbdom.net/ http://news.nbdom.net/plugin.zip diff --git a/default.py b/default.py new file mode 100644 index 0000000..c8622ad --- /dev/null +++ b/default.py @@ -0,0 +1,22 @@ +import sys +import xbmcgui +import xbmcplugin +import urllib,urllib2,re + +addon_handle = int(sys.argv[1]) + +xbmcplugin.setContent(addon_handle, 'movies') + +url = 'http://localhost/some_video.mkv' +li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png') +xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li) + +xbmcplugin.endOfDirectory(addon_handle) + +def getUrl(url): + req = urllib2.Request(url) + req.add_header('User-Agent', 'Kodi') + response = urllib2.urlopen(req) + content = response.read() + response.close() + return content -- 2.47.3