The branch, dharma-pre has been updated
via bb9dbd6d6aa96aae3da02588311e917fd1cf6620 (commit)
via 95c947a19dfa7b27a44819cf2a29d5ee9a0c19bd (commit)
from c6c23e1e686fa36094926a7442163531ee09a905 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=bb9dbd6d6aa96aae3da02588311e917fd1cf6620
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=95c947a19dfa7b27a44819cf2a29d5ee9a0c19bd
commit 95c947a19dfa7b27a44819cf2a29d5ee9a0c19bd
Author: Cory Fields <[email protected]>
Date: Wed Dec 1 18:23:31 2010 -0500
[plugin.video.twit] update to 0.0.6. Upstream r21
diff --git a/plugin.video.twit/addon.xml b/plugin.video.twit/addon.xml
index 8184a15..afb4ef0 100644
--- a/plugin.video.twit/addon.xml
+++ b/plugin.video.twit/addon.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.twit"
name="TWiT"
- version="0.0.5"
+ version="0.0.6"
provider-name="divingmule,thanks to Adam B.">
<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">
diff --git a/plugin.video.twit/changelog.txt b/plugin.video.twit/changelog.txt
index a3df323..a56954c 100644
--- a/plugin.video.twit/changelog.txt
+++ b/plugin.video.twit/changelog.txt
@@ -13,4 +13,7 @@ fixed an issue with TNT
Version 0.0.5
added five new shows
-added addon settings for video quality
\ No newline at end of file
+added addon settings for video quality
+
+Version 0.0.6
+now if video isn't up on the web site, we get the latest episode from the rss:
feed
\ No newline at end of file
diff --git a/plugin.video.twit/default.py b/plugin.video.twit/default.py
index 12baa35..d12682c 100644
--- a/plugin.video.twit/default.py
+++ b/plugin.video.twit/default.py
@@ -1,8 +1,10 @@
import urllib,urllib2,re,xbmcplugin,xbmcgui,xbmcaddon
+from BeautifulSoup import BeautifulStoneSoup
__settings__ = xbmcaddon.Addon(id='plugin.video.twit')
__language__ = __settings__.getLocalizedString
-
+videoq = __settings__.getSetting('video_quality')
+
def CATEGORIES():
addLinkLive(__language__(30017),'http://bglive-a.bitgravity.com/twit/live/high','special://home/addons/plugin.video.twit/icon.png')
addDir(__language__(30000),'http://twit.tv/twit',1,'http://static.mediafly.com/publisher/images/ba85558acd844c7384921f9f96989a37/icon-600x600.png')
@@ -56,7 +58,6 @@ def VIDEOLINKS(url):
link=link.replace(' ','')
match=re.compile('</div>\n<divclass="download"><ahref="(.+?)">DownloadVideo\(\High\)\</a>').findall(link)
for url in match:
- videoq = __settings__.getSetting('video_quality')
if videoq==__language__(30018):
url=url.replace('_h264b_864x480_500.mp4','_h264b_864x480_2000.mp4')
elif videoq==__language__(30019):
@@ -66,6 +67,26 @@ def VIDEOLINKS(url):
else:
url=url
play=xbmc.Player().play(url)
+ if len(match)<1:
+ print 'Trying rss: feed for the latest episode'
+
url=url.replace('twit','feeds.twit').rstrip('0123456789')+'_video_large'
+ req = urllib2.Request(url)
+ req.addheaders = [('Mozilla/5.0 (Windows; U; Windows NT 6.1;
en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)')]
+ response = urllib2.urlopen(req)
+ link=response.read()
+ response.close()
+ soup = BeautifulStoneSoup(link)
+ Tag = soup.find('media:content')
+ url = Tag['url']
+ if videoq==__language__(30018):
+
url=url.replace('_h264b_640x368_500.mp4','_h264b_864x480_2000.mp4')
+ elif videoq==__language__(30019):
+
url=url.replace('_h264b_640x368_500.mp4','_h264b_864x480_1000.mp4')
+ elif videoq==__language__(30020):
+
url=url.replace('_h264b_640x368_500.mp4','_h264b_640x368_256.mp4')
+ else:
+ url=url
+ play=xbmc.Player().play(url)
def get_params():
param=[]
-----------------------------------------------------------------------
Summary of changes:
.../LICENSE.txt | 0
{plugin.video.twit => plugin.audio.twit}/addon.xml | 10 +++---
plugin.audio.twit/changelog.txt | 2 +
.../default.py | 27 ++++++-------------
{plugin.video.twit => plugin.audio.twit}/icon.png | Bin 21647 -> 21647 bytes
.../resources/language/English/strings.xml | 0
plugin.video.twit/addon.xml | 3 +-
plugin.video.twit/changelog.txt | 5 +++-
plugin.video.twit/default.py | 25 +++++++++++++++++-
9 files changed, 45 insertions(+), 27 deletions(-)
copy {plugin.audio.listenliveeu => plugin.audio.twit}/LICENSE.txt (100%)
copy {plugin.video.twit => plugin.audio.twit}/addon.xml (62%)
create mode 100644 plugin.audio.twit/changelog.txt
copy {plugin.video.twit => plugin.audio.twit}/default.py (86%)
copy {plugin.video.twit => plugin.audio.twit}/icon.png (100%)
copy {plugin.video.twit =>
plugin.audio.twit}/resources/language/English/strings.xml (100%)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons