The branch, frodo has been updated
via 0d690a3c627566d025f7860de1e3f81a957f5260 (commit)
via 03d83818ce4996aed2754ffbc05199392c28027b (commit)
from 8ccae43e0f74dffe9bc4fbc0da168e7662ed82c6 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=0d690a3c627566d025f7860de1e3f81a957f5260
commit 0d690a3c627566d025f7860de1e3f81a957f5260
Author: sphere <[email protected]>
Date: Tue Apr 22 10:15:52 2014 +0200
[plugin.video.massengeschmack] updated to version 1.0.2
diff --git a/plugin.video.massengeschmack/addon.xml
b/plugin.video.massengeschmack/addon.xml
index df47ef7..e25a017 100644
--- a/plugin.video.massengeschmack/addon.xml
+++ b/plugin.video.massengeschmack/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<addon id="plugin.video.massengeschmack" name="Massengeschmack"
version="1.0.1" provider-name="Manko10">
+<addon id="plugin.video.massengeschmack" name="Massengeschmack"
version="1.0.2" provider-name="Manko10">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
diff --git a/plugin.video.massengeschmack/changelog.txt
b/plugin.video.massengeschmack/changelog.txt
index e3ec0a6..f8abf84 100644
--- a/plugin.video.massengeschmack/changelog.txt
+++ b/plugin.video.massengeschmack/changelog.txt
@@ -1,3 +1,6 @@
+1.0.2
+ - Fix GUID parsing issue for new interviews
+
1.0.1
- Fix minor convention issues causing rejection from XBMC add-on repository
diff --git a/plugin.video.massengeschmack/resources/lib/datasource.py
b/plugin.video.massengeschmack/resources/lib/datasource.py
index 2571589..460c4f6 100644
--- a/plugin.video.massengeschmack/resources/lib/datasource.py
+++ b/plugin.video.massengeschmack/resources/lib/datasource.py
@@ -19,6 +19,7 @@
import xbmcgui
import urllib
import datetime
+import re
from globalvars import *
import resources.lib
from resources.lib.listing import *
@@ -404,10 +405,10 @@ class FKTVDataSource(DataSource):
basePath1 = 'http://fernsehkritik.tv/images/magazin/'
basePath2 = 'http://massengeschmack.tv/img/mag/'
basePath3 = 'http://dl.massengeschmack.tv/img/mag/'
-
+ print guid
if 'fktv' == guid[:4]:
# if new Postecke or new FKTV episode
- if -1 != guid[4:].find('-') or 128 < int(guid[4:]):
+ if -1 != guid[4:].find('-') or re.match(r'^fktv(\d+)interview\d+',
guid) or 128 < int(guid[4:]):
return basePath3 + guid + '.jpg'
return basePath1 + 'folge' + guid[4:] + '@2x.jpg'
elif 'postecke' == guid[:8]:
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=03d83818ce4996aed2754ffbc05199392c28027b
commit 03d83818ce4996aed2754ffbc05199392c28027b
Author: sphere <[email protected]>
Date: Tue Apr 22 10:15:00 2014 +0200
[plugin.video.cnet.podcasts] updated to version 1.1.1
diff --git a/plugin.video.cnet.podcasts/addon.xml
b/plugin.video.cnet.podcasts/addon.xml
index ed58768..0d0d58d 100644
--- a/plugin.video.cnet.podcasts/addon.xml
+++ b/plugin.video.cnet.podcasts/addon.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.cnet.podcasts"
name="CNET Podcasts"
- version="1.1.0"
- provider-name="divingmule">
+ version="1.1.1"
+ provider-name="Skipmode A1">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.1"/>
@@ -13,16 +13,16 @@
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
- <summary>CNET Podcast Central</summary>
- <description>
- www.cnet.com/who-we-are/[CR]
- CNET shows you the exciting possibilities of how technology can
enhance and enrich your life.
- We provide you with information, tools, and advice that help you
decide what to buy and how to get the most out of your tech.
+ <summary lang="en">CNET Podcast Central</summary>
+ <description lang="en">www.cnet.com/who-we-are/[CR]CNET shows you the
exciting possibilities of how technology can enhance and enrich your life. We
provide you with information, tools, and advice that help you decide what to
buy and how to get the most out of your tech.
</description>
- <platform>all</platform>
+ <disclaimer lang="en">For bugs, requests or general questions visit the
XBMC forum.</disclaimer>
<language>en</language>
+ <platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
- <source>https://code.google.com/p/cnet-podcasts/</source>
<forum></forum>
+ <website>http://www.cnet.com/cnet-podcasts/</website>
+ <email></email>
+ <source>git://github.com/skipmodea1/plugin.video.cnet.podcasts.git</source>
</extension>
-</addon>
+</addon>
\ No newline at end of file
diff --git a/plugin.video.cnet.podcasts/changelog.txt
b/plugin.video.cnet.podcasts/changelog.txt
index 7a7aa60..9dff56e 100644
--- a/plugin.video.cnet.podcasts/changelog.txt
+++ b/plugin.video.cnet.podcasts/changelog.txt
@@ -1,3 +1,7 @@
+version 1.1.1
+fix to get the addon working again after changes in the website.
+I couldn't get in contact with divingmule, therefore i (Skipmode A1) made a
new version of the addon based on divingmule's sourcecode.
+
version 1.1.0
update for frodo/gotham
diff --git a/plugin.video.cnet.podcasts/default.py
b/plugin.video.cnet.podcasts/default.py
index a8c2c1c..83a913f 100644
--- a/plugin.video.cnet.podcasts/default.py
+++ b/plugin.video.cnet.podcasts/default.py
@@ -1,6 +1,7 @@
import urllib
import urllib2
import time
+import re
from datetime import datetime
from urlparse import urlparse, parse_qs
@@ -18,6 +19,7 @@ addon_version = addon.getAddonInfo('version')
addon_id = addon.getAddonInfo('id')
icon = addon.getAddonInfo('icon')
language = addon.getLocalizedString
+latest_videos_href = 'http://feeds2.feedburner.com/cnet/allhdpodcast'
def addon_log(string):
@@ -51,61 +53,104 @@ def make_request(url, post_data=None):
def cache_categories():
- url = 'http://www.cnet.com/podcasts/'
+ #url = 'http://www.cnet.com/podcasts/'
+ url = 'http://www.cnet.com/cnet-podcasts/'
soup = BeautifulSoup(make_request(url), 'html.parser')
- items = soup.find_all('div', class_='podcast')
- cats = [{'thumb': i.img['src'],
- 'name': i.h3('a')[-1].string,
- 'desc': i.find('div', class_='desc').get_text(),
- 'links': [{x.string: x['href']} for x in i.find('div',
class_='rss')('a') if
- x.string]} for
- i in items]
+ items = soup.find_all('a', attrs={'href': re.compile("hd.xml$")} )
+ cats = [{'thumb': '',
+ 'name': i['href'],
+ 'desc': '',
+ 'links': i['href']} for
+ i in items]
return cats
def display_categories():
cats = cache.cacheFunction(cache_categories)
+ previous_name = ''
+
+ #add a category
+ name = 'Latest Videos'
+ add_dir(name, latest_videos_href, 'category', '', {'Plot': ''})
+
for i in cats:
- if i['name'] == 'All Audio Podcasts': continue
- add_dir(i['name'], i['links'], 'category', i['thumb'], {'Plot':
i['desc']})
+ name = str(i['name'])
+ name = name.replace("http://feed.cnet.com/feed/podcast/", "")
+ name = name.replace("-", " ")
+ name = name.replace("/", " ")
+ name = name.replace("hd.xml", "")
+ name = name.capitalize()
+
+ #skip name if it is the same as the previous name
+ if name == previous_name:
+ pass
+ else:
+ previous_name = name
+ add_dir(name, i['links'], 'category', i['thumb'], {'Plot':
i['desc']})
def display_category(links_list):
- links_list = eval(links_list)
- settings = {'0': 'Audio', '1': 'HD', '2': 'Video'}
- preferred_type = settings[addon.getSetting('playback_type')]
- feed_url = None
- for i in links_list:
- if i.has_key(preferred_type):
- feed_url = i[preferred_type]
- if not feed_url:
- dialog = xbmcgui.Dialog()
- ret = dialog.select(language(30013)+':%s' %preferred_type,
- [i.keys()[0] for i in links_list])
- if ret > -1:
- feed_url = [i.values()[0] for i in links_list][ret]
- else:
- return
- pod_dict = xmltodict.parse(make_request(feed_url+'?format=xml'))
- iconimage = pod_dict['rss']['channel']['itunes:image']['@href']
- items = pod_dict['rss']['channel']['item']
- for i in items:
- date_patterns = ['%a, %d %b %Y %H:%M:%S PST', '%a, %d %b %Y %H:%M:%S
PDT']
- for pattern in date_patterns:
- try:
- date_time = datetime(*(time.strptime(i['pubDate'],
pattern)[0:6]))
- item_date = date_time.strftime('%d.%m.%Y')
- premiered = date_time.strftime('%d-%m-%Y')
- break
- except ValueError:
- item_date = ''
- premiered = ''
- meta = {'Plot': i['itunes:summary'],
- 'Duration': int(i['itunes:duration']) / 60,
- 'Date': item_date,
- 'Premiered': premiered}
- add_dir(i['title'], i['media:content']['@url'], 'resolve', iconimage,
meta, False)
+ url = links_list
+ soup = BeautifulSoup(make_request(url), 'html.parser')
+
+ #latest videos isn't a real category in CNET, therefore this hardcoded
stuff was needed
+ if url == latest_videos_href:
+ urls = soup.find_all('a', attrs={'href':
re.compile("^http://feedproxy.google.com/")})
+ #<a
href="http://feedproxy.google.com/~r/cnet/allhdpodcast/~3/4RHUa95GiUM/14n041814_walkingpalua_740.mp4">A
walk among hidden graves and WWII bombs</a>
+ for url in urls:
+ title = str(url)
+ title = title.replace('</a>','')
+ title = title.replace("'","'")
+ pos_last_greater_than_sign = title.rfind('>')
+ title = title[pos_last_greater_than_sign + 1:]
+
+ meta = {'Plot': title,
+ 'Duration': '',
+ 'Date': '',
+ 'Premiered': ''}
+
+ add_dir(title, url['href'], 'resolve', 'Defaultvideo.png', meta,
False)
+ else:
+ # <item>
+ # <title><![CDATA[Inside Scoop: Will acquiring Nokia devices
give Microsoft an edge?]]></title>
+ #
<link>http://www.podtrac.com/pts/redirect.mp4/dw.cbsi.com/redir/13n0903_MicrosoftScoop_740.m4v?destUrl=http://download.cnettv.com.edgesuite.net/21923/2013/09/03/13n0903_MicrosoftScoop_740.m4v</link>
+ # <author>[email protected] (CNETTV)</author>
+ # <description><![CDATA[Details of the Microsoft and Nokia
deal are now finalized. CNET's Josh Lowensohn discusses the effects the merger
could have on customers, Microsoft's sagging market share, and the selection of
a new Microsoft CEO.]]></description>
+ # <itunes:subtitle><![CDATA[Details of the Microsoft and
Nokia deal are now finalized. CNET's Josh Lowensohn discusses the effects the
merger could have on customers, Microsoft's sagging market share, and the
selection of a new Microsoft CEO.]]></itunes:subtitle>
+ # <itunes:summary><![CDATA[Details of the Microsoft and
Nokia deal are now finalized. CNET's Josh Lowensohn discusses the effects the
merger could have on customers, Microsoft's sagging market share, and the
selection of a new Microsoft CEO.]]></itunes:summary>
+ # <itunes:explicit>no</itunes:explicit>
+ # <itunes:author>CNET.com</itunes:author>
+ # <guid
isPermaLink="false">35ffbba2-67e4-11e3-a665-14feb5ca9861</guid>
+ # <itunes:duration></itunes:duration>
+ # <itunes:keywords>
+ # CNET
+ # CNETTV
+ # Tech Industry
+ # </itunes:keywords>
+ # <enclosure
url="http://www.podtrac.com/pts/redirect.mp4/dw.cbsi.com/redir/13n0903_MicrosoftScoop_740.m4v?destUrl=http://download.cnettv.com.edgesuite.net/21923/2013/09/03/13n0903_MicrosoftScoop_740.m4v"
length="0" type="video/mp4"/>
+ # <category>Technology</category>
+ # <pubDate>Fri, 21 Feb 2014 19:49:08 PST</pubDate>
+ # </item>
+ urls = soup.find_all('enclosure', attrs={'url': re.compile("^http")} )
+
+ #skip 2 titles
+ title_index = 2
+
+ for url in urls:
+ titles = soup.find_all('title')
+ title = str(titles[title_index])
+ title_index = title_index + 1
+ title = title.replace("<title><![CDATA[", "")
+ title = title.replace("]]></title>", "")
+ title = title.replace("'","'")
+
+ meta = {'Plot': title,
+ 'Duration': '',
+ 'Date': '',
+ 'Premiered': ''}
+
+ add_dir(title, url['url'], 'resolve', 'Defaultvideo.png', meta,
False)
def resolve_url(video_id):
params = {
@@ -130,13 +175,11 @@ def add_dir(name, url, mode, iconimage, meta={},
isfolder=True):
params = {'name': name, 'url': url, 'mode': mode}
url = '%s?%s' %(sys.argv[0], urllib.urlencode(params))
listitem = xbmcgui.ListItem(name, iconImage="DefaultFolder.png",
thumbnailImage=iconimage)
- meta["Title"] = name
if not isfolder:
listitem.setProperty('IsPlayable', 'true')
listitem.setProperty('Fanart_Image', iconimage)
- listitem.setInfo(type="Video", infoLabels=meta)
xbmcplugin.addDirectoryItem(int(sys.argv[1]), url, listitem, isfolder)
-
+
def get_params():
p = parse_qs(sys.argv[2][1:])
diff --git a/plugin.video.cnet.podcasts/resources/settings.xml
b/plugin.video.cnet.podcasts/resources/settings.xml
index 8a1736f..1ccd50c 100644
--- a/plugin.video.cnet.podcasts/resources/settings.xml
+++ b/plugin.video.cnet.podcasts/resources/settings.xml
@@ -1,4 +1,5 @@
-<settings>
- <setting id="playback_type" type="enum" lvalues="30001|30002|30003"
label="30004" default="1"/>
- <setting id="view_mode" type="enum" label="30005"
lvalues="30006|30007|30008|30009|30010|30011|30012" default="4"/>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<settings>
+<!--<setting id="playback_type" type="enum" lvalues="30001|30002|30003"
label="30004" default="1"/>-->
+ <setting id="view_mode" type="enum" label="30005"
lvalues="30006|30007|30008|30009|30010|30011|30012" default="0"/>
</settings>
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
plugin.video.cnet.podcasts/addon.xml | 20 ++--
plugin.video.cnet.podcasts/changelog.txt | 4 +
plugin.video.cnet.podcasts/default.py | 137 +++++++++++++-------
plugin.video.cnet.podcasts/resources/settings.xml | 7 +-
plugin.video.massengeschmack/addon.xml | 2 +-
plugin.video.massengeschmack/changelog.txt | 3 +
.../resources/lib/datasource.py | 5 +-
7 files changed, 115 insertions(+), 63 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons