The branch, eden has been updated
       via  c30c8a2bed029bad8e9a0b95c0463635f796f982 (commit)
       via  05f1309500fc3c8d0eaae287a94eb5421e66d4ad (commit)
      from  e64e70241d9f8c6933152b4256b5f3ac4d2aaf07 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=c30c8a2bed029bad8e9a0b95c0463635f796f982

commit c30c8a2bed029bad8e9a0b95c0463635f796f982
Author: spiff <[email protected]>
Date:   Tue Sep 18 16:56:51 2012 +0200

    [plugin.video.nrk] updated to version 4.2.0

diff --git a/plugin.video.nrk/addon.xml b/plugin.video.nrk/addon.xml
index 4cdb029..1226c90 100644
--- a/plugin.video.nrk/addon.xml
+++ b/plugin.video.nrk/addon.xml
@@ -1,11 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.nrk"
        name="NRK Nett-TV"
-       version="4.0.1"
+       version="4.2.0"
        provider-name="takoi">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
-    <import addon="script.module.beautifulsoup"/>
     <import addon="script.module.parsedom" version="0.9.2"/>
     <import addon="script.module.requests" version="0.13.2"/>
     <import addon="script.module.xbmcswift" version="0.2.0"/>
diff --git a/plugin.video.nrk/changelog.txt b/plugin.video.nrk/changelog.txt
index b2175c9..6132e0b 100644
--- a/plugin.video.nrk/changelog.txt
+++ b/plugin.video.nrk/changelog.txt
@@ -1,3 +1,7 @@
+[B]4.2.0[/B]
+- Støtte for fanart/miniatyrer
+- Direktestrømmer er nå i HD
+
 [B]4.0.1[/B]
 - Diverse ytelsesforbedringer
 
diff --git a/plugin.video.nrk/data.py b/plugin.video.nrk/data.py
index b560d54..32fa8fb 100644
--- a/plugin.video.nrk/data.py
+++ b/plugin.video.nrk/data.py
@@ -15,13 +15,13 @@
 
 import re
 import requests
-import BeautifulSoup
+import HTMLParser
 import StorageServer
 import CommonFunctions
+from itertools import repeat
 from subs import get_subtitles
 
-html_decode = lambda string: BeautifulSoup.BeautifulSoup(string,
-    convertEntities=BeautifulSoup.BeautifulSoup.HTML_ENTITIES).contents[0]
+html_decode = HTMLParser.HTMLParser().unescape
 parseDOM = CommonFunctions.parseDOM
 requests = 
requests.session(headers={'User-Agent':'xbmc.org','X-Requested-With':'XMLHttpRequest'})
 cache = StorageServer.StorageServer('nrk.no', 336)
@@ -53,7 +53,9 @@ def _parse_list(html):
   titles = parseDOM(html, 'a')
   titles = map(html_decode, titles)
   urls = parseDOM(html, 'a', ret='href')
-  return titles, urls
+  thumbs = [ _thumb_url(url) for url in urls ]
+  fanart = [ _fanart_url(url) for url in urls ]
+  return titles, urls, thumbs, fanart
 
 
 def parse_recommended():
@@ -67,18 +69,20 @@ def parse_recommended():
   titles = [ "%s - %s" % (t1, t2) for t1, t2 in zip(titles1, titles2) ]
   
   urls = parseDOM(h1s, 'a', ret='href')
-  imgs = re.findall(r'1900":"([^"]+)', html)
-  return titles, urls, imgs
+  thumbs = [ _thumb_url(url) for url in urls ]
+  fanart = [ _fanart_url(url) for url in urls ]
+  return titles, urls, thumbs, fanart
 
 
 def parse_most_recent():
   url = "http://tv.nrk.no/listobjects/recentlysent.json/page/0";
   elems = requests.get(url).json['ListObjectViewModels']
   titles = [ e['Title'] for e in elems ]
-  thumbs = [ e['ImageUrl'] for e in elems ]
-  urls = [ e['Url'] for e in elems ]
   titles = map(html_decode, titles)
-  return titles, urls, thumbs
+  urls = [ e['Url'] for e in elems ]
+  thumbs = [ e['ImageUrl'] for e in elems ]
+  fanart = [ _fanart_url(url) for url in urls ]
+  return titles, urls, thumbs, fanart
 
 
 def parse_seasons(arg):
@@ -90,7 +94,9 @@ def parse_seasons(arg):
   titles = parseDOM(html, 'a', {'class':'seasonLink'})
   titles = [ "Sesong %s" % html_decode(t) for t in titles ]
   ids = parseDOM(html, 'a', {'class':'seasonLink'}, ret='href')
-  return titles, ids
+  thumbs = repeat(_thumb_url(arg))
+  fanart = repeat(_fanart_url(arg))
+  return titles, ids, thumbs, fanart
 
 
 def parse_episodes(series_id, season_id):
@@ -103,7 +109,9 @@ def parse_episodes(series_id, season_id):
   ids = [ parseDOM(tr, 'a', {'class':'p-link'}, ret='href')[0] for tr in trs ]
   ids = [ e.split('http://tv.nrk.no')[1] for e in ids ]
   descr = [lambda x=x: _get_descr(x) for x in ids ]
-  return titles, ids, descr
+  thumbs = repeat(_thumb_url(series_id))
+  fanart = repeat(_fanart_url(series_id))
+  return titles, ids, thumbs, fanart, descr
 
 
 def parse_media_url(video_id, bitrate):
@@ -115,6 +123,12 @@ def parse_media_url(video_id, bitrate):
   url = url + '/index_%s_av.m3u8' % bitrate
   return url
 
+def _thumb_url(id):
+  return "http://nrk.eu01.aws.af.cm/t/%s"; % id.strip('/')
+
+def _fanart_url(id):
+  return "http://nrk.eu01.aws.af.cm/f/%s"; % id.strip('/')
+
 def _get_descr(url):
   url = "http://nrk.no/serum/api/video/%s"; % url.split('/')[3]
   descr = _get_cached(url)['description']
diff --git a/plugin.video.nrk/default.py b/plugin.video.nrk/default.py
index 39e8818..ad5a965 100644
--- a/plugin.video.nrk/default.py
+++ b/plugin.video.nrk/default.py
@@ -41,19 +41,20 @@ def view_top():
 
 @plugin.route('/live')
 def live():
+  b = ['380','659','1394','2410','3660'][BITRATE-1]
   img_path = os.path.join(ADDON_PATH, "resources/images")
-  add_item("NRK 1", 
"mms://a1377.l11673952706.c116739.g.lm.akamaistream.net/D/1377/116739/v0001/reflector:52706",os.path.join(img_path,
 "nrk1.png"))
-  add_item("NRK 2", 
"mms://a746.l11674151924.c116741.g.lm.akamaistream.net/D/746/116741/v0001/reflector:51924",
 os.path.join(img_path, "nrk2.png"))
-  add_item("NRK 3", 
"mms://a1372.l11674333102.c116743.g.lm.akamaistream.net/D/1372/116743/v0001/reflector:33102",
 os.path.join(img_path, "nrk3.png"))
+  add("NRK 1", 
"http://nrk1us-f.akamaihd.net/i/nrk1us_0@79328/index_%s_av-b.m3u8?sd=10&rebase=on";
 % b,os.path.join(img_path, "nrk1.png"))
+  add("NRK 2", 
"http://nrk2us-f.akamaihd.net/i/nrk2us_0@79327/index_%s_av-b.m3u8?sd=10&rebase=on";
 % b, os.path.join(img_path, "nrk2.png"))
+  add("NRK 3", 
"http://nrk3us-f.akamaihd.net/i/nrk3us_0@79326/index_%s_av-b.m3u8?sd=10&rebase=on";
 % b, os.path.join(img_path, "nrk3.png"))
   endOfDirectory(plugin.handle)
 
