The branch, dharma has been updated
via 48fa3cc192385b8baa6e77a727499173ebbfdb65 (commit)
from a3ffa70de26ba96873f817557e6f36683a2c84b4 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=48fa3cc192385b8baa6e77a727499173ebbfdb65
commit 48fa3cc192385b8baa6e77a727499173ebbfdb65
Author: spiff <[email protected]>
Date: Thu Jan 12 19:51:02 2012 +0100
[plugin.video.jupiterbroadcasting] updated to version 1.4.0
diff --git a/.gitignore b/.gitignore
index 31f7eef..b4e19e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -87,3 +87,4 @@ plugin.video.tmz/.git
plugin.video.leafstv/.git
plugin.audio.sverigesradio/.git
plugin.video.radbox/.git
+plugin.video.jupiterbroadcasting/.git
diff --git a/plugin.video.jupiterbroadcasting/addon.xml
b/plugin.video.jupiterbroadcasting/addon.xml
index 4e10f3b..5e3776f 100644
--- a/plugin.video.jupiterbroadcasting/addon.xml
+++ b/plugin.video.jupiterbroadcasting/addon.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.jupiterbroadcasting"
name="Jupiter Broadcasting"
- version="1.3.0"
+ version="1.4.0"
provider-name="Rob Loach">
<requires>
<import addon="xbmc.python" version="1.0"/>
+ <import addon="script.module.beautifulsoup" version="3.0.8"/>
</requires>
<extension point="xbmc.python.pluginsource"
library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
- <summary>Jupiter Broadcasting video plugin</summary>
- <description>Shows from the Jupiter Broadcasting Network including the
Linux Action Show, STOked, TechSNAP and more.</description>
+ <summary>Jupiter Broadcasting video addon</summary>
+ <description>Watch shows from the Jupiter Broadcasting Network including
the Linux Action Show, STOked, TechSNAP and more.</description>
<platform>all</platform>
</extension>
</addon>
diff --git a/plugin.video.jupiterbroadcasting/changelog.txt
b/plugin.video.jupiterbroadcasting/changelog.txt
index 9847d41..c76ca68 100644
--- a/plugin.video.jupiterbroadcasting/changelog.txt
+++ b/plugin.video.jupiterbroadcasting/changelog.txt
@@ -1,3 +1,12 @@
+[B]Version 1.4.0[/B]
+- New show: FauxShow
+- New show: In Depth Look
+- Fan art
+- Configurable video quality
+- Thumbnail support once ChrisLAS adds them
+- Switched from FeedParser to BeautifulSoup for feed aggregation
+- Various small fixes
+
[B]Version 1.3.0[/B]
- Moved to GitHub for version control
- New show: Live
diff --git a/plugin.video.jupiterbroadcasting/default.py
b/plugin.video.jupiterbroadcasting/default.py
index c84baaa..34035ac 100644
--- a/plugin.video.jupiterbroadcasting/default.py
+++ b/plugin.video.jupiterbroadcasting/default.py
@@ -1,120 +1,212 @@
import urllib,urllib2,re,xbmcplugin,xbmcgui,xbmcaddon
from time import strftime
+from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup
__settings__ = xbmcaddon.Addon(id='plugin.video.jupiterbroadcasting')
__language__ = __settings__.getLocalizedString
def CATEGORIES():
- plugins = {}
- plugins[__language__(30006)] = {
- 'feed':
'http://feeds2.feedburner.com/AllJupiterVideos?format=xml',
- 'image':
'http://images2.wikia.nocookie.net/__cb20110118004527/jupiterbroadcasting/images/2/24/JupiterBadgeGeneric.jpg',
- 'plot': 'All the latest videos from Jupiter Broadcasting.',
- 'genre': 'Technology'
- }
- plugins[__language__(30000)] = {
- 'feed':
'http://feeds.feedburner.com/computeractionshowvideo?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/LAS-VIDEO.jpg',
- 'plot': 'The Linux Action Show covers the latest news in free
and open source software, especially Linux.',
- 'genre': 'Technology'
- }
- plugins[__language__(30001)] = {
- 'feed':
'http://feeds2.feedburner.com/jupiterbeeristasty-hd?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/beeristasty/BeerisTasty-iTunesBadgeHD.png',
- 'plot': 'Finding interesting combinations of food and beer.',
- 'genre': 'Technology'
- }
- plugins[__language__(30002)] = {
- 'feed': 'http://feeds.feedburner.com/stokedhd?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/STOked-BadgeHD.png',
- 'plot': 'All the news about Star Trek Online you would ever
need.',
- 'genre': 'Technology'
- }
- plugins[__language__(30003)] = {
- 'feed': 'http://feeds.feedburner.com/lotsovideo?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/LOTSOiTunesVideo144.jpg',
- 'plot': 'Video games, reviews and coverage.',
- 'genre': 'Technology'
- }
- plugins[__language__(30004)] = {
- 'feed': 'http://feeds.feedburner.com/jupiternitehd?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/JANBADGE-LVID.jpg',
- 'plot': 'Jupiter Broadcasting hooliganisms covered in front of
a live audience on the intertubes.',
- 'genre': 'Technology'
- }
- plugins[__language__(30005)] = {
- 'feed': 'http://feeds.feedburner.com/ldf-video?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/LDF-FullStill144x139.jpg',
- 'plot': 'Bryan takes a peek into alien life.',
- 'genre': 'Technology'
- }
- plugins[__language__(30007)] = {
- 'feed': 'http://feeds.feedburner.com/MMOrgueHD?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/MMOrgueBadgeHD144.jpg',
- 'plot': 'The MMOrgue is a show presented by Jeremy about
Massively Multiplayer Online (MMO) games.',
- 'genre': 'Technology'
- }
- plugins[__language__(30008)] = {
- 'feed': 'http://feeds.feedburner.com/techsnaphd?format=xml',
- 'image':
'http://images3.wikia.nocookie.net/jupiterbroadcasting/images/d/d6/Techsnapcenter.jpg',
- 'plot': 'TechSNAP is a show about technology news hosted by
Chris Fisher and Allan Jude which records live on Thursdays and is released on
the following Monday.',
- 'genre': 'Technology'
- }
- plugins[__language__(30009)] = {
- 'feed': 'http://feeds.feedburner.com/scibytehd?format=xml',
- 'image':
'http://www.jupiterbroadcasting.com/images/SciByteBadgeHD.jpg',
- 'plot': 'SciByte is a show about science topics presented by
Heather and Jeremy.',
- 'genre': 'Science'
- }
- # @TODO: Add FauxShow?
- #plugins[__language__(30011)] = {
- # 'feed': 'http://blip.tv/fauxshow/rss/itunes',
- # 'image':
'http://images3.wikia.nocookie.net/__cb20110422002134/jupiterbroadcasting/images/0/0b/Fauxshow.jpg',
- # 'plot': 'The FauxShow is not a real show, but a social
experience. Unlike most of the shows on the network, the FauxShow has no
defined subject and the topic varies week to week.',
- # 'genre': 'Humour'
- #}
-
- # Add Jupiter Broadcasting Live via Justin.tv?
- info = {}
- info['title'] = __language__(30010)
- info['plot'] = __language__(30012)
- info['genre'] = 'Technology'
- info['count'] = 1
- addLink(__language__(30010),
'rtsp://videocdn-us.geocdn.scaleengine.net/jblive/jblive.stream', '',
'http://images2.wikia.nocookie.net/__cb20110118004527/jupiterbroadcasting/images/2/24/JupiterBadgeGeneric.jpg',
info)
-
- # Loop through each of the shows and add them as directories.
- x = 2
- for name, data in plugins.iteritems():
- data['count'] = x
- x = x + 1
- addDir(name, data['feed'], 1, data['image'], data)
+ # List all the shows.
+ shows = {}
+
+ # All Shows
+ shows[__language__(30006)] = {
+ 'feed': 'http://feeds2.feedburner.com/AllJupiterVideos?format=xml',
+ 'feed-low': 'http://feeds2.feedburner.com/AllJupiterVideos?format=xml',
+ 'image':
'http://images2.wikia.nocookie.net/__cb20110118004527/jupiterbroadcasting/images/2/24/JupiterBadgeGeneric.jpg',
+ 'plot': __language__(30206),
+ 'genre': 'Technology'
+ }
+
+ # Linux Action Show
+ shows[__language__(30000)] = {
+ 'feed':
'http://feeds.feedburner.com/computeractionshowvideo?format=xml',
+ 'feed-low':
'http://feeds.feedburner.com/linuxactionshowipodvid?format=xml',
+ 'image': 'http://www.jupiterbroadcasting.com/images/LAS-VIDEO.jpg',
+ 'plot': __language__(30200),
+ 'genre': 'Technology'
+ }
+
+ # STOked
+ shows[__language__(30002)] = {
+ 'feed': 'http://feeds.feedburner.com/stokedhd?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/stokedipod?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/STOked-BadgeHD.png',
+ 'plot': __language__(30202),
+ 'genre': 'Technology'
+ }
+
+ # TechSnap
+ shows[__language__(30008)] = {
+ 'feed': 'http://feeds.feedburner.com/techsnaphd?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/techsnapmobile?format=xml',
+ 'image':
'http://images3.wikia.nocookie.net/jupiterbroadcasting/images/d/d6/Techsnapcenter.jpg',
+ 'plot': __language__(30208),
+ 'genre': 'Technology'
+ }
+
+ # SCIbyte
+ shows[__language__(30009)] = {
+ 'feed': 'http://feeds.feedburner.com/scibytehd?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/scibytemobile?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/SciByteBadgeHD.jpg',
+ 'plot': __language__(30209),
+ 'genre': 'Science'
+ }
+
+ # In Depth Look
+ shows[__language__(30014)] = {
+ 'feed': 'http://www.jupiterbroadcasting.com/feeds/indepthlookihd.xml',
+ 'feed-low':
'http://www.jupiterbroadcasting.com/feeds/indepthlookmob.xml',
+ 'image':
'http://images4.wikia.nocookie.net/jupiterbroadcasting/images/3/33/Indepthlook.jpg',
+ 'plot': __language__(30214),
+ 'genre': 'Technology'
+ }
+
+ # FauxShow
+ shows[__language__(30011)] = {
+ 'feed': 'http://blip.tv/fauxshow/rss/itunes',
+ 'feed-low': 'http://blip.tv/fauxshow/rss/itunes',
+ 'image': 'http://a.images.blip.tv/FauxShow-300x300_show_image205.png',
+ 'plot': __language__(30211),
+ 'genre': 'Humour'
+ }
+
+ # Jupiter@Nite
+ shows[__language__(30004)] = {
+ 'feed': 'http://feeds.feedburner.com/jupiternitehd?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/jupiternitehd?format=xml',
+ 'image': 'http://www.jupiterbroadcasting.com/images/JANBADGE-LVID.jpg',
+ 'plot': __language__(30204),
+ 'genre': 'Technology'
+ }
+
+ # MMOrgue
+ shows[__language__(30007)] = {
+ 'feed': 'http://feeds.feedburner.com/MMOrgueHD?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/MMOrgueHD?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/MMOrgueBadgeHD144.jpg',
+ 'plot': __language__(30207),
+ 'genre': 'Technology'
+ }
+
+ # LOTSO
+ shows[__language__(30003)] = {
+ 'feed': 'http://feeds.feedburner.com/lotsovideo?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/lotsovideo?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/LOTSOiTunesVideo144.jpg',
+ 'plot': __language__(30203),
+ 'genre': 'Technology'
+ }
+
+ # Beer is Tasty
+ shows[__language__(30001)] = {
+ 'feed':
'http://feeds2.feedburner.com/jupiterbeeristasty-hd?format=xml',
+ 'feed-low':
'http://feeds2.feedburner.com/jupiterbeeristasty-hd?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/beeristasty/BeerisTasty-iTunesBadgeHD.png',
+ 'plot': __language__(30201),
+ 'genre': 'Technology'
+ }
+
+ # Jupiter Files
+ shows[__language__(30005)] = {
+ 'feed': 'http://feeds.feedburner.com/ldf-video?format=xml',
+ 'feed-low': 'http://feeds.feedburner.com/ldf-video?format=xml',
+ 'image':
'http://www.jupiterbroadcasting.com/images/LDF-FullStill144x139.jpg',
+ 'plot': __language__(30205),
+ 'genre': 'Technology'
+ }
+
+ # Jupiter Broadcasting Live via the RTMP stream
+ addLink(__language__(30010),
'rtsp://videocdn-us.geocdn.scaleengine.net/jblive/jblive.stream', '',
'http://images2.wikia.nocookie.net/__cb20110118004527/jupiterbroadcasting/images/2/24/JupiterBadgeGeneric.jpg',
{
+ 'title': __language__(30010),
+ 'plot': __language__(30210),
+ 'genre': 'Technology',
+ 'count': 1
+ })
+
+ # Loop through each of the shows and add them as directories.
+ x = 2
+ quality = int(__settings__.getSetting("video_quality"))
+ for name, data in shows.iteritems():
+ data['count'] = x
+ x = x + 1
+ # Check whether to use the high or low quality feed.
+ feed = data['feed'] # High by default.
+ if (quality == 1):
+ feed = data['feed-low']
+ addDir(name, feed, 1, data['image'], data)
def INDEX(name, url):
- import feedparser
- data = feedparser.parse(url)
- x = 1
- for item in data.entries:
- info = {}
- # The title
- title = info['title'] = str(x) + '. ' + item.title
- # Process the enclosures
- if hasattr(item, 'enclosures'):
- # Video URL
- video = getattr(item.enclosures[0], 'href', 0);
- if video == 0:
- video = getattr(item.enclosures[0], 'url', '')
- size = getattr(item.enclosures[0], 'length', 0)
- info['size'] = int(size)
- info['count'] = x
- # Date
- date = info['date'] = strftime("%d.%m.%Y", item.updated_parsed)
- info['plot'] = re.sub(r'<[^>]*?>', '', item.summary)
- info['plotoutline'] = item.subtitle
- info['director'] = item.author
- info['tvshowtitle'] = name
- # @TODO: Add the icon image screenshot from <media thumbnail>.
- addLink(title, video, date, '', info)
- x = x + 1
+ data = urllib2.urlopen(url)
+ soup = BeautifulStoneSoup(data,
convertEntities=BeautifulStoneSoup.XML_ENTITIES)
+ count = 1
+ # Wrap in a try/catch to protect from borken RSS feeds.
+ try:
+ for item in soup.findAll('item'):
+ # Load up the initial episode information.
+ info = {}
+ title = item.find('title')
+ info['title'] = str(count) + '. '
+ if (title):
+ info['title'] += title.string
+ info['tvshowtitle'] = name
+ info['count'] = count
+ count += 1 # Increment the show count.
+
+ # Get the video enclosure.
+ video = ''
+ enclosure = item.find('enclosure')
+ if (enclosure != None):
+ video = enclosure.get('href')
+ if (video == None):
+ video = enclosure.get('url')
+ if (video == None):
+ video = ''
+ size = enclosure.get('length')
+ if (size != None):
+ info['size'] = int(size)
+
+ # TODO: Parse the date correctly.
+ date = ''
+ pubdate = item.find('pubDate')
+ if (pubdate != None):
+ date = pubdate.string
+ # strftime("%d.%m.%Y", item.updated_parsed)
+
+ # Plot outline.
+ summary = item.find('itunes:summary')
+ if (summary != None):
+ info['plot'] = info['plotoutline'] = summary.string.strip()
+
+ # Plot.
+ description = item.find('description')
+ if (description != None):
+ # Attempt to strip the HTML tags.
+ try:
+ info['plot'] = re.sub(r'<[^>]*?>', '', description.string)
+ except:
+ info['plot'] = description.string
+
+ # Author/Director.
+ author = item.find('itunes:author')
+ if (author != None):
+ info['director'] = author.string
+
+ # TODO: Get the thumbnails to load correctly.
+ thumbnail = ''
+ mediathumbnail = item.findAll('media:thumbnail')
+ for thumb in mediathumbnail:
+ thumbnail = thumb.get('url')
+ if (thumbnail == None):
+ thumbnail = ''
+ else:
+ break
+
+ # Add the episode link.
+ addLink(info['title'], video, date, thumbnail, info)
+ except:
+ pass
def get_params():
param=[]
@@ -143,13 +235,13 @@ def addLink(name, url, date, iconimage, info):
return ok
def addDir(name, url, mode, iconimage, info):
-
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
- ok=True
- info["Title"] = name
- liz=xbmcgui.ListItem(name, iconImage=iconimage,
thumbnailImage=iconimage)
- liz.setInfo(type="video", infoLabels=info)
-
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
- return ok
+
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
+ ok=True
+ info["Title"] = name
+ liz=xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage)
+ liz.setInfo(type="video", infoLabels=info)
+
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
+ return ok
params=get_params()
url=None
@@ -183,3 +275,4 @@ elif mode==1:
xbmcplugin.endOfDirectory(int(sys.argv[1]))
+
diff --git a/plugin.video.jupiterbroadcasting/icon.png
b/plugin.video.jupiterbroadcasting/icon.png
index e53ff2e..1193af1 100644
Binary files a/plugin.video.jupiterbroadcasting/icon.png and
b/plugin.video.jupiterbroadcasting/icon.png differ
diff --git
a/plugin.video.jupiterbroadcasting/resources/language/English/strings.xml
b/plugin.video.jupiterbroadcasting/resources/language/English/strings.xml
index 3c8f449..19e2bbd 100644
--- a/plugin.video.jupiterbroadcasting/resources/language/English/strings.xml
+++ b/plugin.video.jupiterbroadcasting/resources/language/English/strings.xml
@@ -1,16 +1,49 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
+ <!-- Shows -->
<string id="30000">Linux Action Show</string>
+ <string id="30200">The Linux Action Show covers the latest news in free and
open source software, especially Linux.</string>
+
<string id="30001">Beer Is Tasty</string>
+ <string id="30201">Finding interesting combinations of food and
beer.</string>
+
<string id="30002">STOked</string>
+ <string id="30202">All the news about Star Trek Online you would ever
need.</string>
+
<string id="30003">LOTSO</string>
+ <string id="30203">Video games, reviews and coverage.</string>
+
<string id="30004">Jupiter@Nite</string>
- <string id="30005">Bryan Lunduke's Jupiter Files</string>
+ <string id="30204">Jupiter Broadcasting hooliganisms covered in front of a
live audience on the intertubes.</string>
+
+ <string id="30005">Jupiter Files</string>
+ <string id="30205">Bryan takes a peek into alien life.</string>
+
<string id="30006">All Shows</string>
+ <string id="30206">All the latest videos from Jupiter Broadcasting.</string>
+
<string id="30007">The MMOrgue</string>
+ <string id="30207">The MMOrgue is a show presented by Jeremy about Massively
Multiplayer Online (MMO) games.</string>
+
<string id="30008">TechSNAP</string>
+ <string id="30208">TechSNAP is a show about technology news hosted by Chris
Fisher and Allan Jude which records live on Thursdays and is released on the
following Monday.</string>
+
<string id="30009">SciByte</string>
+ <string id="30209">SciByte is a show about science topics presented by
Heather and Jeremy.</string>
+
<string id="30010">Live Show</string>
+ <string id="30210">Watch Jupiter Broadcasting live!</string>
+
<string id="30011">FauxShow</string>
- <string id="30012">Watch Jupiter Broadcasting live!</string>
+ <string id="30211">The FauxShow is not a real show, but a social experience.
Unlike most of the shows on the network, the FauxShow has no defined subject
and the topic varies week to week.</string>
+
+ <string id="30014">In Depth Look</string>
+ <string id="30214">Total focus on great topics, one episode at a time. Each
week Chris present another topic, from extreme hardware builds to beginner
video guides.</string>
+
+ <!-- Settings -->
+ <string id="30100">General</string>
+ <string id="30101">Video Quality</string>
+ <string id="30102">High</string>
+ <string id="30103">Low</string>
+
</strings>
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
plugin.video.jupiterbroadcasting/LICENSE | 65 -
plugin.video.jupiterbroadcasting/README | 4 -
plugin.video.jupiterbroadcasting/README.md | 18 +
plugin.video.jupiterbroadcasting/addon.xml | 7 +-
plugin.video.jupiterbroadcasting/changelog.txt | 9 +
plugin.video.jupiterbroadcasting/default.py | 323 ++-
plugin.video.jupiterbroadcasting/fanart.jpg | Bin 0 -> 257611 bytes
plugin.video.jupiterbroadcasting/feedparser.py | 2858 --------------------
plugin.video.jupiterbroadcasting/icon.png | Bin 80821 -> 92696 bytes
.../resources/language/English/strings.xml | 37 +-
.../resources/settings.xml | 8 +
12 files changed, 283 insertions(+), 3047 deletions(-)
delete mode 100644 plugin.video.jupiterbroadcasting/LICENSE
delete mode 100644 plugin.video.jupiterbroadcasting/README
create mode 100644 plugin.video.jupiterbroadcasting/README.md
create mode 100644 plugin.video.jupiterbroadcasting/fanart.jpg
delete mode 100644 plugin.video.jupiterbroadcasting/feedparser.py
create mode 100644 plugin.video.jupiterbroadcasting/resources/settings.xml
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons