The branch, gotham has been updated
       via  43e9950d664f497071bfbd465b59972dc645b543 (commit)
       via  1f3a31c1eedb4c16faaf36cd49ce6f0d1f358b16 (commit)
      from  f9ae5463ced1507c2194105c84be38b503242821 (commit)

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

commit 43e9950d664f497071bfbd465b59972dc645b543
Author: Martijn Kaijser <[email protected]>
Date:   Sun Sep 21 09:05:19 2014 +0200

    [plugin.video.nbcsnliveextra] 0.0.3

diff --git a/plugin.video.nbcsnliveextra/addon.xml 
b/plugin.video.nbcsnliveextra/addon.xml
index c48cba9..f786a6b 100644
--- a/plugin.video.nbcsnliveextra/addon.xml
+++ b/plugin.video.nbcsnliveextra/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.nbcsnliveextra" name="NBC Sports Live Extra" 
version="0.0.1" provider-name="eracknaphobia">
+<addon id="plugin.video.nbcsnliveextra" name="NBC Sports Live Extra" 
version="0.0.3" provider-name="eracknaphobia">
   <requires>
    <import addon="xbmc.python" version="2.1.0"/>   
    <import addon="script.module.simplejson" version="3.3.0"/>    
diff --git a/plugin.video.nbcsnliveextra/changelog.txt 
b/plugin.video.nbcsnliveextra/changelog.txt
index e6fb568..fa1ec66 100644
--- a/plugin.video.nbcsnliveextra/changelog.txt
+++ b/plugin.video.nbcsnliveextra/changelog.txt
@@ -1,2 +1,9 @@
+v0.0.3
+- Added ability to set stream quality under settings
+- Changed Full Replay order from newest to oldest
+- Highlight active stream with cyan under Live & Upcoming
+v0.0.2
+- Remove httplib2 unneeded and was causing errors
 v0.0.1
 - Initial version
+
diff --git a/plugin.video.nbcsnliveextra/nbcsn.py 
b/plugin.video.nbcsnliveextra/nbcsn.py
index ec73f04..7825bcf 100644
--- a/plugin.video.nbcsnliveextra/nbcsn.py
+++ b/plugin.video.nbcsnliveextra/nbcsn.py
@@ -1,18 +1,25 @@
 import sys
 import xbmcplugin, xbmcgui, xbmcaddon
 import re, os, time
-import urllib, urllib2, httplib2
+import urllib, urllib2
 import json
 import HTMLParser
 import datetime
 
 addon_handle = int(sys.argv[1])
-
 ROOTDIR = 
xbmcaddon.Addon(id='plugin.video.nbcsnliveextra').getAddonInfo('path')
+
+#Settings
+settings = xbmcaddon.Addon(id='plugin.video.nbcsnliveextra')
+
 FANART = ROOTDIR+"/fanart.jpg"
 ICON = ROOTDIR+"/icon.png"
 ROOT_URL = 'http://stream.nbcsports.com/data/mobile/'
 
+
+#Main settings
+QUALITY = int(settings.getSetting(id="quality"))
+
 def CATEGORIES():                
     addDir('Live & Upcoming','/live',1,ICON,FANART)
     addDir('Featured',ROOT_URL+'featured-2013.json',2,ICON,FANART)
@@ -53,8 +60,9 @@ def SCRAPE_VIDEOS(url,scrape_type=None):
     response.close()            
 
     if scrape_type == None:
+        #LIVE
         try:       
-            for item in json_source:         
+            for item in json_source:                         
                 BUILD_VIDEO_LINK(item)
         except:
             pass
@@ -78,53 +86,87 @@ def SCRAPE_VIDEOS(url,scrape_type=None):
 
     else:
         try:
-            for item in json_source[scrape_type]:        
-                BUILD_VIDEO_LINK(item)
+            if scrape_type == 'replay':
+                for item in reversed(json_source[scrape_type]):        
+                    BUILD_VIDEO_LINK(item)    
+            else:
+                for item in json_source[scrape_type]:        
+                    BUILD_VIDEO_LINK(item)
         except:
             pass
 
 
-def BUILD_VIDEO_LINK(item):
-    url = item['iosStreamUrl']    
+def BUILD_VIDEO_LINK(item):    
+    url = item['iosStreamUrl']  
+    ##################################################################
+    # Inject login cookie - NOT USED CURRENTLY
+    ##################################################################
     header = { 'Referer' : 'http://stream.golfchannel.com/?pid=15607',
                'Accept-Encoding' : 'gzip,deflate,sdch',
                'Accept-Language' : 'en-US,en;q=0.8',
                'Cookie' : 
'hdntl=exp=1410035727~acl=%2f*~hmac=b3d9c10715e1c34dda7d12ab97b4258388369f094093ef21098a82ba47c92e56'}
-    header_encoded = urllib.urlencode(header)
+    #header_encoded = urllib.urlencode(header)
     #url =  urllib.quote_plus(url+'|')       
     #full_url = url + '|' + header_encoded 
+    ##################################################################
 
     
-    url = 
url.replace('manifest(format=m3u8-aapl-v3)','QualityLevels(3450000)/Manifest(video,format=m3u8-aapl-v3,audiotrack=audio_en_0)')
       
-    url = 
url.replace('manifest(format=m3u8-aapl,filtername=vodcut)','QualityLevels(3450000)/Manifest(video,format=m3u8-aapl,filtername=vodcut)')
-    url = 
url.replace('manifest(format=m3u8-aapl-v3,filtername=vodcut)','QualityLevels(3450000)/Manifest(video,format=m3u8-aapl-v3,audiotrack=audio_en_0,filtername=vodcut)')
                       
-    #url = 
url.replace('manifest(format=m3u8-aapl,filtername=vodcut','QualityLevels(3450000)/Manifest(video,format=m3u8-aapl-v3,audiotrack=audio_en_0)')
-    
#http://olystreameast.nbcolympics.com/vod/4e1c7148-6803-46fc-99a4-53f18fe5be22/nbc-sports-live-extra0529140933.ism/manifest(format=m3u8-aapl,filtername=vodcut)
-    #/Manifest(video,format=m3u8-aapl,filtername=vodcut)
-
-
-    
#http://link.theplatform.com/s/BxmELC/9oOC_waY8QXZ/file.mp4?mbr=true&manifest=m3u&feed=Mobile_Feed&format=redirect&metafile=false
  
-    
#http://hdliveextra-vh.akamaihd.net/i/HD/video_sports/NBCU_Sports_Group_-_nbcsports/522/694/2014-06-25T00-58-33.933Z--51.934,.,__636916.,__274520.,__117733.,__382099.,mp4.csmil/index_1_av.m3u8?null=
+    #Set quality level based on user settings
+    if QUALITY == 0:
+        q_lvl = "200000"
+        q_lvl_golf = "296k"
+    elif QUALITY == 1:
+        q_lvl = "400000"
+        q_lvl_golf = "496k"
+    elif QUALITY == 2:
+        q_lvl = "600000"
+        q_lvl_golf = "796k"
+    elif QUALITY == 3:
+        q_lvl = "900000"
+        q_lvl_golf = "1296k"
+    elif QUALITY == 4:
+        q_lvl = "1400000"
+        q_lvl_golf = "1896k"
+    elif QUALITY == 5:
+        q_lvl = "2200000"
+        q_lvl_golf = "2596k"
+    else:
+        q_lvl = "3450000"
+        q_lvl_golf = "4296k"
+    
+    url = 
url.replace('manifest(format=m3u8-aapl-v3)','QualityLevels('+q_lvl+')/Manifest(video,format=m3u8-aapl-v3,audiotrack=audio_en_0)')
       
+    url = 
url.replace('manifest(format=m3u8-aapl,filtername=vodcut)','QualityLevels('+q_lvl+')/Manifest(video,format=m3u8-aapl,filtername=vodcut)')
+    url = 
url.replace('manifest(format=m3u8-aapl-v3,filtername=vodcut)','QualityLevels('+q_lvl+')/Manifest(video,format=m3u8-aapl-v3,audiotrack=audio_en_0,filtername=vodcut)')
                       
+    url = url.replace('golfx/master.m3u8','golfx/'+q_lvl_golf+'/prog.m3u8')    
   
+    
     name = item['title']            
     menu_name = name        
     info = item['info'] 
-    if info <> "":
-        menu_name = menu_name + " - " + info
+    if info <> "":         
+        menu_name = menu_name + " - " + info 
     
