The branch, frodo has been updated
       via  94bd7b5ea5f67ad21c2a07517da189ce84d679ea (commit)
      from  77936b8f963c0295082f87e533f01cc9e0505d78 (commit)

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

commit 94bd7b5ea5f67ad21c2a07517da189ce84d679ea
Author: beenje <[email protected]>
Date:   Mon Aug 26 22:30:47 2013 +0200

    [plugin.video.manoto] updated to version 1.0.9

diff --git a/plugin.video.manoto/addon.xml b/plugin.video.manoto/addon.xml
index ec9d511..07da202 100755
--- a/plugin.video.manoto/addon.xml
+++ b/plugin.video.manoto/addon.xml
@@ -1,20 +1,25 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="plugin.video.manoto"

-       name="Manoto TV"

-       version="1.0.8"

-       provider-name="babak">

-  <requires>

-    <import addon="xbmc.python" version="2.1.0"/>

-    <import addon="script.module.beautifulsoup" version="3.2.0"/>

-  </requires>

-  <extension point="xbmc.python.pluginsource"

-            library="default.py">

-        <provides>video</provides>

-  </extension>

-  <extension point="xbmc.addon.metadata">

-    <summary>Manoto TV</summary>

-    <description>Manoto TV Addon for XBMC</description>

-    <platform>all</platform>

-    <language>fa</language>

-  </extension>

-</addon>

+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="plugin.video.manoto"
+       name="Manoto TV"
+       version="1.0.9"
+       provider-name="babak">
+  <requires>
+    <import addon="xbmc.python" version="2.1.0"/>
+    <import addon="script.module.beautifulsoup" version="3.2.0"/>
+  </requires>
+  <extension point="xbmc.python.pluginsource"
+            library="default.py">
+        <provides>video</provides>
+  </extension>
+  <extension point="xbmc.addon.metadata">
+    <summary>Manoto TV</summary>
+    <description>Manoto TV Addon for XBMC</description>
+    <platform>all</platform>
+    <language>fa</language>
+    <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
+    <forum></forum>
+    <website></website>
+    <email>[email protected]</email>
+    
<source>https://xbmc-glwiz-addon.googlecode.com/svn/branches/frodo/plugin.video.manoto</source>
+  </extension>
+</addon>
diff --git a/plugin.video.manoto/default.py b/plugin.video.manoto/default.py
index 880df60..a3d8193 100644
--- a/plugin.video.manoto/default.py
+++ b/plugin.video.manoto/default.py
@@ -1,24 +1,24 @@
-import urllib,urllib2,re,os,cookielib,string

-import xbmcplugin,xbmcgui,xbmcaddon

-from BeautifulSoup import BeautifulSoup

-

-addon = xbmcaddon.Addon('plugin.video.manoto')

-profile = xbmc.translatePath(addon.getAddonInfo('profile'))

-
-

+import urllib,urllib2,re,os,cookielib,string
+import xbmcplugin,xbmcgui,xbmcaddon
+from BeautifulSoup import BeautifulSoup
+
+addon = xbmcaddon.Addon('plugin.video.manoto')
+profile = xbmc.translatePath(addon.getAddonInfo('profile'))
+
+
 __settings__ = xbmcaddon.Addon(id='plugin.video.manoto')
-__language__ = __settings__.getLocalizedString

+__language__ = __settings__.getLocalizedString
+
+home = __settings__.getAddonInfo('path')
+icon = xbmc.translatePath(os.path.join(home, 'icon.png'))
 
-home = __settings__.getAddonInfo('path')

-icon = xbmc.translatePath(os.path.join(home, 'icon.png'))

 
-

-if (__settings__.getSetting('username') == "") or 
(__settings__.getSetting('password') == ""):

-       xbmc.executebuiltin("XBMC.Notification(" + 
__settings__.getAddonInfo('name') + "," + __language__(30000) + 
",10000,"+icon+")")

+if (__settings__.getSetting('username') == "") or 
(__settings__.getSetting('password') == ""):
+       xbmc.executebuiltin("XBMC.Notification(" + 
__settings__.getAddonInfo('name') + "," + __language__(30000) + 
",10000,"+icon+")")
        __settings__.openSettings()
 
 cj = cookielib.CookieJar()
-opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

+opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
 
 domain = 'www.manoto1.com'
 
@@ -42,7 +42,9 @@ def getStreamsFromPlayList(playlist):
                print("HTTP error trying to open playlist")
                return None
         
-        lines = string.split(resp.read(), '\n')
+        # store the base URI from the playlist
+        prefix=playlist[0:string.rfind(playlist,'/') + 1]        
+       lines = string.split(resp.read(), '\n')
 
         # parse the playlist file
         streams = {}
@@ -60,7 +62,7 @@ def getStreamsFromPlayList(playlist):
                        bandwidth = line[idx + 10:len(line)].strip()
                elif len(line) > 0 and len(bandwidth) > 0:
                        # add the playlist
-                       streams[bandwidth] = line.strip()
+                       streams[bandwidth] = (("" if 
line.lower().startswith("http") else prefix) + line).strip()
 
        return streams
 
@@ -77,9 +79,9 @@ def loginAndParse():
                        ck = cookielib.Cookie(version=0, name=parsedJS[0][0], 
value=parsedJS[0][1], port=None, port_specified=False, domain=domain, 
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)          
                        cj.set_cookie(ck)
        
-       params = 'UserName=%s&Password=%s&btnLogin=ture&bRememberMe=false' % 
(urllib.quote(__settings__.getSetting('username')), 
urllib.quote(__settings__.getSetting('password')))
+        params = 'UserName=%s&Password=%s&btnLogin=ture&bRememberMe=false' % 
(urllib.quote(__settings__.getSetting('username')), 
urllib.quote(__settings__.getSetting('password')))
 
-       resp = opener.open('https://www.manoto1.com/User/Home/Login', params)   
+       resp = opener.open('https://www.manoto1.com/User/Home/Login', params) 
 
        resp = opener.open(url)
        html_data = resp.read()
diff --git a/plugin.video.manoto/resources/settings.xml 
b/plugin.video.manoto/resources/settings.xml
index 2df430d..22cd288 100755
--- a/plugin.video.manoto/resources/settings.xml
+++ b/plugin.video.manoto/resources/settings.xml
@@ -1,4 +1,4 @@
-<settings>

+<settings>
    <setting id="username" type="text"  label="30011" default=""/>
    <setting id="password" type="text"  label="30012" default=""/>
 </settings>

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

Summary of changes:
 plugin.video.manoto/addon.xml              |   45 +++++++++++++++------------
 plugin.video.manoto/default.py             |   40 +++++++++++++------------
 plugin.video.manoto/resources/settings.xml |    2 +-
 3 files changed, 47 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to