The branch, frodo has been updated
via 2918e1420e2718b0e35765944d6e6c56e3d82777 (commit)
via f354fd179ec700c68288925c17c7b598df0448cb (commit)
from 00bdaa7b9deaead85102cf3b0b1f09ec058a233a (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=2918e1420e2718b0e35765944d6e6c56e3d82777
commit 2918e1420e2718b0e35765944d6e6c56e3d82777
Author: sphere <[email protected]>
Date: Tue Apr 29 10:12:29 2014 +0200
[plugin.video.metalvideo] updated to version 1.0.3
diff --git a/plugin.video.metalvideo/addon.xml
b/plugin.video.metalvideo/addon.xml
index 1b3d9fa..c0beae3 100644
--- a/plugin.video.metalvideo/addon.xml
+++ b/plugin.video.metalvideo/addon.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.metalvideo" name="Metalvideo"
provider-name="willforde" version="1.0.2">
+<addon id="plugin.video.metalvideo" name="Metalvideo"
provider-name="willforde" version="1.0.3">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
- <import addon="script.module.xbmcutil" version="2.0.2"/>
+ <import addon="script.module.xbmcutil" version="2.0.4"/>
</requires>
<extension library="addon.py" point="xbmc.python.pluginsource">
<provides>audio video</provides>
diff --git a/plugin.video.metalvideo/changelog.txt
b/plugin.video.metalvideo/changelog.txt
index 21035cf..ea30101 100644
--- a/plugin.video.metalvideo/changelog.txt
+++ b/plugin.video.metalvideo/changelog.txt
@@ -1,5 +1,11 @@
TODO: Create Unit Tests, Once I figure out how
+[B]Version 1.0.3[/B]
+- Changed the Video Context menu to not replace items
+- Fixed bug with non english language sometimes crashing the addon
+- Changed random play to continuously play the next random video (Party Mode)
+- General unicode fixes
+
[B]Version 1.0.2[/B]
- Fixed next page now showing bug. Unicode mistake
- Small Change to prepare for Unit Tests
diff --git a/plugin.video.metalvideo/resources/lib/main.py
b/plugin.video.metalvideo/resources/lib/main.py
index c87c1d9..91dd664 100644
--- a/plugin.video.metalvideo/resources/lib/main.py
+++ b/plugin.video.metalvideo/resources/lib/main.py
@@ -262,15 +262,35 @@ class VideoList(listitem.VirtualFS):
class PlayVideo(listitem.PlayMedia):
@plugin.error_handler
def resolve(self):
- # Set TTL
- if plugin["url"].endswith(u"randomizer.php"): TTL=0
- else: TTL=604800 # TTL = 1 Week
+ # When in party mode continuously play random video
+ if "partymode" in plugin:
+ # Add Current path to playlist
+ playlist = plugin.xbmc.PlayList(1)
+ playlist.add(plugin.handleThree)
+ # Return video url untouched
+ return self.find_video(0) # TTL = 1 Week
+ # When randomizer is selected start partymode
+ elif plugin["url"].endswith(u"randomizer.php"):
+ # Clear Playlist first
+ playlist = plugin.xbmc.PlayList(1)
+ playlist.clear()
+ # Return Video Player url Twice to start party mode
playlist
+ return {"url":[self.find_video(0),
plugin.handleThree+"partymode=true"]}
+
+ # Play Selected Video
+ else:
+ # Return video url untouched
+ return self.find_video(604800) # TTL = 1 Week
+
+ def find_video(self, TTL):
# Fetch Page Source
sourceCode = urlhandler.urlread(plugin["url"], TTL)
from xbmcutil import videoResolver
# Look for Youtube Video First
- videoId = [part for part in
re.findall('src="(http://www.youtube.com/embed/\S+?)"|file:\s+\'(\S+?)\'',
sourceCode)[0] if part][0]
- if u"metalvideo.com" in videoId: return {"url":videoId}
- elif u"youtube.com" in videoId: return
videoResolver.youtube_com().decode(videoId)
+ try: videoId = [part for part in
re.findall('src="(http://www.youtube.com/embed/\S+?)"|file:\s+\'(\S+?)\'',
sourceCode)[0] if part][0]
+ except: return None
+ else:
+ if u"metalvideo.com" in videoId: return {"url":videoId}
+ elif u"youtube.com" in videoId: return
videoResolver.youtube_com().decode(videoId)
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=f354fd179ec700c68288925c17c7b598df0448cb
commit f354fd179ec700c68288925c17c7b598df0448cb
Author: sphere <[email protected]>
Date: Tue Apr 29 10:03:25 2014 +0200
[plugin.video.nederland24] updated to version 4.1.0
diff --git a/plugin.video.nederland24/addon.xml
b/plugin.video.nederland24/addon.xml
index 9f7201b..e5ad850 100644
--- a/plugin.video.nederland24/addon.xml
+++ b/plugin.video.nederland24/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.nederland24" name="Nederland 24" version="4.0.0"
provider-name="bosel">
+<addon id="plugin.video.nederland24" name="Nederland 24" version="4.1.0"
provider-name="bosel">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
@@ -12,8 +12,12 @@
<description lang="en">Dutch public broadcasting offers a number of
digital theme channels available on Nederland 24. These specialized public
broadcasting channels supply specific target audiences with thematic
programming 24 hours a day. These channels provide more in-depth, broader and
supplementary content that cannot be found on the three regular public
channels. Dutch viewers decide for themselves on Nederland 24.</description>
<description lang="nl">De publieke omroep biedt het Nederlandse publiek
een aantal digitale themakanalen gebundeld in Nederland 24. Door middel van
gespecialiseerde kanalen kan de publieke omroep specifieke doelgroepen 24 uur
per dag van een thematische programmering voorzien. Het aanbod op deze kanalen
vormt een verdieping, verbreding, aanvulling en/of versterking van reguliere
uitzendingen en speelt in op het veranderende mediagedrag van het publiek. Het
Nederlandse publiek kiest zelf wat het kijkt op Nederland 24.</description>
<platform>all</platform>
- <language>nl</language>
+ <language>nl en</language>
<license>GPLv3</license>
- <disclaimer lang="en">Copyright 2011-2013 bosel.This program is free
software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version. This program
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more
details.</disclaimer>
+ <forum></forum>
+ <website>https://github.com/bosel/plugin.video.nederland24</website>
+ <email></email>
+ <source>https://github.com/bosel/plugin.video.nederland24</source>
+ <disclaimer lang="en">Copyright 2011-2014 bosel.This program is free
software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version. This program
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more
details.</disclaimer>
</extension>
</addon>
\ No newline at end of file
diff --git a/plugin.video.nederland24/changelog.txt
b/plugin.video.nederland24/changelog.txt
index b251915..c46b619 100644
--- a/plugin.video.nederland24/changelog.txt
+++ b/plugin.video.nederland24/changelog.txt
@@ -1,3 +1,7 @@
+[B]4.1.0 - Gotham[/B]
+-Reworked additional channels
+
+
[B]4.0.0 - Frodo[/B]
-substantial changes due to website alterations
-additional channels
diff --git a/plugin.video.nederland24/nederland24.py
b/plugin.video.nederland24/nederland24.py
index 124b461..5fdca7f 100644
--- a/plugin.video.nederland24/nederland24.py
+++ b/plugin.video.nederland24/nederland24.py
@@ -21,6 +21,7 @@ import urllib2
import re
import urlparse
import httplib
+from BeautifulSoup import BeautifulStoneSoup, SoupStrainer
xbmc.log("plugin.video.nederland24:: Starting Addon")
@@ -37,7 +38,7 @@ IMG_DIR =
os.path.join(settings.getAddonInfo("path"),"resources", "media")
###
API_URL = 'http://ida.omroep.nl/aapi/?stream='
BASE_URL = 'http://livestreams.omroep.nl/live/npo/'
-USER_AGENT = 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46
(KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3'
+USER_AGENT = 'Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X)
AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465
Safari/9537.53'
CHANNELS = [
@@ -61,13 +62,19 @@ def index():
if settings.getSetting( channel[0] )=='true' and settings.getSetting(
"GEOIP" )=='false':
addLink(channel[0],channel[2], "playVideo", os.path.join(IMG_DIR,
channel[1]), channel[3])
else:
- print ""
- #xbmc.log("plugin.video.nederland24:: %s not selected" %
str(channel[0]))
- if settings.getSetting( "Additional Journaal Channels" )=='true':
- additionalChannels()
+ #print ""
+ xbmc.log("plugin.video.nederland24:: %s not set (GEOIP)" %
str(channel[0]))
+ if int(settings.getSetting ( "Depth_Acht" ))!=0:
+ url='http://feeds.nos.nl/journaal20uur'
+ depth=int(settings.getSetting ( "Depth_Acht" ))
+ additionalChannels(url, depth)
+ if int(settings.getSetting ( "Depth_Jeugd" ))!=0:
+ url='http://feeds.nos.nl/vodcast_jeugdjournaal'
+ depth=int(settings.getSetting ( "Depth_Jeugd" ))
+ additionalChannels(url, depth)
else:
- print ""
- #xbmc.log("plugin.video.nederland24:: Additional channels not selected"
+ #print ""
+ xbmc.log("plugin.video.nederland24:: No additional channels set")
xbmcplugin.endOfDirectory(pluginhandle)
def resolve_http_redirect(url, depth=0):
@@ -104,7 +111,8 @@ def addLink(name, url, mode, iconimage, description):
liz = xbmcgui.ListItem(name, iconImage="DefaultVideo.png",
thumbnailImage=iconimage)
liz.setInfo(type="Video", infoLabels={"Title": name,
"Plot":description,
- "TVShowTitle":name
+ "TVShowTitle":name,
+ "Playcount": 0,
})
liz.setProperty("fanart_image", os.path.join(IMG_DIR, "fanart.png"))
@@ -112,23 +120,20 @@ def addLink(name, url, mode, iconimage, description):
ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u,
listitem=liz)
return ok
-def additionalChannels():
- link_re = re.compile(r'<a.*?</a>', re.S)
- video_re = re.compile(r'http://.*\.mp4')
- title_re = re.compile(r'<h3>(.*?)</h3>')
- meta_re = re.compile(r'<p class="video-meta">(.*?)</p>')
- img_re = re.compile(r'<img src="(.*?)"')
-
- URL='http://tv.nos.nl'
- html=urllib2.urlopen(URL).read()
- for (a, video_url) in zip(link_re.findall(html), video_re.findall(html)):
- a = a.replace('\n', '')
- title = title_re.search(a).group(1).strip()
- meta = ', '.join([meta_part.strip() for meta_part in re.sub(r'\s+', ' ',
meta_re.search(a).group(1)).split('<br />')])
- #img = URL + '/browser/' + img_re.search(a).group(1).strip()
- img = os.path.join(IMG_DIR, "placeholder24.png")
- #title = title + ' - ' + meta
- addLink(title, video_url, "playVideo", img, meta)
+def additionalChannels(url, depth):
+ i = 0
+ #depth = depth
+ URL = url
+ #URL = 'http://feeds.nos.nl/journaal'
+ items = SoupStrainer('item')
+ for tag in BeautifulStoneSoup(urllib2.urlopen(URL).read(),
parseOnlyThese=items):
+ title = tag.title.contents[0]
+ url = tag.guid.contents[0]
+ img = os.path.join(IMG_DIR, "placeholder24.png")
+ addLink(title, url, "playVideo", img, '')
+ i += 1
+ if i == int(depth):
+ break
def playVideo(url):
media = url
diff --git a/plugin.video.nederland24/resources/language/Dutch/strings.xml
b/plugin.video.nederland24/resources/language/Dutch/strings.xml
index c5bd516..5383300 100644
--- a/plugin.video.nederland24/resources/language/Dutch/strings.xml
+++ b/plugin.video.nederland24/resources/language/Dutch/strings.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!--Category-->
<string id="30100">Kanalenkiezer</string>
@@ -15,7 +16,8 @@
<string id="30112">Nederland 2</string>
<string id="30113">Nederland 3</string>
<string id="30114">3FM Live Radio</string>
- <string id="30116">Additionele Journaal Kanalen</string>
+ <string id="30151">Achtuurjournaal, aantal afleveringen</string>
+ <string id="30152">Jeugdjournaal, aantal afleveringen</string>
<!--Bandwidth-->
<string id="30202">Door GEOIP tot Nederland beperkte kanalen
uitschakelen</string>
</strings>
diff --git a/plugin.video.nederland24/resources/language/English/strings.xml
b/plugin.video.nederland24/resources/language/English/strings.xml
index f5e0b26..77490eb 100644
--- a/plugin.video.nederland24/resources/language/English/strings.xml
+++ b/plugin.video.nederland24/resources/language/English/strings.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!--Category-->
<string id="30100">Enabled Channels</string>
@@ -15,7 +16,8 @@
<string id="30112">Nederland 2</string>
<string id="30113">Nederland 3</string>
<string id="30114">3FM Live Radio</string>
- <string id="30116">Additional Journaal Channels</string>
+ <string id="30151">Achtuurjournaal, number of previous episodes</string>
+ <string id="30152">Jeugdjournaal, number of previous episodes</string>
<!--Bandwidth-->
<string id="30202">Disable GEOIP restricted channels (for usage outside
of the Netherlands)</string>
</strings>
diff --git a/plugin.video.nederland24/resources/settings.xml
b/plugin.video.nederland24/resources/settings.xml
index 9bf46c2..2effb06 100644
--- a/plugin.video.nederland24/resources/settings.xml
+++ b/plugin.video.nederland24/resources/settings.xml
@@ -14,7 +14,8 @@
<setting id="Nederland 2" label="30112" type="bool" default="true" />
<setting id="Nederland 3" label="30113" type="bool" default="true" />
<setting id="3FM" label="30114" type="bool" default="false" />
- <setting id="Additional Journaal Channels" label="30116" type="bool"
default="false" />
+ <setting id="Depth_Acht" label="30151" type="slider" default="1"
range="0,1,10" option="int" />
+ <setting id="Depth_Jeugd" label="30152" type="slider" default="1"
range="0,1,10" option="int" />
</category>
<!--Bandwith-->
<category label="30200">
-----------------------------------------------------------------------
Summary of changes:
plugin.video.metalvideo/addon.xml | 4 +-
plugin.video.metalvideo/changelog.txt | 6 ++
plugin.video.metalvideo/resources/lib/main.py | 32 +++++++++--
plugin.video.nederland24/addon.xml | 10 +++-
plugin.video.nederland24/changelog.txt | 4 ++
plugin.video.nederland24/nederland24.py | 55 +++++++++++---------
.../resources/language/Dutch/strings.xml | 4 +-
.../resources/language/English/strings.xml | 4 +-
plugin.video.nederland24/resources/settings.xml | 3 +-
9 files changed, 83 insertions(+), 39 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons