The branch, frodo has been updated
       via  6534b421e02f3db2a0ca472a9c903f20c6bbfd3a (commit)
      from  92ec351712eca0aae06935f6e0dbfc25bd39663c (commit)

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

commit 6534b421e02f3db2a0ca472a9c903f20c6bbfd3a
Author: beenje <[email protected]>
Date:   Sat May 4 22:06:20 2013 +0200

    [plugin.video.mlbmc] updated to version 2.0.3

diff --git a/plugin.video.mlbmc/addon.xml b/plugin.video.mlbmc/addon.xml
index 10feb4f..cd76bdc 100644
--- a/plugin.video.mlbmc/addon.xml
+++ b/plugin.video.mlbmc/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.mlbmc"
        name="MLBMC"
-       version="2.0.2"
+       version="2.0.3"
        provider-name="divingmule">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
diff --git a/plugin.video.mlbmc/changelog.txt b/plugin.video.mlbmc/changelog.txt
index 4809789..969f5ac 100644
--- a/plugin.video.mlbmc/changelog.txt
+++ b/plugin.video.mlbmc/changelog.txt
@@ -1,3 +1,9 @@
+Version 2.0.3
+fix game highlights
+fix identity error after user has changed their password
+fix canceling the select dialog
+added updating fprt cookie from xml data
+
 Version 2.0.2
 fix added missing init file
 
diff --git a/plugin.video.mlbmc/default.py b/plugin.video.mlbmc/default.py
index 178d12d..02d349e 100644
--- a/plugin.video.mlbmc/default.py
+++ b/plugin.video.mlbmc/default.py
@@ -210,3 +210,7 @@ if mode==25:
 if mode==26:
     mlb.getGameHighlights(url)
     xbmcplugin.endOfDirectory(int(sys.argv[1]))
+
+if mode==27:
+    mlb.getRealtimeVideo(url)
+    xbmcplugin.endOfDirectory(int(sys.argv[1]))
\ No newline at end of file
diff --git a/plugin.video.mlbmc/resources/mlbtv.py 
b/plugin.video.mlbmc/resources/mlbtv.py
index 7ffcbd2..2234757 100644
--- a/plugin.video.mlbmc/resources/mlbtv.py
+++ b/plugin.video.mlbmc/resources/mlbtv.py
@@ -77,7 +77,7 @@ def mlb_login():
 def mlbGame(event_id, full_count=False):
     if not full_count:
         # Check if cookies have expired.
-        cookie_jar.load(cookie_file, ignore_discard=False, 
ignore_expires=False)
+        cookie_jar.load(cookie_file, ignore_discard=True, ignore_expires=False)
         cookies = {}
         addon_log('These are the cookies we have in the cookie file:')
         for i in cookie_jar:
@@ -135,10 +135,35 @@ def mlbGame(event_id, full_count=False):
     status = soup.find('status-code').string
     if status != "1":
         error_str = SOAPCODES[status]
-        
xbmc.executebuiltin("XBMC.Notification("+language(30035)+","+language(30044)+error_str+",10000,"+icon+")")
-        return
-
-
+        if not full_count:
+            if login == old and error_str == 'Identity Error':
+                cookie_jar.clear()
+                login = mlb_login()
+            if not login:
+                
xbmc.executebuiltin("XBMC.Notification("+language(30035)+","+language(30044)+error_str+",10000,"+icon+")")
+                return
+            else:
+                cookie_jar.load(cookie_file, ignore_discard=True, 
ignore_expires=True)
+                cookies = {}
+                for i in cookie_jar:
+                    cookies[i.name] = i.value
+                    addon_log('%s: %s' %(i.name, i.value))
+                session = None
+                if cookies.has_key('ftmu'):
+                    addon_log("cookies.has_key('ftmu')")
+                    session = urllib.unquote(cookies['ftmu'])
+
+                values = {
+                    'eventId': event_id,
+                    'sessionKey': session,
+                    'fingerprint': urllib.unquote(cookies['fprt']),
+                    'identityPointId': cookies['ipid'],
+                    'subject':'LIVE_EVENT_COVERAGE',
+                    'platform':'WEB_MEDIAPLAYER'
+                    }
+                data = getRequest(url,urllib.urlencode(values),headers)
+        else:
+            return
     cookie_jar.load(cookie_file, ignore_discard=True, ignore_expires=True)
     cookies = {}
     addon_log('These are the cookies we have after UserVerifiedEvent request 
1:')
@@ -211,7 +236,10 @@ def mlbGame(event_id, full_count=False):
 
     dialog = xbmcgui.Dialog()
     ret = dialog.select(language(30033), name_list)
-    getGameURL(*verified_content[ret])
+    if ret >= 0:
+        addon_log('Selected: %s' %name_list[ret])
+        addon_log('content: %s' %verified_content[ret][0])
+        getGameURL(*verified_content[ret])
 
 
 def getGameURL(name,event,content,session,cookieIp,cookieFp,scenario,live):
@@ -236,6 +264,21 @@ def 
getGameURL(name,event,content,session,cookieIp,cookieFp,scenario,live):
     if debug == "true":
         addon_log(data)
     soup = BeautifulStoneSoup(data, 
convertEntities=BeautifulStoneSoup.XML_ENTITIES)
+    try:
+        new_fprt = soup.find('updated-fingerprint').string
+        if len(new_fprt) > 0:
+            addon_log('New Fingerprint: %s' %new_fprt)
+            new_cookie = cookielib.Cookie(
+                version=0, name='fprt', value=new_fprt, port=None, 
port_specified=False,
+                domain='.mlb.com', domain_specified=False, 
domain_initial_dot=False,
+                path='/', path_specified=True, secure=False, expires=None, 
discard=True,
+                comment=None, comment_url=None, rest={'HttpOnly': None}, 
rfc2109=False)
+            cookie_jar.load(cookie_file, ignore_discard=True, 
ignore_expires=True)
+            cookie_jar.set_cookie(new_cookie)
+            cookie_jar.save(cookie_file, ignore_discard=True, 
ignore_expires=True)
+    except AttributeError:
+        addon_log('No New Fingerprint')
+        
     status = soup.find('status-code').string
     if status != "1":
         try:
@@ -345,6 +388,8 @@ def 
getGameURL(name,event,content,session,cookieIp,cookieFp,scenario,live):
         xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
 
 
+
+
 def get_smil(url):
     soup = BeautifulStoneSoup(getRequest(url))
     base = soup.meta['base']

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

Summary of changes:
 plugin.video.mlbmc/addon.xml          |    2 +-
 plugin.video.mlbmc/changelog.txt      |    6 +++
 plugin.video.mlbmc/default.py         |    4 ++
 plugin.video.mlbmc/resources/mlbtv.py |   57 +++++++++++++++++++++++++++++---
 4 files changed, 62 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to