+    ##################################################################
+    # Date Color codeing - NOT USED CURRENTLY
+    ##################################################################
     #ex. 20140906-1600
     #datetime.datetime.utcnow().strftime('%Y%m%d-%H%M')
-    
     #current_date =  datetime.datetime.utcnow().strftime('%Y%m%d-%H%M')
     #video_time = item['start']
+    #date = 
datetime.fromtimestamp(time.mktime(time.strptime(video_time,"%Y%m%d-%H%M"))).strftime(xbmc.getRegion('dateshort'))
+
     #print str(datetime.datetime.strptime(item['start','%Y%m%d-%H%M'))
     #print item['start']
     #print current_time
     #print video_time
     #print video_time < current_time
+    #menu_name = '[COLOR=FF00B7EB]'+menu_name+'[/COLOR]'    
+    ##################################################################
 
-    #menu_name = '[COLOR=FF00B7EB]'+menu_name+'[/COLOR]'
+    # Highlight active streams
+    if item['id'] <> 'nbcs_':
+        menu_name = '[COLOR=FF00B7EB]'+menu_name+'[/COLOR]'    
 
-    imgurl = 
"http://hdliveextra-pmd.edgesuite.net/HD/image_sports/mobile/"+item['image']+"_m50.jpg"
+    imgurl = 
"http://hdliveextra-pmd.edgesuite.net/HD/image_sports/mobile/"+item['image']+"_m50.jpg"
    
     addLink(menu_name,url,name,imgurl,FANART) 
 
 def LOGIN():
@@ -198,7 +240,7 @@ except:
     pass
 
 print "Mode: "+str(mode)
-#print "URL: "+str(url)
+print "URL: "+str(url)
 print "Name: "+str(name)
 print "scrape_type:"+str(scrape_type)
 
@@ -214,4 +256,4 @@ elif mode==3:
         GET_ALL_SPORTS()
 elif mode==4:
         SCRAPE_VIDEOS(url,scrape_type)
-xbmcplugin.endOfDirectory(addon_handle)
\ No newline at end of file
+xbmcplugin.endOfDirectory(addon_handle)

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


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

Summary of changes:
 plugin.audio.radiotunes.com/LICENSE.txt            |   14 +
 plugin.audio.radiotunes.com/addon.xml              |   22 +
 plugin.audio.radiotunes.com/changelog.txt          |   11 +
 plugin.audio.radiotunes.com/config.ini             |   26 ++
 plugin.audio.radiotunes.com/default.py             |  444 ++++++++++++++++++++
 .../gpl.txt                                        |    0
 plugin.audio.radiotunes.com/httpcomm.py            |   58 +++
 plugin.audio.radiotunes.com/icon.png               |  Bin 0 -> 26138 bytes
 .../resources/language/English/strings.xml         |   85 ++++
 plugin.audio.radiotunes.com/resources/settings.xml |   26 ++
 plugin.video.nbcsnliveextra/addon.xml              |    2 +-
 plugin.video.nbcsnliveextra/changelog.txt          |    7 +
 plugin.video.nbcsnliveextra/nbcsn.py               |   92 +++--
 .../resources/language/English/strings.xml         |    6 +
 plugin.video.nbcsnliveextra/resources/settings.xml |   10 +
 15 files changed, 777 insertions(+), 26 deletions(-)
 create mode 100644 plugin.audio.radiotunes.com/LICENSE.txt
 create mode 100644 plugin.audio.radiotunes.com/addon.xml
 create mode 100644 plugin.audio.radiotunes.com/changelog.txt
 create mode 100644 plugin.audio.radiotunes.com/config.ini
 create mode 100644 plugin.audio.radiotunes.com/default.py
 copy plugin.audio.wimp/LICENSE.txt => plugin.audio.radiotunes.com/gpl.txt 
(100%)
 create mode 100644 plugin.audio.radiotunes.com/httpcomm.py
 create mode 100644 plugin.audio.radiotunes.com/icon.png
 create mode 100644 
plugin.audio.radiotunes.com/resources/language/English/strings.xml
 create mode 100644 plugin.audio.radiotunes.com/resources/settings.xml
 create mode 100644 
plugin.video.nbcsnliveextra/resources/language/English/strings.xml
 create mode 100644 plugin.video.nbcsnliveextra/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to