-def add_item(title, url, thumb=""):
+def add(title, url, thumb=""):
   li =  ListItem(title, thumbnailImage=thumb)
-  li.setProperty('mimetype', 'application/x-mpegURL')
+  li.setProperty('mimetype', 'application/vnd.apple.mpegurl')
   addDirectoryItem(plugin.handle, url, li, False)
 
 
-def view(titles, urls, descr=repeat(''), thumbs=repeat(''), bgs=repeat('')):
+def view(titles, urls, thumbs=repeat(''), bgs=repeat(''), descr=repeat('')):
   total = len(titles)
   for title, url, descr, thumb, bg in zip(titles, urls, descr, thumbs, bgs):
     descr = descr() if callable(descr) else descr
@@ -72,26 +73,22 @@ def view(titles, urls, descr=repeat(''), thumbs=repeat(''), 
bgs=repeat('')):
 @plugin.route('/recommended')
 def recommended():
   import data
-  titles, urls, bgs = data.parse_recommended()
-  view(titles, urls, bgs=bgs)
+  view(*data.parse_recommended())
 
 @plugin.route('/mostrecent')
 def mostrecent():
   import data
-  titles, urls, thumbs = data.parse_most_recent()
-  view(titles, urls, thumbs=thumbs)
+  view(*data.parse_most_recent())
 
 @plugin.route('/categories')
 def categories():
   import data
-  titles, urls = data.parse_categories()
-  view(titles, urls)
+  view(*data.parse_categories())
 
 @plugin.route('/kategori/<arg>')
 def category(arg):
   import data
-  titles, urls = data.parse_by_category(arg)
-  view(titles, urls)
+  view(*data.parse_by_category(arg))
 
 @plugin.route('/letters')
 def letters():
@@ -105,23 +102,21 @@ def letters():
 @plugin.route('/letters/<arg>')
 def letter(arg):
   import data
-  titles, urls = data.parse_by_letter(arg)
-  view(titles, urls)
+  view(*data.parse_by_letter(arg))
 
 @plugin.route('/serie/<arg>')
 def seasons(arg):
   import data
-  titles, urls = data.parse_seasons(arg)
+  titles, urls, thumbs, bgs = data.parse_seasons(arg)
   if len(titles) == 1:
     plugin.redirect(plugin.url_for(urls[0]))
     return
-  view(titles, urls)
+  view(titles, urls, thumbs=thumbs, bgs=bgs)
 
 @plugin.route('/program/Episodes/<series_id>/<season_id>')
 def episodes(series_id, season_id):
   import data
-  titles, urls, descr = data.parse_episodes(series_id, season_id)
-  view(titles, urls, descr=descr)
+  view(*data.parse_episodes(series_id, season_id))
 
 @plugin.route('/serie/<series_id>/<video_id>/.*')
 @plugin.route('/program/<video_id>')

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=05f1309500fc3c8d0eaae287a94eb5421e66d4ad

commit 05f1309500fc3c8d0eaae287a94eb5421e66d4ad
Author: spiff <[email protected]>
Date:   Tue Sep 18 13:21:54 2012 +0200

    [plugin.video.retrowaretv] updated to version 1.1.6

diff --git a/plugin.video.retrowaretv/addon.xml 
b/plugin.video.retrowaretv/addon.xml
index 8ae6b1a..7016e5b 100755
--- a/plugin.video.retrowaretv/addon.xml
+++ b/plugin.video.retrowaretv/addon.xml
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon
        id="plugin.video.retrowaretv"
-       version="1.1.5"
+       version="1.1.6"
        name="Retroware TV"
        provider-name="dethfeet">
 <requires>
        <import addon="xbmc.python" version="2.0"/>
-    <import addon="plugin.video.bliptv" version="0.4.0"/>
-    <import addon="plugin.video.youtube" version="0.4.0"/>
+    <import addon="plugin.video.bliptv" version="0.6.0"/>
+    <import addon="plugin.video.youtube" version="3.1.0"/>
 </requires>
 <extension point="xbmc.python.pluginsource"
                library="default.py">
diff --git a/plugin.video.retrowaretv/changelog.txt 
b/plugin.video.retrowaretv/changelog.txt
index f3bbe83..1167b22 100755
--- a/plugin.video.retrowaretv/changelog.txt
+++ b/plugin.video.retrowaretv/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 1.1.6[/B]
+- Add new shows (by dethfeet)
+- Fix blip.tv, springboard
+- Add mp3 playback
+
 [B]Version 1.1.5[/B]
 - Show more recent videos (by dethfeet)
 - Fix user submissions (by dethfeet)
diff --git a/plugin.video.retrowaretv/default.py 
b/plugin.video.retrowaretv/default.py
index 64f4ec3..a1874a5 100755
--- a/plugin.video.retrowaretv/default.py
+++ b/plugin.video.retrowaretv/default.py
@@ -30,6 +30,7 @@ def listShows():
     
addDirectoryItem(addon.getLocalizedString(30104),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/gaminghistorian/"},baseLink+"/wp-content/uploads/2011/06/gaming-historian-banner1-300x76.gif")

     
addDirectoryItem(addon.getLocalizedString(30105),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/hvgn/"},baseLink+"/wp-content/uploads/2011/06/HVGN-2.0-sizeb1-300x112.png")

     
addDirectoryItem(addon.getLocalizedString(30106),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/thehumansarecoming/"},baseLink+"/wp-content/uploads/2012/07/humans-are-coming-logo-3-gray-red-FINAL-300x287.png")

+    
addDirectoryItem(addon.getLocalizedString(30119),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/jumblejunkie/"},baseLink+"/wp-content/uploads/2012/08/jumblejunkielogopng-600px.png")

     
addDirectoryItem(addon.getLocalizedString(30107),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/lazy-game-reviews/"},baseLink+"/wp-content/uploads/2012/06/LGRbg4b-300x168.png")

     
addDirectoryItem(addon.getLocalizedString(30108),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/letsget/"},baseLink+"/wp-content/uploads/2011/06/letsgetbanner-300x189.png")

     
addDirectoryItem(addon.getLocalizedString(30109),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/patnespunk/"},baseLink+"/wp-content/uploads/2011/06/PatNESLogo-300x196.jpg")

@@ -37,11 +38,14 @@ def listShows():
     
addDirectoryItem(addon.getLocalizedString(30111),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/retroactive/"},baseLink+"/wp-content/uploads/2011/06/retroactiverwtvbanner-300x95.png")

     
addDirectoryItem(addon.getLocalizedString(30112),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/rwtvshow/"},baseLink+"/wp-content/uploads/2011/06/rwtvthe-show-logo.png")

     
addDirectoryItem(addon.getLocalizedString(30113),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/soldseparately/"},baseLink+"/wp-content/uploads/2011/06/sold-separately-banner.gif")

+    
addDirectoryItem(addon.getLocalizedString(30118),{'action':"listVideos",'link' 
: baseLink+"/category/shows/strictlyarcade/"},"")

     
addDirectoryItem(addon.getLocalizedString(30114),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/vgto/"},baseLink+"/wp-content/uploads/2012/06/vgtobanner-300x72.png")

+    
addDirectoryItem(addon.getLocalizedString(30120),{'action':"listVideos",'link' 
: baseLink+"/category/shows/videocade-commentaries/"},"")

     
addDirectoryItem(addon.getLocalizedString(30115),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/the-video-game-years/"},baseLink+"/wp-content/uploads/2012/02/tvgypagebanner.png")

     
addDirectoryItem(addon.getLocalizedString(30116),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/video-game-knowledge/"},baseLink+"/wp-content/uploads/2011/06/videogame-knowledge-banner.gif")

     
addDirectoryItem(addon.getLocalizedString(30117),{'action':"listVideos",'link' 
: 
baseLink+"/category/shows/you-can-play-this-2/"},baseLink+"/wp-content/uploads/2012/06/ycpt-banner-e1340208312357.png")

 

+

 def ListArchive():

     
addDirectoryItem(addon.getLocalizedString(30201),{'action':"listVideos",'link' 
: 
baseLink+"/category/archives/boomstick/"},baseLink+"/wp-content/uploads/2011/06/Menu-Button-Boomstick.gif")

     
addDirectoryItem(addon.getLocalizedString(30202),{'action':"listVideos",'link' 
: 
baseLink+"/category/archives/jam-enslaver/"},baseLink+"/wp-content/uploads/2011/06/jamenslaver1.png")

diff --git a/plugin.video.retrowaretv/resources/language/English/strings.xml 
b/plugin.video.retrowaretv/resources/language/English/strings.xml
index 427aa1a..6337f1c 100644
--- a/plugin.video.retrowaretv/resources/language/English/strings.xml
+++ b/plugin.video.retrowaretv/resources/language/English/strings.xml
@@ -21,8 +21,12 @@
        <string id="30113">Sold Separately</string>
        <string id="30114">Video Game Take-Out</string>
        <string id="30115">The Video Game Years</string>
-       <string id="30116">Videogame Knowledg</string>
+       <string id="30116">Video Game Knowledge</string>
        <string id="30117">You Can Play This</string>
+       <string id="30118">Strictly Arcade</string>
+       <string id="30119">JumbleJunkie</string>
+       <string id="30120">Videocade Commentaries</string>
+       
        
        <string id="30201">Boomstick Reviews</string>
        <string id="30202">Jam Enslaver</string>
diff --git a/plugin.video.retrowaretv/showEpisode.py 
b/plugin.video.retrowaretv/showEpisode.py
index ae5f65d..175f29c 100644
--- a/plugin.video.retrowaretv/showEpisode.py
+++ b/plugin.video.retrowaretv/showEpisode.py
@@ -19,9 +19,11 @@ def showEpisode(episode_page):
         {"function":showEpisodeDorkly, 
"regex":"http://www.dorkly.com/(e/|moogaloop/noobtube.swf\?clip_id=)([0-9]*)"},
         {"function":showEpisodeSpringboard, 
"regex":"\.springboardplatform\.com/mediaplayer/springboard/video/(.*?)/(.*?)/(.*?)/"},
         {"function":showEpisodeSpringboard, 
"regex":"\\$sb\\(\"(.*?)\",{\"sbFeed\":{\"partnerId\":(.*?),\"type\":\"video\",\"contentId\":(.*?),\"cname\":\"(.*?)\"},\"style\":{\"width\":.*?,\"height\":.*?}}\\);"},
+        {"function":showEpisodeSpringboardBitLy, 
"regex":"<script.*?src=\"http://www.springboardplatform.com/js/overlay\".*? 
id=\".*?\".*?src=\"(.*?)\".*?</iframe>"},
         {"function":showEpisodeDaylimotion, 
"regex":"(http://www.dailymotion.com/video/.*?)_"},          
         {"function":showEpisodeGametrailers, "regex":"<a 
href=\"(http://www.gametrailers.com/video/angry-video-screwattack/(.*))\" 
target=\"_blank\">"},
         {"function":showEpisodeSpike, "regex":"<a 
href=\"(http://www.spike.com/.*?)\""},               
+        {"function":playEpisodeMP3, "regex":"href=\"(.*?\.mp3)\""}
     )
     
     for provider in providers:
@@ -33,6 +35,7 @@ def showEpisode(episode_page):
 def showEpisodeBip(videoItem):
     _regex_extractVideoFeedURL = re.compile("file=(.*?)&", re.DOTALL);
     _regex_extractVideoFeedURL2 = re.compile("file=(.*)", re.DOTALL);
+    _regex_extractVideoFeedURL3 = re.compile("data-episode-id=\"(.*?)\"", 
re.DOTALL);
 
     videoLink = videoItem.group(1)
     
@@ -44,9 +47,13 @@ def showEpisodeBip(videoItem):
     feedURL = _regex_extractVideoFeedURL.search(fullURL)
     if feedURL is None:
         feedURL = _regex_extractVideoFeedURL2.search(fullURL)
-    feedURL = urllib.unquote(feedURL.group(1))
     
-    blipId = feedURL[feedURL.rfind("/") + 1:]
+    if feedURL is None:
+        page = showEpisodeLoadPage(videoLink) 
+        blipId = _regex_extractVideoFeedURL3.search(page).group(1)
+    else:#This still needed for older links
+        feedURL = urllib.unquote(feedURL.group(1))
+        blipId = feedURL[feedURL.rfind("/") + 1:]
     
     stream_url = "plugin://plugin.video.bliptv/?action=play_video&videoid=" + 
blipId
     item = xbmcgui.ListItem(path=stream_url)
@@ -74,7 +81,7 @@ def showEpisodeDorkly(videoItem):
     return False
     
 def showEpisodeSpringboard(videoItem):
-    _regex_extractVideoSpringboardStream = re.compile("<media:content 
duration=\"[0-9]*?\" medium=\"video\" bitrate=\"[0-9]*?\" fileSize=\"[0-9]*?\" 
url=\"(.*?)\" type=\".*?\" />");
+    _regex_extractVideoSpringboardStream = re.compile("<media:content 
duration=\"[0-9]*?\" medium=\"video\" .*? url=\"(.*?)\" type=\".*?\" />");
     
     siteId = videoItem.group(2)
     contentId = videoItem.group(3)
@@ -91,6 +98,20 @@ def showEpisodeSpringboard(videoItem):
     xbmcplugin.setResolvedUrl(thisPlugin, True, item)
     return False
 
+def showEpisodeSpringboardBitLy(videoItem):
+    videoLink = videoItem.group(1)
+    #GET the 301 redirect URL
+    req = urllib2.Request(videoLink)
+    response = urllib2.urlopen(req)
+    fullURL = response.geturl()
+    
+    _regex_extractVideoSpringboard = 
re.compile("(embed_iframe)/(.*?)/video/(.*?)/(.*?)/.*?")
+    
+    videoItem = _regex_extractVideoSpringboard.search(fullURL)
+    
+    return showEpisodeSpringboard(videoItem)
+
+
 def showEpisodeDaylimotion(videoItem):
     url = videoItem.group(1)
     stream_url = urlresolver.resolve(url)
@@ -148,7 +169,13 @@ def showEpisodeSpike(videoItem):
         item = xbmcgui.ListItem(path=stream_url)
         xbmcplugin.setResolvedUrl(thisPlugin, True, item)
         return False
-    
+
+def playEpisodeMP3(videoItem):
+    stream_url = videoItem.group(1)
+    item = xbmcgui.ListItem(path=stream_url)
+    xbmcplugin.setResolvedUrl(thisPlugin, True, item)
+    return False
+
 def showEpisodeLoadPage(url):
     print url
     req = urllib2.Request(url)

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.nrk/addon.xml                         |    3 +-
 plugin.video.nrk/changelog.txt                     |    4 ++
 plugin.video.nrk/data.py                           |   36 ++++++++++++++------
 plugin.video.nrk/default.py                        |   35 ++++++++-----------
 plugin.video.retrowaretv/addon.xml                 |    6 ++--
 plugin.video.retrowaretv/changelog.txt             |    5 +++
 plugin.video.retrowaretv/default.py                |    4 ++
 .../resources/language/English/strings.xml         |    6 +++-
 plugin.video.retrowaretv/showEpisode.py            |   35 +++++++++++++++++--
 9 files changed, 93 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to