The branch, eden-pre has been updated
via 04fbba4d7447b43e2259858b1d7d2662704d9f17 (commit)
via eeb538fa288034c0db0f305c9a40933991b9fea5 (commit)
via 3a8229b9d982aa722ca6122072973d1b749bbdfe (commit)
from c7d0390a0da6fde5fd7a79ef0d1a6b0d29794b6e (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=04fbba4d7447b43e2259858b1d7d2662704d9f17
commit 04fbba4d7447b43e2259858b1d7d2662704d9f17
Author: spiff <[email protected]>
Date: Tue Feb 7 19:53:34 2012 +0100
[plugin.audio.radio_de] updated to version 1.0.3
diff --git a/plugin.audio.radio_de/addon.py b/plugin.audio.radio_de/addon.py
index fa20d98..fb41f05 100644
--- a/plugin.audio.radio_de/addon.py
+++ b/plugin.audio.radio_de/addon.py
@@ -35,7 +35,7 @@ class Plugin_mod(Plugin):
if options.get('is_playable'):
li.setProperty('IsPlayable', 'true')
if options.get('context_menu'):
- li.addContextMenuItems(options['context_menu'], replaceItems=True)
+ li.addContextMenuItems(options['context_menu'], replaceItems=False)
return options['url'], li, options.get('is_folder', True)
plugin = Plugin_mod(__addon_name__, __id__, __file__)
@@ -206,7 +206,7 @@ def get_stream(id):
__log('get_stream started with id=%s' % id)
language = __get_language()
station = scraper.get_station_by_station_id(language, id)
- stream_url = station['streamURL'] # fixme: need to resolve .pls at least
+ stream_url = station['streamURL']
__log('get_stream end with stream_url=%s' % stream_url)
return plugin.set_resolved_url(stream_url)
diff --git a/plugin.audio.radio_de/addon.xml b/plugin.audio.radio_de/addon.xml
index 0c1c51a..d79f00a 100644
--- a/plugin.audio.radio_de/addon.xml
+++ b/plugin.audio.radio_de/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.audio.radio_de" name="Radio" version="1.0.2"
provider-name="Tristan Fischer ([email protected])">
+<addon id="plugin.audio.radio_de" name="Radio" version="1.0.3"
provider-name="Tristan Fischer ([email protected])">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.xbmcswift" version="0.2.0"/>
diff --git a/plugin.audio.radio_de/changelog.txt
b/plugin.audio.radio_de/changelog.txt
index 927114d..37c8ef6 100644
--- a/plugin.audio.radio_de/changelog.txt
+++ b/plugin.audio.radio_de/changelog.txt
@@ -1,3 +1,7 @@
+1.0.3 (07.02.2012)
+ - added workaround for streams with .m3u and .pls files
+ - changed: show full context menu
+
1.0.2 (29.01.2012)
- Fix error with UTF-8 characters in search string
diff --git a/plugin.audio.radio_de/resources/lib/scraper.py
b/plugin.audio.radio_de/resources/lib/scraper.py
index e720c2f..4fe3d8b 100644
--- a/plugin.audio.radio_de/resources/lib/scraper.py
+++ b/plugin.audio.radio_de/resources/lib/scraper.py
@@ -2,7 +2,7 @@
import simplejson as json
from urllib import urlencode
-from urllib2 import urlopen, Request
+from urllib2 import urlopen, Request, HTTPError
MAIN_URLS = {'english': 'http://rad.io/info',
'german': 'http://radio.de/info',
@@ -109,6 +109,8 @@ def get_station_by_station_id(language, station_id):
raise
gets = {'broadcast': station_id}
station = __get_json(path, gets, language)
+ if station['streamURL'].endswith(('m3u', 'pls')):
+ station['streamURL'] = __resolve_playlist(station['streamURL'])
__log('get_station_by_station_id end')
return station
@@ -132,5 +134,35 @@ def __get_json(path, gets, language):
return json.loads(response)
+def __resolve_playlist(playlist_url):
+ __log('__resolve_playlist started with playlist_url=%s' % playlist_url)
+ req = Request(playlist_url)
+ req.add_header('User-Agent', USER_AGENT)
+ __log('__resolve_playlist opening url=%s' % playlist_url)
+ try:
+ response = urlopen(req).read()
+ except HTTPError, error:
+ __log('__resolve_playlist ERROR: %s' % error)
+ return playlist_url
+ stream_url = None
+ if playlist_url.endswith('m3u'):
+ __log('__resolve_playlist found .m3u file')
+ for entry in response.splitlines():
+ if not entry.strip().startswith('#'):
+ stream_url = entry
+ break
+ elif playlist_url.endswith('pls'):
+ __log('__resolve_playlist found .pls file')
+ for line in response.splitlines():
+ if line.strip().startswith('File1'):
+ stream_url = line.split('=')[1]
+ break
+ if not stream_url:
+ __log('__resolve_playlist falling back to playlist')
+ stream_url = playlist_url
+ __log('__resolve_playlist result=%s' % stream_url)
+ return stream_url
+
+
def __log(text):
print 'Radio.de scraper: %s' % text
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=eeb538fa288034c0db0f305c9a40933991b9fea5
commit eeb538fa288034c0db0f305c9a40933991b9fea5
Author: spiff <[email protected]>
Date: Tue Feb 7 19:42:36 2012 +0100
[plugin.video.hgtv] updated to version 1.0.4
diff --git a/plugin.video.hgtv/addon.xml b/plugin.video.hgtv/addon.xml
index 398f98f..f8d4118 100644
--- a/plugin.video.hgtv/addon.xml
+++ b/plugin.video.hgtv/addon.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.hgtv"
name="HGTV"
- version="1.0.3"
+ version="1.0.4"
provider-name="divingmule">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
+ <import addon="script.common.plugin.cache" version="0.9.1"/>
</requires>
<extension point="xbmc.python.pluginsource"
library="default.py">
@@ -17,4 +18,4 @@
<disclaimer>Some parts of this addon may not be legal in your country of
residence - please check with your local laws before installing.</disclaimer>
<platform>all</platform>
</extension>
-</addon>
+</addon>
\ No newline at end of file
diff --git a/plugin.video.hgtv/changelog.txt b/plugin.video.hgtv/changelog.txt
index 4df873e..74c810b 100644
--- a/plugin.video.hgtv/changelog.txt
+++ b/plugin.video.hgtv/changelog.txt
@@ -1,3 +1,7 @@
+Version 1.0.4
+we now scrape http://www.hgtv.com/full-episodes/package/index.html for the
show list and hard-code other shows in the 'More' directory
+
+
Version 1.0.3
added some new shows
diff --git a/plugin.video.hgtv/default.py b/plugin.video.hgtv/default.py
index d7af09e..cf44283 100644
--- a/plugin.video.hgtv/default.py
+++ b/plugin.video.hgtv/default.py
@@ -1,82 +1,78 @@
-import urllib,urllib2,re,xbmcplugin,xbmcgui,xbmcaddon
+import urllib
+import urllib2
+import re
+import xbmcplugin
+import xbmcgui
+import xbmcaddon
+import StorageServer
from BeautifulSoup import BeautifulSoup
__settings__ = xbmcaddon.Addon(id='plugin.video.hgtv')
__language__ = __settings__.getLocalizedString
+cache = StorageServer.StorageServer("hgtv", 24)
+
+def shows_cache():
+ url = 'http://www.hgtv.com/full-episodes/package/index.html'
+ headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0)
Gecko/20100101 Firefox/6.0',
+ 'Referer' : 'http://www.hgtv.com'}
+ req = urllib2.Request(url,None,headers)
+ response = urllib2.urlopen(req)
+ link=response.read()
+ response.close()
+ soup = BeautifulSoup(link)
+ shows = soup.findAll('ol', attrs={'id' : "fe-list"})[1]('li')
+ Shows_list=[]
+ for i in shows:
+ name = i('img')[0]['alt']
+ if name.startswith(' '):
+ name = name[1:]
+ url = i('a')[1]['href']
+ thumbnail = i('img')[0]['src'].replace(' ','')
+ show = (name, url, thumbnail)
+ if not show in Shows_list:
+ Shows_list.append(show)
+ return(Shows_list, 200)
def getShows():
-
addDir(__language__(30000),'/hgtv-15-fresh-handmade-gift-ideas/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/11/09/sp100_15-fresh-homemade-gift-ideas_s994x100.jpg')
-
addDir(__language__(30001),'/hgtv-all-american-handyman/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/08/06/spShow_american-handyman_s994x100.jpg')
-
addDir(__language__(30002),'/hgtv-bang-for-your-buck/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/03/04/sp100-bang-for-the-buck.jpg')
-
addDir(__language__(30003),'/hgtv-battle-on-the-block/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/03/10/spShow_battle-on-the-block_s994x100.jpg')
-
addDir(__language__(30004),'/hgtv-behind-the-magic-disney-holidays/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/09/spShow_disney-holiday-special_s994x100.jpg')
-
addDir(__language__(30005),'/candice-tells-all-full-episodes/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/12/14/spShow_candice-tells-all-v2_s994x100.jpg')
-
addDir(__language__(30006),'/hgtv246/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_carterCan.jpg')
-
addDir(__language__(30007),'/hgtv-celebrity-holiday-homes/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/11/03/sp100_celebrity-holiday-homes_s994x100.jpg')
-
addDir(__language__(30008),'/hgtv258/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/13/spShow_ctw-american-heroes_s994x200.jpg')
-
addDir(__language__(30009),'/hgtv74/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/05/13/spShow_color-splash-2011_s994x100.jpg')
-
addDir(__language__(30010),'/hgtv42/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_curbAppeal.jpg')
-
addDir(__language__(30011),'/hgtv-curb-appeal-the-block2/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/12/10/sp100_curb-appeal-the-block_s994x100.jpg')
-
addDir(__language__(30012),'/hgtv156/videos/index.html',1,'http://img.hgtv.com/HGTV/2008/10/17/showheader_dearGenevieve.jpg')
-
addDir(__language__(30013),'/hgtv-deserving-design/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp200-deserving-design.jpg')
-
addDir(__language__(30014),'/hgtv70/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_designedToSell.jpg')
-
addDir(__language__(30015),'/hgtv-dinas-party/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/07/25/spShow_dinas-party_s994x100.jpg')
-
addDir(__language__(30016),'/hgtv-first-time-design/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/12/10/spShow_first-time-design_s994x100.jpg')
-
addDir(__language__(30017),'/hgtv262/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/03/13/sp100-for-rent.jpg')
-
addDir(__language__(30018),'/hgtv8/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_gardeningByTheYard.jpg')
-
addDir(__language__(30019),'/hgtv6/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_groundBreakers.jpg')
-
addDir(__language__(30020),'/hgtv-showdown/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/01/06/sp200-hgtv-showdown.jpg')
-
addDir(__language__(30021),'/hgtv146/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_summerShowdown_v2.jpg')
-
addDir(__language__(30022),'/hgtv-hgtvd/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/12/15/spShow_hgtvd_s994x100.jpg')
-
addDir(__language__(30023),'/hgtv236/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/04/16/sp200-250k-challenge-4.jpg')
-
addDir(__language__(30024),'/hgtv-home-for-the-holidays/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp100-home-for-the-holidays.jpg')
-
addDir(__language__(30025),'/hgtv-hammerheads/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_hammerHeads.jpg')
-
addDir(__language__(30026),'/hgtv144/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_hiddenPotential_v2.jpg')
-
addDir(__language__(30027),'/hgtv-holmes-inspection/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/02/18/sp200_holmes-inspection_s994x200.jpg')
-
addDir(__language__(30028),'/hgtv-holmes-on-homes/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/04/17/sp200-holmes-on-homes.jpg')
-
addDir(__language__(30029),'/hgtv-home-rules2/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/02/15/spShow_home-rules_s994x100.jpg')
-
addDir(__language__(30030),'/hgtv-house-crashers/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/03/24/spShow_house-crashers-hgtv_s994x100.jpg')
-
addDir(__language__(30031),'/hgtv40/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/02/01/spShow_house-hunters_s994x100.jpg')
-
addDir(__language__(30032),'/hgtv56/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_houseHuntersInternational.jpg')
-
addDir(__language__(30033),'/hgtv-house-hunters-on-vacation/videos/index.html',1,'http://img.hgtv.com/HGTV/2011/03/25/spShow_house-hunters-on-vacation_s994x100.jpg')
-
addDir(__language__(30034),'/hgtv-house-of-bryan/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/08/30/spShow_house-of-bryan_s994x100.jpg')
-
addDir(__language__(30035),'/hgtv-income-property/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp100-income-property.jpg')
-
addDir(__language__(30036),'/hgtv-keys-to-the-castle/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/11/19/sp100-keys-to-the-castle-france.jpg')
-
addDir(__language__(30037),'/hgtv58/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_myFirstPlace.jpg')
-
addDir(__language__(30038),'/hgtv-my-first-sale/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/06/09/spShow_my-first-sale_s994x100.jpg')
-
addDir(__language__(30039),'/hgtv32/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_myHouseIsWorthWhat_v2.jpg')
-
addDir(__language__(30040),'/hgtv-my-yard-goes-disney/videos/index.html',1,'http://img.hgtv.com/HGTV/2011/05/06/spShow_my-yard-goes-disney_s994x100.jpg')
-
addDir(__language__(30041),'/hgtv18/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp200-myles-of-style.jpg')
-
addDir(__language__(30042),'/hgtv60/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_nationalOpenHouse.jpg')
-
addDir(__language__(30043),'/hgtv162/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_overYourHead.jpg')
-
addDir(__language__(30044),'/hgtv-professional-grade/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/09/17/spShow_professional-grade_s994x100.jpg')
-
addDir(__language__(30045),'/hgtv48/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_propertyVirgins.jpg')
-
addDir(__language__(30046),'/hgtv-rv-2010/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/12/01/spShow_rv-2011_s994x100.jpg')
-
addDir(__language__(30047),'/hgtv2/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_RateMySpace.jpg')
-
addDir(__language__(30048),'/hgtv176/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/06/10/sp100-real-estate-intervention.jpg')
-
addDir(__language__(30049),'/hgtv46/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_redHotandGreen_v2.jpg')
-
addDir(__language__(30050),'/hgtv-room-crashers/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/05/10/spShow_room-crashers_s994x100.jpg')
-
addDir(__language__(30051),'/hgtv-sandra-lee-celebrates/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/09/sp100_sandra-lee-celebrates-holiday-homecoming_s994x100.jpg')
-
addDir(__language__(30052),'/hgtv-sarah-101/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/06/03/spShow_sarah-101_s994x100.jpg')
-
addDir(__language__(30053),'/hgtv-sarahs-holiday-party/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/10/20/spShow_sarahs-holiday-party_s994x100.jpg')
-
addDir(__language__(30054),'/hgtv-sarahs-house/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/01/06/sp100-sarahs-house_s994x100.jpg')
-
addDir(__language__(30055),'/hgtv-sarahs-summer-house/videos/index.html',1,'http://img.hgtv.com/HGTV/2011/02/10/spShow_sarahs-summer-house_s994x100.jpg')
-
addDir(__language__(30056),'/hgtv-secrets-from-a-stylist2/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/08/23/spShow_secrets-from-a-stylist_s994x200.jpg')
-
addDir(__language__(30057),'/hgtv-selling-new-york/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/01/11/spShow_selling-new-york_s994x100.jpg')
-
addDir(__language__(30058),'/hgtv50/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp200-sleep-on-it.jpg')
-
addDir(__language__(30059),'/hgtv24/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_spiceUpMyKitchen.jpg')
-
addDir(__language__(30060),'/hgtv-the-antonio-treatment/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/01/12/spShow_the-antonio-treatment_s994x200.jpg')
-
addDir(__language__(30061),'/hgtv-the-duchess/videos/index.html',1,'http://img.hgtv.com/HGTV/2009/10/07/spShow_the-duchess_s994x100.jpg')
-
addDir(__language__(30062),'/hgtv-the-outdoor-room/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/11/23/spShow_the-outdoor-room-with-jamie-durie_s994x200.jpg')
-
addDir(__language__(30063),'/hgtv54/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_theStagers.jpg')
-
addDir(__language__(30064),'/hgtv-tough-as-nails/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/01/26/spShow_tough-as-nails_s994x100.jpg')
-
addDir(__language__(30065),'/hgtv-white-house-christmas/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/11/24/sp200_white-house-xmas-2010_s994x200.jpg')
-
addDir(__language__(30066),'/hgtv154/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/12/09/sp200-yard-crashers.jpg')
+ for i in cache.cacheFunction(shows_cache)[0]:
+ addDir(i[0], i[1], 1, i[2])
+ addDir(__language__(30027),'getMoreShows',2,'')
+
+
+def getMoreShows():
+
addDir(__language__(30000),'/hgtv-15-fresh-handmade-gift-ideas/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/11/09/sp100_15-fresh-homemade-gift-ideas_s994x100.jpg')
# 15 Fresh Handmade Gift Ideas
+
addDir(__language__(30001),'/hgtv-bang-for-your-buck/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/03/04/sp100-bang-for-the-buck.jpg')
# Bang for Your Buck
+
addDir(__language__(30002),'/hgtv-battle-on-the-block/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/03/10/spShow_battle-on-the-block_s994x100.jpg')
# Battle On the Block
+
addDir(__language__(30003),'/hgtv-behind-the-magic-disney-holidays/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/09/spShow_disney-holiday-special_s994x100.jpg')
# Behind the Magic: Disney Holidays
+
addDir(__language__(30004),'/candice-tells-all-full-episodes/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/12/14/spShow_candice-tells-all-v2_s994x100.jpg')
# Candice Tells All
+
addDir(__language__(30005),'/hgtv258/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/13/spShow_ctw-american-heroes_s994x200.jpg')
# Change the World: American Heroes
+
addDir(__language__(30006),'/hgtv-dinas-party/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/07/25/spShow_dinas-party_s994x100.jpg')
# Dina's Party
+
addDir(__language__(30007),'/hgtv-first-time-design/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/12/10/spShow_first-time-design_s994x100.jpg')
# First Time Design
+
addDir(__language__(30008),'/hgtv146/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_summerShowdown_v2.jpg')
# HGTV Summer Showdown
+
addDir(__language__(30009),'/hgtv236/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/04/16/sp200-250k-challenge-4.jpg')
# HGTV's $250,000 Challenge
+
addDir(__language__(30010),'/hgtv-hgtvs-great-rooms2/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/09/13/spShow_hgtv-great-rooms_s994x100.jpg')
# HGTV's Great Rooms
+
addDir(__language__(30011),'/hgtv-home-for-the-holidays/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/31/sp100-home-for-the-holidays.jpg')
# HGTV's Home for the Holidays
+
addDir(__language__(30012),'/hgtv-hgtv-the-making-of-our-magazine/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/08/12/spShow_making-of-our-magazine_s994x100.jpg')
# HGTV: The Making of Our Magazine
+
addDir(__language__(30013),'/hgtv-holmes-inspection/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2010/02/18/sp200_holmes-inspection_s994x200.jpg')
# Holmes Inspection
+
addDir(__language__(30014),'/hgtv-house-of-bryan/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/08/30/spShow_house-of-bryan_s994x100.jpg')
# House of Bryan
+
addDir(__language__(30015),'/hgtv-keys-to-the-castle/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/11/19/sp100-keys-to-the-castle-france.jpg')
# Keys to the Castle, France
+
addDir(__language__(30016),'/hgtv32/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_myHouseIsWorthWhat_v2.jpg')
# My House Is Worth What?
+
addDir(__language__(30017),'/hgtv-property-brothers/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/10/07/spShow_property-brothers_s994x100.jpg')
# Property Brothers
+
addDir(__language__(30018),'/hgtv-rv-2010/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/12/07/spShow_rv_s994x100.jpg')
# RV
+
addDir(__language__(30019),'/hgtv46/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2008/10/17/showheader_redHotandGreen_v2.jpg')
# Red Hot & Green
+
addDir(__language__(30020),'/hgtv-room-crashers/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/05/10/spShow_room-crashers_s994x100.jpg')
# Room Crashers
+
addDir(__language__(30021),'/hgtv-sandra-lee-celebrates/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/10/09/sp100_sandra-lee-celebrates-holiday-homecoming_s994x100.jpg')
# Sandra Lee Celebrates: Holiday Homecoming
+
addDir(__language__(30022),'/hgtv-sarah-101/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/06/03/spShow_sarah-101_s994x100.jpg')
# Sarah 101
+
addDir(__language__(30023),'/hgtv-sarahs-holiday-party/videos/index.html',1,'http://img.hgtv.com/HGTV/2010/10/20/spShow_sarahs-holiday-party_s994x100.jpg')
# Sarah's Holiday Party
+
addDir(__language__(30024),'/hgtv-the-duchess/videos/index.html',1,'http://img.hgtv.com/HGTV/2009/10/07/spShow_the-duchess_s994x100.jpg')
# The Duchess
+
addDir(__language__(30025),'/hgtv-the-outdoor-room/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2009/11/23/spShow_the-outdoor-room-with-jamie-durie_s994x200.jpg')
# The Outdoor Room With Jamie Durie
+
addDir(__language__(30026),'/hgtv-white-house-christmas/videos/index.html',1,'http://hgtv.sndimg.com/HGTV/2011/11/23/spShow_white-house-xmas-2011_s994x100.jpg')
# White House Christmas 2011
def INDEX(url):
- url='http://www.hgtv.com'+url
+ if url.startswith('/'):
+ url='http://www.hgtv.com'+url
headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0)
Gecko/20100101 Firefox/6.0',
'Referer' : 'http://www.hgtv.com'}
req = urllib2.Request(url,None,headers)
@@ -102,22 +98,33 @@ def INDEX(url):
showID=re.compile("var snap = new
SNI.HGTV.Player.FullSize\(\\'.+?\\',\\'(.+?)\\', \\'\\'\);").findall(link)
if len(showID)<1:
showID=re.compile("var snap = new
SNI.HGTV.Player.FullSize\(\'.+?','(.+?)', '.+?'\);").findall(link)
- url='http://www.hgtv.com/hgtv/channel/xml/0,,'+showID[0]+',00.xml'
- req = urllib2.Request(url,None,headers)
- response = urllib2.urlopen(req)
- link=response.read()
- response.close()
- soup = BeautifulSoup(link, convertEntities=BeautifulSoup.HTML_ENTITIES)
- videos = soup('video')
- for video in videos:
- name = video('clipname')[0].string
- length = video('length')[0].string
- thumb = video('thumbnailurl')[0].string
- description = video('abstract')[0].string
- link = video('videourl')[0].string
- playpath =
link.replace('http://wms.scrippsnetworks.com','').replace('.wmv','')
- url = 'rtmp://flash.scrippsnetworks.com:1935/ondemand?ovpfv=1.1
swfUrl="http://common.scrippsnetworks.com/common/snap/snap-3.0.3.swf"
playpath='+playpath
- addLink(name,url,description,length,thumb)
+ if len(showID)<1:
+ try:
+ url = soup.find('ul', attrs={'class' :
"button-nav"})('a')[1]['href']
+ INDEX(url)
+ except:
+ try:
+ url = soup.find('li', attrs={'class' :
"tab-past-season"}).a['href']
+ INDEX(url)
+ except: print 'Houston we have a problem!'
+ else:
+ url='http://www.hgtv.com/hgtv/channel/xml/0,,'+showID[0]+',00.xml'
+ req = urllib2.Request(url,None,headers)
+ response = urllib2.urlopen(req)
+ link=response.read()
+ response.close()
+ soup = BeautifulSoup(link,
convertEntities=BeautifulSoup.HTML_ENTITIES)
+ videos = soup('video')
+ for video in videos:
+ name = video('clipname')[0].string
+ length = video('length')[0].string
+ thumb = video('thumbnailurl')[0].string
+ description = video('abstract')[0].string
+ link = video('videourl')[0].string
+ playpath =
link.replace('http://wms.scrippsnetworks.com','').replace('.wmv','')
+ url =
'rtmp://flash.scrippsnetworks.com:1935/ondemand?ovpfv=1.1
swfUrl="http://common.scrippsnetworks.com/common/snap/snap-3.0.3.swf"
playpath='+playpath
+ addLink(name,url,description,length,thumb)
+ xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
def get_params():
@@ -183,7 +190,11 @@ if mode==None or url==None or len(url)<1:
getShows()
elif mode==1:
- print ""+url
+ print ""
INDEX(url)
-xbmcplugin.endOfDirectory(int(sys.argv[1]))
+elif mode==2:
+ print ""
+ getMoreShows()
+
+xbmcplugin.endOfDirectory(int(sys.argv[1]))
\ No newline at end of file
diff --git a/plugin.video.hgtv/resources/language/English/strings.xml
b/plugin.video.hgtv/resources/language/English/strings.xml
index 4193b01..c6161f6 100644
--- a/plugin.video.hgtv/resources/language/English/strings.xml
+++ b/plugin.video.hgtv/resources/language/English/strings.xml
@@ -1,70 +1,31 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<string id="30000">15 Fresh Handmade Gift Ideas</string>
- <string id="30001">All American Handyman</string>
- <string id="30002">Bang for Your Buck</string>
- <string id="30003">Battle On the Block</string>
- <string id="30004">Behind the Magic: Disney Holidays</string>
- <string id="30005">Candice Tells All</string>
- <string id="30006">Carter Can</string>
- <string id="30007">Celebrity Holiday Homes 2009</string>
- <string id="30008">Change the World: American Heroes</string>
- <string id="30009">Color Splash</string>
- <string id="30010">Curb Appeal</string>
- <string id="30011">Curb Appeal: The Block</string>
- <string id="30012">Dear Genevieve</string>
- <string id="30013">Deserving Design</string>
- <string id="30014">Designed to Sell</string>
- <string id="30015">'Dina's Party</string>
- <string id="30016">First Time Design</string>
- <string id='30017'>For Rent</string>
- <string id='30018'>Gardening by the Yard</string>
- <string id='30019'>Ground Breakers</string>
- <string id='30020'>HGTV Showdown</string>
- <string id='30021'>HGTV Summer Showdown</string>
- <string id='30022'>HGTV'd</string>
- <string id='30023'>HGTV's $250,000 Challenge</string>
- <string id='30024'>HGTV's Home for the Holidays</string>
- <string id='30025'>Hammer Heads</string>
- <string id='30026'>Hidden Potential</string>
- <string id='30027'>Holmes Inspection</string>
- <string id='30028'>Holmes on Homes</string>
- <string id='30029'>Home Rules</string>
- <string id='30030'>House Crashers</string>
- <string id='30031'>House Hunters</string>
- <string id='30032'>House Hunters International</string>
- <string id='30033'>House Hunters on Vacation</string>
- <string id='30034'>House of Bryan</string>
- <string id='30035'>Income Property</string>
- <string id='30036'>Keys to the Castle, France</string>
- <string id='30037'>My First Place</string>
- <string id='30038'>My First Sale</string>
- <string id='30039'>My House Is Worth What?</string>
- <string id='30040'>My Yard Goes Disney</string>
- <string id='30041'>Myles of Style</string>
- <string id='30042'>National Open House</string>
- <string id='30043'>Over Your Head</string>
- <string id='30044'>Professional Grade</string>
- <string id='30045'>Property Virgins</string>
- <string id='30046'>RV 2011</string>
- <string id='30047'>Rate My Space</string>
- <string id='30048'>Real Estate Intervention</string>
- <string id='30049'>Red Hot & Green</string>
- <string id='30050'>Room Crashers</string>
- <string id='30051'>Sandra Lee Celebrates: Holiday Homecoming</string>
- <string id='30052'>Sarah 101</string>
- <string id='30053'>Sarah's Holiday Party</string>
- <string id='30054'>Sarah's House</string>
- <string id='30055'>Sarah's Summer House</string>
- <string id='30056'>Secrets From a Stylist</string>
- <string id='30057'>Selling New York</string>
- <string id='30058'>Sleep On It</string>
- <string id='30059'>Spice Up My Kitchen</string>
- <string id='30060'>The Antonio Treatment</string>
- <string id='30061'>The Duchess</string>
- <string id='30062'>The Outdoor Room With Jamie Durie</string>
- <string id='30063'>The Stagers</string>
- <string id='30064'>Tough as Nails</string>
- <string id='30065'>White House Christmas 2010</string>
- <string id='30066'>Yard Crashers</string>
+ <string id="30001">Bang for Your Buck</string>
+ <string id="30002">Battle On the Block</string>
+ <string id="30003">Behind the Magic: Disney Holidays</string>
+ <string id="30004">Candice Tells All</string>
+ <string id="30005">Change the World: American Heroes</string>
+ <string id="30006">Dina's Party</string>
+ <string id="30007">First Time Design</string>
+ <string id="30008">HGTV Summer Showdown</string>
+ <string id="30009">HGTV's $250,000 Challenge</string>
+ <string id="30010">HGTV's Great Rooms</string>
+ <string id="30011">HGTV's Home for the Holidays</string>
+ <string id="30012">HGTV: The Making of Our Magazine</string>
+ <string id="30013">Holmes Inspection</string>
+ <string id="30014">House of Bryan</string>
+ <string id="30015">Keys to the Castle, France</string>
+ <string id='30016'>My House Is Worth What?</string>
+ <string id='30017'>Property Brothers</string>
+ <string id='30018'>RV</string>
+ <string id='30019'>Red Hot & Green</string>
+ <string id='30020'>Room Crashers</string>
+ <string id='30021'>Sandra Lee Celebrates: Holiday Homecoming</string>
+ <string id='30022'>Sarah 101</string>
+ <string id='30023'>Sarah's Holiday Party</string>
+ <string id='30024'>The Duchess</string>
+ <string id='30025'>The Outdoor Room With Jamie Durie</string>
+ <string id='30026'>White House Christmas 2011</string>
+ <string id='30027'>More...</string>
</strings>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=3a8229b9d982aa722ca6122072973d1b749bbdfe
commit 3a8229b9d982aa722ca6122072973d1b749bbdfe
Author: spiff <[email protected]>
Date: Tue Feb 7 19:40:30 2012 +0100
[plugin.video.fox.news] updated to version 2.0.3
diff --git a/plugin.video.fox.news/addon.xml b/plugin.video.fox.news/addon.xml
index 65b6342..c2da59c 100644
--- a/plugin.video.fox.news/addon.xml
+++ b/plugin.video.fox.news/addon.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.fox.news"
name="Fox News"
- version="2.0.1"
+ version="2.0.3"
provider-name="divingmule">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
- <import addon="script.common.plugin.cache" version="0.9.0"/>
+ <import addon="script.common.plugin.cache" version="0.9.1"/>
</requires>
<extension point="xbmc.python.pluginsource"
library="default.py">
diff --git a/plugin.video.fox.news/default.py b/plugin.video.fox.news/default.py
index 5fd49bb..0711507 100644
--- a/plugin.video.fox.news/default.py
+++ b/plugin.video.fox.news/default.py
@@ -16,8 +16,7 @@ __settings__ = xbmcaddon.Addon(id='plugin.video.fox.news')
__language__ = __settings__.getLocalizedString
home = __settings__.getAddonInfo('path')
icon = xbmc.translatePath( os.path.join( home, 'icon.png' ) )
-cache = StorageServer.StorageServer()
-cache.table_name = "FoxNews"
+cache = StorageServer.StorageServer("FoxNews", 24)
def getCategories():
@@ -62,10 +61,15 @@ def getSubcategories(url):
ok=True
liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png",
thumbnailImage=icon)
liz.setInfo( type="Video", infoLabels={ "Title": name } )
+ contextMenu =
[(__language__(30019),'RunPlugin(%s?url=%s&mode=3&play=True)' %(sys.argv[0],
urllib.quote_plus(url)))]
+ liz.addContextMenuItems(contextMenu)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
-def getVideos(url):
+def getVideos(url, play=False):
+ if play:
+ playlist = xbmc.PlayList(1)
+ playlist.clear()
headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64;
rv:9.0.1) Gecko/20100101 Firefox/9.0.1',
'Referer' : 'http://video.foxnews.com'}
req =
urllib2.Request('http://video.foxnews.com/v/feed/playlist/'+url+'.js?',None,headers)
@@ -85,9 +89,15 @@ def getVideos(url):
name = name.replace('&',' & ')
url = url.replace('HIGH',__settings__.getSetting('video_quality'))
duration = video['media-content']['mvn-duration']
- liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png",
thumbnailImage=thumb)
- liz.setInfo( type="Video", infoLabels={ "Title": name,
"Plot":desc, "Duration":duration} )
-
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
+ if play:
+ info = xbmcgui.ListItem(name, iconImage="DefaultVideo.png",
thumbnailImage=thumb)
+ playlist.add(url, info)
+ else:
+ liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png",
thumbnailImage=thumb)
+ liz.setInfo( type="Video", infoLabels={ "Title": name,
"Plot":desc, "Duration":duration} )
+
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
+ if play:
+ xbmc.executebuiltin('playlist.playoffset(video,0)')
def addDir(name,url,mode,iconimage):
@@ -138,6 +148,10 @@ try:
mode=int(params["mode"])
except:
pass
+try:
+ play=eval(params["play"])
+except:
+ pass
print "Mode: "+str(mode)
print "URL: "+str(url)
@@ -148,11 +162,15 @@ if mode==None:
getCategories()
elif mode==1:
- print ""+url
+ print ""
getSubcategories(url)
elif mode==2:
- print ""+url
+ print ""
getVideos(url)
+elif mode==3:
+ print ""
+ getVideos(url, True)
+
xbmcplugin.endOfDirectory(int(sys.argv[1]))
\ No newline at end of file
diff --git a/plugin.video.fox.news/resources/language/English/strings.xml
b/plugin.video.fox.news/resources/language/English/strings.xml
index f8b5c02..63ca96f 100644
--- a/plugin.video.fox.news/resources/language/English/strings.xml
+++ b/plugin.video.fox.news/resources/language/English/strings.xml
@@ -18,4 +18,5 @@
<string id="30016">Medium</string>
<string id="30017">Low</string>
<string id="30018">Video Quality</string>
+ <string id="30019">Play</string>
</strings>
-----------------------------------------------------------------------
Summary of changes:
plugin.audio.radio_de/addon.py | 4 +-
plugin.audio.radio_de/addon.xml | 2 +-
plugin.audio.radio_de/changelog.txt | 4 +
plugin.audio.radio_de/resources/lib/scraper.py | 34 ++++-
plugin.video.fox.news/addon.xml | 4 +-
plugin.video.fox.news/changelog.txt | 3 +
plugin.video.fox.news/default.py | 34 +++-
.../resources/language/English/strings.xml | 1 +
plugin.video.hgtv/addon.xml | 5 +-
plugin.video.hgtv/changelog.txt | 4 +
plugin.video.hgtv/default.py | 185 +++++++++++---------
.../resources/language/English/strings.xml | 93 +++-------
12 files changed, 204 insertions(+), 169 deletions(-)
create mode 100644 plugin.video.fox.news/changelog.txt
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons