The branch, frodo has been updated
       via  de63b4eb5c8cc15ca649c6ac4c8294ebd0394c2e (commit)
       via  d1be3916a67d51095ed4bdc6fb03f2cf5555a12d (commit)
       via  7441aad2cc55fa6988dd30dd873be079c219ddc2 (commit)
      from  c31f1c889d8333bbd6df176b1780c467a770839a (commit)

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

commit de63b4eb5c8cc15ca649c6ac4c8294ebd0394c2e
Author: sphere <[email protected]>
Date:   Tue Apr 15 08:16:34 2014 +0200

    [plugin.dbmc] updated to version 0.7.2

diff --git a/plugin.dbmc/addon.py b/plugin.dbmc/addon.py
index af041d6..4458308 100644
--- a/plugin.dbmc/addon.py
+++ b/plugin.dbmc/addon.py
@@ -72,14 +72,17 @@ if ( __name__ == "__main__" ):
     log_debug('Argument List: %s' % str(sys.argv))
     runAsScript, params = parse_argv()
     if not runAsScript:
+        gotToken = False
         if ADDON.getSetting('access_token').decode("utf-8") == '':
             import resources.lib.login as login
-            dialog = xbmcgui.Dialog()
-            dialog.ok(ADDON_NAME, LANGUAGE_STRING(30002), 
LANGUAGE_STRING(30003) )
-            xbmcplugin.endOfDirectory(int(sys.argv[1]),succeeded=False)
-            login.doTokenDialog()
-            #ADDON.openSettings()
-        elif ADDON.getSetting('access_token').decode("utf-8") != '':
+            if login.getAccessToken():
+                #reload the addon
+                dialog = xbmcgui.Dialog()
+                dialog.ok(ADDON_NAME, LANGUAGE_STRING(30004))
+                gotToken = True
+        else:
+            gotToken = True
+        if gotToken:
             if int(sys.argv[1]) < 0:
                 #handle action of a file (or a "Show me more..." item)
                 if 'media_items' in params:
@@ -129,10 +132,7 @@ if ( __name__ == "__main__" ):
             xbmcplugin.endOfDirectory(int(sys.argv[1]), succeeded=False)
     else: # run as script
         action = params.get('action', '')
-        if action == 'login':
-            import resources.lib.login as login
-            login.doTokenDialog()
-        elif action == 'clear_token':
+        if action == 'clear_token':
             ADDON.setSetting('access_token', '')
         elif action == 'change_passcode':
             if unlock():
diff --git a/plugin.dbmc/addon.xml b/plugin.dbmc/addon.xml
index 4c68c86..6c888a3 100644
--- a/plugin.dbmc/addon.xml
+++ b/plugin.dbmc/addon.xml
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.dbmc" name="Dbmc (Dropbox add-on)" version="0.7.1"
+<addon id="plugin.dbmc" name="Dbmc (Dropbox add-on)" version="0.7.2"
        provider-name="Joost Kop">
        <requires>
                <import addon="xbmc.python" version="2.1.0" />
                <import addon="script.common.plugin.cache" version="0.9.1" />
-               <import addon="script.web.viewer" version="0.9.10" />
        </requires>
        <extension point="xbmc.python.pluginsource" library="addon.py">
                <provides>audio image video executable</provides>
diff --git a/plugin.dbmc/changelog.txt b/plugin.dbmc/changelog.txt
index bdda8f2..97bb986 100644
--- a/plugin.dbmc/changelog.txt
+++ b/plugin.dbmc/changelog.txt
@@ -1,3 +1,6 @@
+[B]0.7.2:[/B]
+- Changed login (Authorization) procedure. The old one failed everytime 
Dropbox changed thier site.
+
 [B]0.7.1:[/B]
 - Fixed synchronization crash when a syncing a file fails
 - Fixed not able to upload files 
diff --git a/plugin.dbmc/resources/language/Dutch/strings.po 
b/plugin.dbmc/resources/language/Dutch/strings.po
index 2b46329..bcc0c9b 100644
--- a/plugin.dbmc/resources/language/Dutch/strings.po
+++ b/plugin.dbmc/resources/language/Dutch/strings.po
@@ -9,20 +9,20 @@ msgid "General"
 msgstr "Algemeen"
 
 msgctxt "#30001"
-msgid "Please enter your dropbox login name (email)"
-msgstr "Vul uw dropbox gebruikersnaam (email) in, aub"
+msgid "Follow the instructions and enter PIN: "
+msgstr "Volg de instructies en voer deze PIN in: "
 
 msgctxt "#30002"
 msgid "Dropbox authorization required."
 msgstr "Dropbox autorisatie vereist."
 
 msgctxt "#30003"
-msgid "Please login and authorize (allow) this addon."
-msgstr "Login en sta deze addon toe (allow), aub."
+msgid "Go to: http://xbmc-dropbox.sourceforge.net";
+msgstr "Ga naar: http://xbmc-dropbox.sourceforge.net";
 
 msgctxt "#30004"
-msgid "Authorization finished"
-msgstr "Autorisatie beeindigd"
+msgid "Authorization finished."
+msgstr "Autorisatie beeindigd."
 
 msgctxt "#30005"
 msgid "Clear Dropbox authorization code"
@@ -41,8 +41,8 @@ msgid "View relevant files only"
 msgstr "Toon alleen relevante bestanden"
 
 msgctxt "#30009"
-msgid "Please close the Web Viewer."
-msgstr "Sluit de Web Viewer, aub."
+msgid "30009"
+msgstr "30009"
 
 msgctxt "#30010"
 msgid "Show me more..."
@@ -239,20 +239,20 @@ msgid "Problem getting the access code!"
 msgstr "Probleem met het verkrijgen van de toegangs code!"
 
 msgctxt "#30201"
-msgid "Authorization failed, no code received!"
-msgstr "Autorisatie gefaalt, geen code ontvangen!"
+msgid "Authorization failed!"
+msgstr "Autorisatie gefaalt!"
 
 msgctxt "#30202"
-msgid "Did you authorize (allow)?"
-msgstr "Heeft u toestemming gegeven?"
+msgid "Did you copy the complete code?"
+msgstr "Heeft u de code volledig gekopieerd?"
 
 msgctxt "#30203"
-msgid "Please install XMBC addon: Webviewer."
-msgstr "Installeer XBMC addon: WebViewer, aub."
+msgid "30203"
+msgstr "30203"
 
 msgctxt "#30204"
-msgid "This is required for authorizing this addon."
-msgstr "Dit is vereist voor autorisatie van deze addon."
+msgid "30204"
+msgstr "30204"
 
 msgctxt "#30205"
 msgid "Dropbox authorization code failure!"
diff --git a/plugin.dbmc/resources/language/English/strings.po 
b/plugin.dbmc/resources/language/English/strings.po
index 0a19773..7730af3 100644
--- a/plugin.dbmc/resources/language/English/strings.po
+++ b/plugin.dbmc/resources/language/English/strings.po
@@ -9,7 +9,7 @@ msgid "General"
 msgstr ""
 
 msgctxt "#30001"
-msgid "Please enter your dropbox login name (email)"
+msgid "Follow the instructions and enter PIN: "
 msgstr ""
 
 msgctxt "#30002"
@@ -17,11 +17,11 @@ msgid "Dropbox authorization required."
 msgstr ""
 
 msgctxt "#30003"
-msgid "Please login and authorize (allow) this addon."
+msgid "Go to: http://xbmc-dropbox.sourceforge.net";
 msgstr ""
 
 msgctxt "#30004"
-msgid "Authorization finished"
+msgid "Authorization finished."
 msgstr ""
 
 msgctxt "#30005"
@@ -41,7 +41,7 @@ msgid "View relevant files only"
 msgstr ""
 
 msgctxt "#30009"
-msgid "Please close the Web Viewer."
+msgid "30009"
 msgstr ""
 
 msgctxt "#30010"
@@ -239,19 +239,19 @@ msgid "Problem getting the access code!"
 msgstr ""
 
 msgctxt "#30201"
-msgid "Authorization failed, no code received!"
+msgid "Authorization failed!"
 msgstr ""
 
 msgctxt "#30202"
-msgid "Did you authorize (allow)?"
+msgid "Did you copy the complete code?"
 msgstr ""
 
 msgctxt "#30203"
-msgid "Please install XMBC addon: Webviewer."
+msgid "30203"
 msgstr ""
 
 msgctxt "#30204"
-msgid "This is required for authorizing this addon."
+msgid "30204"
 msgstr ""
 
 msgctxt "#30205"
diff --git a/plugin.dbmc/resources/language/Italian/strings.po 
b/plugin.dbmc/resources/language/Italian/strings.po
index b2acfd6..aeaad7e 100644
--- a/plugin.dbmc/resources/language/Italian/strings.po
+++ b/plugin.dbmc/resources/language/Italian/strings.po
@@ -18,19 +18,19 @@ msgid "General"
 msgstr "Generale"
 
 msgctxt "#30001"
-msgid "Please enter your dropbox login name (email)"
-msgstr "Inserire il proprio nome di login in Dropbox (email)"
+msgid "Follow the instructions and enter PIN: "
+msgstr "Segui le istruzioni e immetti il PIN: "
 
 msgctxt "#30002"
 msgid "Dropbox authorization required."
 msgstr "E' richiesto un codice di autorizzazione di Dropbox."
 
 msgctxt "#30003"
-msgid "Please login and authorize (allow) this addon."
-msgstr "Effettuare il login ed autorizzare (allow) questo addon."
+msgid "Go to: http://xbmc-dropbox.sourceforge.net";
+msgstr "Vai a: http://xbmc-dropbox.sourceforge.net";
 
 msgctxt "#30004"
-msgid "Authorization finished"
+msgid "Authorization finished."
 msgstr "Autorizzazione completata."
 
 msgctxt "#30005"
@@ -50,8 +50,8 @@ msgid "View relevant files only"
 msgstr "Vedi solo file importanti"
 
 msgctxt "#30009"
-msgid "Please close the Web Viewer."
-msgstr "Chiudere il Web Viewer."
+msgid "30009"
+msgstr "30009"
 
 msgctxt "#30010"
 msgid "Show me more..."
@@ -252,20 +252,20 @@ msgid "Problem getting the access code!"
 msgstr "Problema nell'ottenere il codice di accesso!"
 
 msgctxt "#30201"
-msgid "Authorization failed, no code received!"
-msgstr "Autorizzazione fallita, nessun codice ricevuto"
+msgid "Authorization failed!"
+msgstr "Autorizzazione fallita!"
 
 msgctxt "#30202"
-msgid "Did you authorize (allow)?"
-msgstr "Si è autorizzato (allow)?"
+msgid "Did you copy the complete code?"
+msgstr "Hai copiato il codice completo?"
 
 msgctxt "#30203"
-msgid "Please install XMBC addon: Webviewer."
-msgstr "Progo installare l'addon XBMC: Webviewer"
+msgid "30203"
+msgstr "30203"
 
 msgctxt "#30204"
-msgid "This is required for authorizing this addon."
-msgstr "E' richiesto per autorizzare questo addon."
+msgid "30204"
+msgstr "30204"
 
 msgctxt "#30205"
 msgid "Dropbox authorization code failure!"
@@ -273,4 +273,4 @@ msgstr "Problema nel codice di autorizzazione di Dropbox!"
 
 msgctxt "#30206"
 msgid "Dropbox error occured!"
-msgstr "Errore in Dropbox!"
\ No newline at end of file
+msgstr "Errore in Dropbox!"
diff --git a/plugin.dbmc/resources/lib/login.py 
b/plugin.dbmc/resources/lib/login.py
index cef3f33..728df64 100644
--- a/plugin.dbmc/resources/lib/login.py
+++ b/plugin.dbmc/resources/lib/login.py
@@ -21,68 +21,109 @@
 
 import xbmcaddon
 import xbmcgui
-import re
+
+import uuid
+import urllib, urllib2
+import json
 
 from utils import *
 
 from dropbox import client, rest
 
 APP_KEY= 'QF9EBAwGS10NWBJFDRcCHxhfUR5bDhIcQhAeV0YTGBcACgg='
+SUCCES = 'Succes'
 
-def doTokenDialog():
+def getAccessToken():
+    tokenRecieved = False
+    #Get the session_id (uuid). Create one if there is none yet.
+    sessionId = ADDON.getSetting('session_id').decode("utf-8")
+    if sessionId == '':
+         sessionId = str(uuid.uuid1())
+         ADDON.setSetting('session_id', sessionId)
+    #Try to get a access_code
     key, secret = decode_key(APP_KEY).split('|')
-    try:
-        from webviewer import webviewer #@UnresolvedImport @UnusedImport
+    flow = client.DropboxOAuth2FlowNoRedirect(key, secret)
+    authorize_url = flow.start()
+    oauth = DbmcOauth2()
+    result, accesscode, pin = oauth.getAccessCode(sessionId, authorize_url)
+    if result != SUCCES:
+        log_error('Failed to get the PIN/accesscode: %s'%result)
+        dialog = xbmcgui.Dialog()
+        dialog.ok(ADDON_NAME, LANGUAGE_STRING(30200), '%s'%result)
+    elif accesscode == '':
+        #No accesscode yet, so direct to web=page with PIN
+        log('No accesscode, goto web-page with PIN: %s'%pin)
+        dialog = xbmcgui.Dialog()
+        dialog.ok(ADDON_NAME, LANGUAGE_STRING(30002), LANGUAGE_STRING(30003), 
LANGUAGE_STRING(30001) + pin )
+    else:
+        #Accesscode present, so try to get the access token now
+        log_debug('Accesscode recieved: %s. Getting access 
token...'%accesscode)
         #start the flow process (getting the auth-code
-        flow = client.DropboxOAuth2FlowNoRedirect(key, secret)
-        authorize_url = flow.start()
-        html_resp = doNormalTokenDialog(authorize_url)
-        code = None
-        if html_resp:
-            #get the "auth-code"
-            code = re.search('(?s)(?<=class="auth-code">)[^<]+', html_resp)
-        if code:
-            code = code.group(0)
-            try:
-                log('Received auth-code')
-                access_token, user_id = flow.finish(code)
-                log('Received token')
-                #save the token in settings
-                ADDON.setSetting('access_token', access_token)
-            except rest.ErrorResponse, e:
-                dialog = xbmcgui.Dialog()
-                dialog.ok(ADDON_NAME, LANGUAGE_STRING(30200), '%s'%str(e))
-        else:
+        try:
+            access_token, user_id = flow.finish(accesscode)
+            #save the token in settings
+            ADDON.setSetting('access_token', access_token)
+            log('Access token stored')
+            tokenRecieved = True
+        except rest.ErrorResponse, e:
+            log_error('Failed getting the access token: %s'%str(e))
             dialog = xbmcgui.Dialog()
-            dialog.ok(ADDON_NAME, LANGUAGE_STRING(30201), 
LANGUAGE_STRING(30202))
-    except:
-        dialog = xbmcgui.Dialog()
-        dialog.ok(ADDON_NAME, LANGUAGE_STRING(30203), LANGUAGE_STRING(30204))
+            dialog.ok(ADDON_NAME, LANGUAGE_STRING(30201), str(e), 
LANGUAGE_STRING(30202))
+        finally:
+            #always remove the session (failed or not)
+            result = oauth.removeAccessCode(sessionId, tokenRecieved)
+            if result != SUCCES:
+                log_error('Failed removing the access code: %s'%result)
+    return tokenRecieved
+
     
-def doNormalTokenDialog(authorize_url):
-    from webviewer import webviewer #@UnresolvedImport
-    html = None
-    #get user name
-    message = LANGUAGE_STRING(30001)
-    keyboard = xbmc.Keyboard('',message)
-    keyboard.doModal()
-    if not keyboard.isConfirmed(): return html
-    user = keyboard.getText()
-    #start webViewer
-    autoforms = [{  'url':'https://www.dropbox.com.',
-                    'action':'/login',
-                    'autofill': 'login_email=%s'%(user),
-                    'autosubmit': 'false'}, #if autosubmit=true autoforms 
variable will be deleted!
-                 {  'url':'https://www.dropbox.com/1/oauth2/authorize.',
-                    #'name':'login-form',
-                    'action':'1/oauth2/authorize'
-                  }]
-    autoClose = {   'url':'https://www.dropbox.com/1/oauth2/authorize.',
-                    'html':'(?s).+class="auth-code".+',
-                    'heading':LANGUAGE_STRING(30004),
-                    'message':LANGUAGE_STRING(30009)}
-    url,html = 
webviewer.getWebResult(authorize_url,autoForms=autoforms,autoClose=autoClose) 
#@UnusedVariable
-    return html
+class DbmcOauth2(object):
+    #HOST = 'http://localhost/xbmc-dropbox'
+    HOST = 'http://xbmc-dropbox.sourceforge.net'
+    PAGE = '/dbmc-accesscode/access-code.php'
+
+    def getAccessCode(self, sessionId, oauthUrl=None):
+        accesscode = ''
+        pin = ''
+        params = {'session': sessionId, 'action': 'get'}
+        if oauthUrl:
+            params['oauth_url'] = oauthUrl
+        result, data = self.getData(params)
+        if result == SUCCES:
+            try:
+                response = json.loads(data)
+                result = response['result']
+                accesscode = response['accesscode']
+                pin = response['PIN']
+            except Exception as e:
+                if not result:
+                    result = 'Failed to Decode response data: %s'%(repr(e))
+        return result, accesscode, pin
+ 
+    def removeAccessCode(self, sessionId, tokenRecieved):
+        params = {'session': sessionId, 'action': 'remove', 'auth_succes': 
tokenRecieved}
+        result, data = self.getData(params)
+        if result == SUCCES:
+            try:
+                response = json.loads(data)
+                result = response['result']
+            except Exception as e:
+                if not result:
+                    result = 'Failed to Decode response data: %s'%(repr(e))
+        return result
 
-if ( __name__ == "__main__" ):
-    doTokenDialog()
+    def getData(self, params):
+        paramsEnc = urllib.urlencode(params)
+        result = SUCCES
+        data = None
+        url = '%s%s'%(self.HOST, self.PAGE)
+        req = urllib2.Request(url, data=paramsEnc)
+        #f = urllib.urlopen('%s%s'%(self.HOST, self.PAGE), params )
+        #response = f.read()
+        try: 
+            response = urllib2.urlopen(req)
+            data = response.read()
+            log_debug('Received url data: %s'%repr(data))
+        except urllib2.URLError as e:
+            result = repr(e)
+        return result, data
diff --git a/plugin.dbmc/resources/settings.xml 
b/plugin.dbmc/resources/settings.xml
index c738df6..d71c451 100644
--- a/plugin.dbmc/resources/settings.xml
+++ b/plugin.dbmc/resources/settings.xml
@@ -12,6 +12,7 @@
         <setting label="30006" type="lsep"/>
         <setting label="30005" type="action" action="RunScript(plugin.dbmc, 
action=clear_token)"/>
         <setting label="30006" type="text" id="access_token" enable="false" 
default="" option="hidden"/>
+        <setting label="30006" type="text" id="session_id" enable="false" 
default="" option="hidden" visible="false"/>
     </category>
     <category label="30100">
         <setting label="30101" type="bool" id="synchronisation" 
default="false"/>

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

commit d1be3916a67d51095ed4bdc6fb03f2cf5555a12d
Author: sphere <[email protected]>
Date:   Tue Apr 15 08:15:19 2014 +0200

    [plugin.video.dumpert] updated to version 1.0.3

diff --git a/plugin.video.dumpert/addon.xml b/plugin.video.dumpert/addon.xml
index cadb535..3a29006 100644
--- a/plugin.video.dumpert/addon.xml
+++ b/plugin.video.dumpert/addon.xml
@@ -2,7 +2,7 @@
 <addon 
        id="plugin.video.dumpert" 
        name="Dumpert" 
-       version="1.0.2" 
+       version="1.0.3" 
        provider-name="Skipmode A1">
   <requires>
     <import addon="xbmc.python"                 version="2.1.0"/>
diff --git a/plugin.video.dumpert/changelog.txt 
b/plugin.video.dumpert/changelog.txt
index a62e64b..07ce0a4 100644
--- a/plugin.video.dumpert/changelog.txt
+++ b/plugin.video.dumpert/changelog.txt
@@ -7,4 +7,7 @@ v1.0.1 (Friday, 10 may 2013) :
 v1.0.2 (Saturday, 7 July 2013) :
 - added beautiful soup as dependency
 - added dutch strings
- 
\ No newline at end of file
+ 
+ v1.0.3 (Monday, 14 April 2014) :
+- adjustments to changes in the website. Thanks to TheGroove for helping out 
with the base64 stuff
+- video quality can be set in the settings now
\ No newline at end of file
diff --git a/plugin.video.dumpert/resources/language/Dutch/strings.xml 
b/plugin.video.dumpert/resources/language/Dutch/strings.xml
index ac1c2fc..ed02e92 100644
--- a/plugin.video.dumpert/resources/language/Dutch/strings.xml
+++ b/plugin.video.dumpert/resources/language/Dutch/strings.xml
@@ -20,8 +20,9 @@
     <string id="30203">MPlayer</string>
 
     <string id="30300">Video kwaliteit</string>
-    <string id="30301">Standaard</string>
-    <string id="30302">High Definition (indien beschikbaar)</string>
+    <string id="30301">Laag</string>
+    <string id="30302">Midden</string>
+    <string id="30303">Hoog (indien beschikbaar)</string>
     
        <string id="30400">Debug</string>
        
diff --git a/plugin.video.dumpert/resources/language/English/strings.xml 
b/plugin.video.dumpert/resources/language/English/strings.xml
index f374476..8fe3728 100644
--- a/plugin.video.dumpert/resources/language/English/strings.xml
+++ b/plugin.video.dumpert/resources/language/English/strings.xml
@@ -20,8 +20,9 @@
     <string id="30203">MPlayer</string>
 
     <string id="30300">Video quality</string>
-    <string id="30301">Standard</string>
-    <string id="30302">High Definition (if available)</string>
+    <string id="30301">Low</string>
+    <string id="30302">Medium</string>
+    <string id="30303">High (if available)</string>
     
        <string id="30400">Debug</string>
        
diff --git a/plugin.video.dumpert/resources/lib/dumpert_const.py 
b/plugin.video.dumpert/resources/lib/dumpert_const.py
index 9addb4f..08e247e 100644
--- a/plugin.video.dumpert/resources/lib/dumpert_const.py
+++ b/plugin.video.dumpert/resources/lib/dumpert_const.py
@@ -8,5 +8,5 @@ __addon__       = "plugin.video.dumpert"
 __settings__    = xbmcaddon.Addon(id=__addon__ )
 __language__    = __settings__.getLocalizedString
 __images_path__ = os.path.join( 
xbmcaddon.Addon(id=__addon__).getAddonInfo('path'), 'resources', 'images' )
-__date__        = "7 july 2013"
-__version__     = "1.0.2"
\ No newline at end of file
+__date__        = "14 april 2014"
+__version__     = "1.0.3"
\ No newline at end of file
diff --git a/plugin.video.dumpert/resources/lib/dumpert_play.py 
b/plugin.video.dumpert/resources/lib/dumpert_play.py
index a8534d6..78ac310 100644
--- a/plugin.video.dumpert/resources/lib/dumpert_play.py
+++ b/plugin.video.dumpert/resources/lib/dumpert_play.py
@@ -6,6 +6,8 @@ from dumpert_const import __addon__, __settings__, 
__language__, __images_path__
 from dumpert_utils import HTTPCommunicator
 import os
 import re
+import base64
+import ast
 import sys
 import urllib, urllib2
 import urlparse
@@ -24,6 +26,7 @@ class Main:
        def __init__( self ) :
                # Get plugin settings
                self.DEBUG = __settings__.getSetting('debug')
+               self.VIDEO = __settings__.getSetting('video')
                
                if (self.DEBUG) == 'true':
                        xbmc.log( "[ADDON] %s v%s (%s) debug mode, %s = %s, %s 
= %s" % ( __addon__, __version__, __date__, "ARGV", repr(sys.argv), "File", 
str(__file__) ), xbmc.LOGNOTICE )
@@ -78,15 +81,53 @@ class Main:
                        exit(1)
 
                soup = BeautifulSoup(html_data)
-               
-               #<div class="video" id="item1" 
data-vidurl="http://media.dumpert.nl/flv/70a1ae93_At_Princess_Juliana_International_Airport.mp4.flv";
 style="width: 480px; height: 272px;">
+
+               #<div class="videoplayer" id="video1" 
data-files="eyJmbHYiOiJodHRwOlwvXC9tZWRpYS5kdW1wZXJ0Lm5sXC9mbHZcLzI4OTE2NWRhXzEwMjU1NzUyXzYzODMxODA4OTU1NDc2MV84MTk0MzU3MDVfbi5tcDQuZmx2IiwidGFibGV0IjoiaHR0cDpcL1wvbWVkaWEuZHVtcGVydC5ubFwvdGFibGV0XC8yODkxNjVkYV8xMDI1NTc1Ml82MzgzMTgwODk1NTQ3NjFfODE5NDM1NzA1X24ubXA0Lm1wNCIsIm1vYmlsZSI6Imh0dHA6XC9cL21lZGlhLmR1bXBlcnQubmxcL21vYmlsZVwvMjg5MTY1ZGFfMTAyNTU3NTJfNjM4MzE4MDg5NTU0NzYxXzgxOTQzNTcwNV9uLm1wNC5tcDQiLCJzdGlsbCI6Imh0dHA6XC9cL3N0YXRpYy5kdW1wZXJ0Lm5sXC9zdGlsbHNcLzY1OTM1MjRfMjg5MTY1ZGEuanBnIn0="></div></div>
    
                video_urls = soup.findAll('div', attrs={'class': 
re.compile("video")}, limit=1)
                if len(video_urls) == 0:
                        no_url_found = True
                else:
-                       video_url = video_urls[0]['data-vidurl']
+                       video_url_enc = video_urls[0]['data-files']
+                       #base64 decode
+                       video_url_dec = str(base64.b64decode(video_url_enc))
+                       
#{"flv":"http:\/\/media.dumpert.nl\/flv\/5770e490_Jumbo_KOOP_DAN__Remix.avi.flv","tablet":"http:\/\/media.dumpert.nl\/tablet\/5770e490_Jumbo_KOOP_DAN__Remix.avi.mp4","mobile":"http:\/\/media.dumpert.nl\/mobile\/5770e490_Jumbo_KOOP_DAN__Remix.avi.mp4","720p":"http:\/\/media.dumpert.nl\/720p\/5770e490_Jumbo_KOOP_DAN__Remix.avi.mp4","still":"http:\/\/static.dumpert.nl\/stills\/6593503_5770e490.jpg"}
+                       
+                       if (self.DEBUG) == 'true':
+                               xbmc.log( "[ADDON] %s v%s (%s) debug mode, %s = 
%s" % ( __addon__, __version__, __date__, "video_url_dec", str(video_url_dec) 
), xbmc.LOGNOTICE )
+
+                       #convert string to dictionary
+                       video_url_dec_dict = ast.literal_eval(video_url_dec)
+                       
+                       #matching the desired and available quality
+                       if self.VIDEO == '0':
+                               try:
+                                       video_url = 
str(video_url_dec_dict['mobile'])
+                               except KeyError:
+                                       no_url_found = True
+                       elif self.VIDEO == '1':
+                               try:
+                                       video_url =  
str(video_url_dec_dict['tablet'])
+                               except KeyError:
+                                       try: 
+                                               video_url = 
str(video_url_dec_dict['mobile'])
+                                       except KeyError:
+                                               no_url_found = True
+                       elif self.VIDEO == '2':
+                               try:
+                                       video_url = 
str(video_url_dec_dict['720p'])
+                               except KeyError:
+                                       try:
+                                               video_url =  
str(video_url_dec_dict['tablet'])
+                                       except KeyError:        
+                                               try:
+                                                       video_url =  
str(video_url_dec_dict['mobile'])                          
+                                               except KeyError:
+                                                       no_url_found = True
+                                                       
+                       video_url = video_url.replace('\/','/')
                        if (self.DEBUG) == 'true':
                                xbmc.log( "[ADDON] %s v%s (%s) debug mode, %s = 
%s" % ( __addon__, __version__, __date__, "video_url", str(video_url) ), 
xbmc.LOGNOTICE )
+
                        if httpCommunicator.exists( video_url ):
                                have_valid_url = True
                        else:
diff --git a/plugin.video.dumpert/resources/settings.xml 
b/plugin.video.dumpert/resources/settings.xml
index de33972..110abf5 100644
--- a/plugin.video.dumpert/resources/settings.xml
+++ b/plugin.video.dumpert/resources/settings.xml
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <settings>
-       <setting id="debug"             label="30400" type="bool"   
default="false"/>
-</settings>
+<!--the number after default indicates the index, index 0 is the first lvalue, 
index 1 is the second lvalue and so on-->
+       <setting id="video"         label="30300" type="enum" default="2" 
lvalues="30301|30302|30303"/>
+       <setting id="debug"             label="30400" type="bool" 
default="false"/>
+</settings>
\ No newline at end of file

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

commit 7441aad2cc55fa6988dd30dd873be079c219ddc2
Author: sphere <[email protected]>
Date:   Tue Apr 15 08:14:38 2014 +0200

    [plugin.video.tv2.dk] updated to version 3.0.2

diff --git a/plugin.video.tv2.dk/addon.py b/plugin.video.tv2.dk/addon.py
index 97edb8a..a11917a 100644
--- a/plugin.video.tv2.dk/addon.py
+++ b/plugin.video.tv2.dk/addon.py
@@ -1,5 +1,5 @@
 #
-#      Copyright (C) 2013 Tommy Winther
+#      Copyright (C) 2014 Tommy Winther
 #      http://tommy.winther.nu
 #
 #  This Program is free software; you can redistribute it and/or modify
@@ -46,7 +46,15 @@ def listFeed():
     items = list()
     doc = ET.fromstring(data)
     for rssItem in doc.findall('channel/item'):
-        if not 'video' in rssItem.find('content').get('type'):
+        if rssItem.findtext("approved") != 'true':
+            continue
+        content = rssItem.find('content')
+        if content is None:
+            for c in rssItem.findall('group/content'):
+                if ('video' in c.get('type') and c.get('type') != 
'video/x-flv') or c.get('type') == 'application/x-mpegURL':
+                    content = c
+                    break
+        if content is None or (not 'video' in content.get('type') and 
content.get('type') != 'application/x-mpegURL') or content.get('type') == 
'video/x-flv':
             continue
 
         image = rssItem.findtext('defaultThumbnailUrl')
@@ -55,7 +63,7 @@ def listFeed():
         date = parseDate(rssItem.findtext('pubDate'))
 
         infoLabels = {}
-        duration = rssItem.find('content').get('duration')
+        duration = content.get('duration')
         if duration:
             infoLabels['duration'] = int(float(duration) / 60) + 1
         infoLabels['date'] = date.strftime('%d.%m.%Y')
@@ -65,24 +73,27 @@ def listFeed():
         item.setInfo('video', infoLabels)
         item.setProperty('Fanart_Image', FANART)
         item.setProperty('IsPlayable', 'true')
-        items.append((PATH + '?' + urllib.urlencode({'url': 
rssItem.find('content').get('url')}), item, False))
+        items.append((PATH + '?' + urllib.urlencode({'url': 
content.get('url')}), item, False))
 
     xbmcplugin.addDirectoryItems(HANDLE, items)
-    xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_DATE)
+    xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
     xbmcplugin.endOfDirectory(HANDLE)
 
 
 def playVideo(url):
     print url
     u = urllib2.urlopen(url)
-    smil = u.read()
+    response = u.read()
     u.close()
 
-    # strip namespaces
-    smil = re.sub('xmlns=[^>]+', '', smil)
+    if response[0:7] == '#EXTM3U':
+        src = url
+    else:
+        # strip namespaces
+        smil = re.sub('xmlns=[^>]+', '', response)
+        doc = ET.fromstring(smil)
+        src = doc.find('body/seq/switch/video').get('src')
 
-    doc = ET.fromstring(smil)
-    src = doc.find('body/seq/switch/video').get('src')
     item = xbmcgui.ListItem(path=src)
     xbmcplugin.setResolvedUrl(HANDLE, True, item)
 
diff --git a/plugin.video.tv2.dk/addon.xml b/plugin.video.tv2.dk/addon.xml
index 1297f02..911c1a6 100644
--- a/plugin.video.tv2.dk/addon.xml
+++ b/plugin.video.tv2.dk/addon.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
-       id="plugin.video.tv2.dk" version="3.0.1" name="TV2 Video" 
provider-name="twinther">
+       id="plugin.video.tv2.dk" version="3.0.2" name="TV2 Video" 
provider-name="twinther">
        <requires>
                <import addon="xbmc.python" version="2.1.0"/>
                <import addon="script.module.buggalo" version="1.1.5"/>
diff --git a/plugin.video.tv2.dk/changelog.txt 
b/plugin.video.tv2.dk/changelog.txt
index 263cf9b..bef1be8 100644
--- a/plugin.video.tv2.dk/changelog.txt
+++ b/plugin.video.tv2.dk/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 3.0.2 - 2014-04-14[/B]
+- Fixed problem with listing and playing application/x-mpegURL streams
+- Blocked video/x-flv streams as they are not playable by XBMC
+
 [B]Version 3.0.1 - 2013-11-27[/B]
 - Only list videos
 

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

Summary of changes:
 plugin.dbmc/addon.py                               |   20 ++--
 plugin.dbmc/addon.xml                              |    3 +-
 plugin.dbmc/changelog.txt                          |    3 +
 plugin.dbmc/resources/language/Dutch/strings.po    |   32 ++--
 plugin.dbmc/resources/language/English/strings.po  |   16 +-
 plugin.dbmc/resources/language/Italian/strings.po  |   32 ++--
 plugin.dbmc/resources/lib/login.py                 |  147 +++++++++++++-------
 plugin.dbmc/resources/settings.xml                 |    1 +
 plugin.video.dumpert/addon.xml                     |    2 +-
 plugin.video.dumpert/changelog.txt                 |    5 +-
 .../resources/language/Dutch/strings.xml           |    5 +-
 .../resources/language/English/strings.xml         |    5 +-
 .../resources/lib/dumpert_const.py                 |    4 +-
 plugin.video.dumpert/resources/lib/dumpert_play.py |   47 ++++++-
 plugin.video.dumpert/resources/settings.xml        |    6 +-
 plugin.video.tv2.dk/addon.py                       |   31 +++--
 plugin.video.tv2.dk/addon.xml                      |    2 +-
 plugin.video.tv2.dk/changelog.txt                  |    4 +
 18 files changed, 236 insertions(+), 129 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to