The branch, frodo has been updated
       via  82c6a9a09361f6cc36a532688ec31a6c36756aec (commit)
       via  2445495adc4e7f9dbe26d075febdbc6206c27b87 (commit)
      from  72d05c62e628f8b86cc61b2ae777ea46f05ca20f (commit)

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

commit 82c6a9a09361f6cc36a532688ec31a6c36756aec
Author: beenje <[email protected]>
Date:   Thu Dec 27 23:44:18 2012 +0100

    [plugin.audio.radio_de] updated to version 2.1.3

diff --git a/plugin.audio.radio_de/addon.py b/plugin.audio.radio_de/addon.py
index 0363934..5c909b5 100644
--- a/plugin.audio.radio_de/addon.py
+++ b/plugin.audio.radio_de/addon.py
@@ -99,9 +99,9 @@ def show_top_stations():
 
 @plugin.route('/stations/search/')
 def search():
-    search_string = __keyboard(_('enter_name_country_or_language'))
-    if search_string:
-        url = plugin.url_for('search_result', search_string=search_string)
+    query = plugin.keyboard(heading=_('enter_name_country_or_language'))
+    if query:
+        url = plugin.url_for('search_result', search_string=query)
         plugin.redirect(url)
 
 
@@ -126,7 +126,7 @@ def custom_my_station(station_id):
         station = [s for s in stations if s['id'] == station_id][0]
     for param in ('name', 'thumbnail', 'stream_url'):
         heading = _('please_enter') % _(param)
-        station[param] = __keyboard(heading, station.get(param, '')) or ''
+        station[param] = plugin.keyboard(station.get(param, ''), heading) or ''
     station_name = station.get('name', 'custom')
     station_id = station_name.decode('ascii', 'ignore').encode('ascii')
     station['id'] = station_id
@@ -186,13 +186,6 @@ def get_stream_url(station_id):
     return plugin.set_resolved_url(stream_url)
 
 
-def __keyboard(title, text=''):
-    keyboard = xbmc.Keyboard(text, title)
-    keyboard.doModal()
-    if keyboard.isConfirmed() and keyboard.getText():
-        return keyboard.getText()
-
-
 def __add_stations(stations, add_custom=False):
     __log('__add_stations started with %d items' % len(stations))
     items = []
@@ -219,7 +212,7 @@ def __add_stations(stations, add_custom=False):
             ))
         items.append({
             'label': station.get('name', ''),
-            'thumbnail': station.get('thumbnail', '').replace('_1', '_4'),
+            'thumbnail': station.get('thumbnail_trans', ''),
             'icon': station.get('thumbnail', ''),
             'info': {
                 'title': station.get('name', ''),
diff --git a/plugin.audio.radio_de/addon.xml b/plugin.audio.radio_de/addon.xml
index d65e187..a5fa07f 100644
--- a/plugin.audio.radio_de/addon.xml
+++ b/plugin.audio.radio_de/addon.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.audio.radio_de" name="Radio" version="2.0.2" 
provider-name="Tristan Fischer ([email protected])">
+<addon id="plugin.audio.radio_de" name="Radio" version="2.1.3" 
provider-name="Tristan Fischer ([email protected])">
   <requires>
-    <import addon="xbmc.python" version="2.0"/>
-    <import addon="script.module.xbmcswift2" version="1.2.0" />
+    <import addon="xbmc.python" version="2.1.0"/>
+    <import addon="script.module.xbmcswift2" version="1.3.0"/>
     <import addon="script.module.simplejson" version="2.0.10"/>
   </requires>
   <extension point="xbmc.python.pluginsource" library="addon.py">
diff --git a/plugin.audio.radio_de/changelog.txt 
b/plugin.audio.radio_de/changelog.txt
index 82a274d..a5b3717 100644
--- a/plugin.audio.radio_de/changelog.txt
+++ b/plugin.audio.radio_de/changelog.txt
@@ -1,3 +1,8 @@
+2.1.3 (26.12.2012)
+    - better station logos
+    - fix unicode error
+    - change to xbmcswift 1.3.0
+
 2.0.2 (16.12.2012)
     - fix no genre available (resulted in script error)
 
diff --git a/plugin.audio.radio_de/resources/lib/api.py 
b/plugin.audio.radio_de/resources/lib/api.py
index 3d13345..ed32853 100644
--- a/plugin.audio.radio_de/resources/lib/api.py
+++ b/plugin.audio.radio_de/resources/lib/api.py
@@ -135,8 +135,6 @@ class RadioApi():
                  % (path, param))
         url = '%s/%s' % (self.api_url, path)
         if param:
-            # fix urllib's unicode handling in urlencode
-            param = dict((k, v.encode('utf-8')) for (k, v) in param.items())
             url += '?%s' % urlencode(param)
         response = self.__urlopen(url)
         json_data = json.loads(response)
@@ -145,15 +143,14 @@ class RadioApi():
     def __resolve_playlist(self, stream_url):
         self.log('__resolve_playlist started with stream_url=%s'
                  % stream_url)
-        stream_url = stream_url.lower()
-        if stream_url.endswith('m3u'):
+        if stream_url.lower().endswith('m3u'):
             response = self.__urlopen(stream_url)
             self.log('__resolve_playlist found .m3u file')
             for line in response.splitlines():
                 if line and not line.strip().startswith('#'):
                     stream_url = line.strip()
                     break
-        elif stream_url.endswith('pls'):
+        elif stream_url.lower().endswith('pls'):
             response = self.__urlopen(stream_url)
             self.log('__resolve_playlist found .pls file')
             for line in response.splitlines():
@@ -180,7 +177,13 @@ class RadioApi():
     def __format_stations(stations):
         formated_stations = []
         for station in stations:
-            if station['picture1Name']:
+            if station.get('picture1TransName'):
+                thumbnail_trans = (
+                    station['pictureBaseURL'] + station['picture1TransName']
+                ).replace('_1_', '_4_')
+            else:
+                thumbnail_trans = ''
+            if station.get('picture1Name'):
                 thumbnail = station['pictureBaseURL'] + station['picture1Name']
             else:
                 thumbnail = ''
@@ -190,6 +193,7 @@ class RadioApi():
             formated_stations.append({
                 'name': station['name'],
                 'thumbnail': thumbnail,
+                'thumbnail_trans': thumbnail,
                 'rating': station['rating'],
                 'genre': genre,
                 'bitrate': station['bitrate'],

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

commit 2445495adc4e7f9dbe26d075febdbc6206c27b87
Author: beenje <[email protected]>
Date:   Thu Dec 27 23:03:14 2012 +0100

    [plugin.video.s04tv] updated to version 2.0.0

diff --git a/plugin.video.s04tv/addon.xml b/plugin.video.s04tv/addon.xml
index 8d70ce8..bf66e36 100644
--- a/plugin.video.s04tv/addon.xml
+++ b/plugin.video.s04tv/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.s04tv" name="S04tv" version="1.0.2" 
provider-name="malte">
+<addon id="plugin.video.s04tv" name="S04tv" version="2.0.0" 
provider-name="malte">
     <requires>
-        <import addon="xbmc.python" version="2.0"/>
+        <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.mechanize" version="0.2.5"/>
         <import addon="script.module.beautifulsoup" version="3.2.0"/>
     </requires>
diff --git a/plugin.video.s04tv/changelog.txt b/plugin.video.s04tv/changelog.txt
index af15f18..c07ce67 100644
--- a/plugin.video.s04tv/changelog.txt
+++ b/plugin.video.s04tv/changelog.txt
@@ -1,5 +1,5 @@
-1.0.2 (2012/11):
-- updated language tag
+2.0.0 (2012/12):
+- url encoding fixed
 
 1.0.1 (2012/11):
 - update due to website changes
diff --git a/plugin.video.s04tv/default.py b/plugin.video.s04tv/default.py
index d2bc5e2..5928c63 100644
--- a/plugin.video.s04tv/default.py
+++ b/plugin.video.s04tv/default.py
@@ -16,6 +16,7 @@ import xbmcgui
 import xbmcaddon
 import os, sys, re
 import urllib, urllib2
+from urlparse import *
 
 PLUGINNAME = 'S04tv'
 PLUGINID = 'plugin.video.s04tv'
@@ -27,7 +28,7 @@ addonPath = ''
 import xbmcaddon
 __addon__ = xbmcaddon.Addon(id='plugin.video.s04tv')
 addonPath = __addon__.getAddonInfo('path')
-               
+        
 BASE_RESOURCE_PATH = os.path.join(addonPath, "resources" )
 sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
 sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib", "BeautifulSoup" ) )
@@ -43,133 +44,133 @@ browser = mechanize.Browser()
 
 
 def buildVideoList(doc):
-       xbmc.log('buildVideoList')
-       
-       #parse complete document
-       soup = BeautifulSoup(''.join(doc))
-       
-       container = soup.findAll('div', attrs={'class' : 'layout_full'})
-       if(not container):
-               xbmc.log('Error while building video list. class "layout_full" 
not found.')
-               return
-       
-       #iterate content
-       for content in container[0].contents:
-               #ignore NavigableStrings
-               if(type(content).__name__ == 'NavigableString'):                
-                       continue
-                                               
-               itemTitle = findTitle(content, 'div', {'class' : 'field 
Headline'})             
-               if(itemTitle == ''):
-                       xbmc.log('Error while building video list. class "field 
Headline" not found.')
-                       continue
-               
-               titlePart2 = findTitle(content, 'div', {'class' : 'field 
untertitel'})          
-               if(titlePart2 == ''):
-                       titlePart2 = findTitle(content, 'div', {'class' : 
'field Beitragsart'})
-               
-               if(titlePart2 != ''):
-                       itemTitle = itemTitle +': ' +titlePart2
-               
-               linkValue = ''
-               imageUrlValue = ''
-               imageTag = content.find('div', attrs={'class' : 'field Bild'})
-               if(imageTag):
-                       link = imageTag.find('a')
-                       linkValue = link['href']
-                       imageUrl = imageTag.find('img') 
-                       imageUrlValue = BASE_URL +imageUrl['src']
-               else:
-                       xbmc.log('Error while building video list. class "field 
Bild" not found.')
-                       continue
-                       
-               url = BASE_URL + linkValue
-               addDir(itemTitle, url, 2, imageUrlValue)
-       
-       #previous page
-       previousTag = soup.find('a', attrs={'class' : 'previous'})
-       if(previousTag):
-               pageLink = previousTag['href']
-               itemTitle = __language__(30002)
-               url = BASE_URL + pageLink
-               addDir(itemTitle, url, 1, '')
-       
-       #next page
-       nextTag = soup.find('a', attrs={'class' : 'next'})
-       if(nextTag):
-               pageLink = nextTag['href']
-               itemTitle = __language__(30003)
-               url = BASE_URL + pageLink
-               addDir(itemTitle, url, 1, '')
+    xbmc.log('buildVideoList')
+    
+    #parse complete document
+    soup = BeautifulSoup(''.join(doc))
+    
+    container = soup.findAll('div', attrs={'class' : 'layout_full'})
+    if(not container):
+        xbmc.log('Error while building video list. class "layout_full" not 
found.')
+        return
+    
+    #iterate content
+    for content in container[0].contents:
+        #ignore NavigableStrings
+        if(type(content).__name__ == 'NavigableString'):        
+            continue
+                        
+        itemTitle = findTitle(content, 'div', {'class' : 'field Headline'})    
    
+        if(itemTitle == ''):
+            xbmc.log('Error while building video list. class "field Headline" 
not found.')
+            continue
+        
+        titlePart2 = findTitle(content, 'div', {'class' : 'field untertitel'}) 
       
+        if(titlePart2 == ''):
+            titlePart2 = findTitle(content, 'div', {'class' : 'field 
Beitragsart'})
+        
+        if(titlePart2 != ''):
+            itemTitle = itemTitle +': ' +titlePart2
+        
+        linkValue = ''
+        imageUrlValue = ''
+        imageTag = content.find('div', attrs={'class' : 'field Bild'})
+        if(imageTag):
+            link = imageTag.find('a')
+            linkValue = link['href']
+            imageUrl = imageTag.find('img')    
+            imageUrlValue = BASE_URL +imageUrl['src']
+        else:
+            xbmc.log('Error while building video list. class "field Bild" not 
found.')
+            continue
+            
+        url = BASE_URL + linkValue
+        addDir(itemTitle, url, 2, imageUrlValue)
+    
+    #previous page
+    previousTag = soup.find('a', attrs={'class' : 'previous'})
+    if(previousTag):
+        pageLink = previousTag['href']
+        itemTitle = __language__(30002)
+        url = BASE_URL + pageLink
+        addDir(itemTitle, url, 1, '')
+    
+    #next page
+    nextTag = soup.find('a', attrs={'class' : 'next'})
+    if(nextTag):
+        pageLink = nextTag['href']
+        itemTitle = __language__(30003)
+        url = BASE_URL + pageLink
+        addDir(itemTitle, url, 1, '')
 
 
 def buildVideoLinks(doc, name):
-       xbmc.log('buildVideoLinks')
-
-       #parse complete document
-       soup = BeautifulSoup(''.join(doc))
-       videoTag = soup.find('video')
-       
-       if(videoTag):
-               sourceTag = videoTag.find('source')
-               if(sourceTag):
-                       videoUrl = sourceTag['src']
-                       xbmc.log('start playing video: ' +videoUrl)
-                       addLink(name, videoUrl, os.path.join(addonPath, 
'icon.png'))
-               else:
-                       xbmc.log('Error while loading video from page. Maybe 
you are not logged in or site structure has changed.')
-       else:
-               xbmc.log('Error while loading video from page. Maybe you are 
not logged in or site structure has changed.')
-               
+    xbmc.log('buildVideoLinks')
+
+    #parse complete document
+    soup = BeautifulSoup(''.join(doc))
+    videoTag = soup.find('video')
+    
+    if(videoTag):
+        sourceTag = videoTag.find('source')
+        if(sourceTag):
+            videoUrl = sourceTag['src']
+            xbmc.log('start playing video: ' +videoUrl)
+            addLink(name, videoUrl, os.path.join(addonPath, 'icon.png'))
+        else:
+            xbmc.log('Error while loading video from page. Maybe you are not 
logged in or site structure has changed.')
+    else:
+        xbmc.log('Error while loading video from page. Maybe you are not 
logged in or site structure has changed.')
+        
 
 def provideTestvideoDir():
 
-       xbmc.log('provideTestvideo')
-       
-       url = 'https://www.s04tv.de/index.php/s04tv-kostenlos.html'
-       browser.open(url)       
-       doc = browser.response().read()
-       soup = BeautifulSoup(''.join(doc))
-       
-       print 'site loaded'
-       
-       imageTag = soup.find('div', attrs={'class' : 'field Bild'})
-       if(not imageTag):
-               xbmc.log('Error while loading test video. div "field Bild" not 
found.')
-               return
-       
-       link = imageTag.find('a')
-       if(not link):
-               xbmc.log('Error while loading test video. "a href" not found.')
-       linkValue = link['href']
-       imageUrl = imageTag.find('img') 
-       imageUrlValue = BASE_URL +imageUrl['src']
-       
-       newUrl = BASE_URL +linkValue
-       
-       print 'new url: ' +str(newUrl)
-       browser.open(newUrl)
-       
-       doc = browser.response().read()
-       soup = BeautifulSoup(''.join(doc))
-       
-       videoTag = soup.find('video')
-       if(not videoTag):
-               xbmc.log('Error while loading test video. "video" tag not 
found.')
-               return
-       sourceTag = videoTag.find('source')
-       if(not sourceTag):
-               xbmc.log('Error while loading test video. "video" tag not 
found.')
-               return
-       
-       videoUrl = sourceTag['src']
-       print 'videoUrl: ' +videoUrl
-       
-       addLink(__language__(30004), videoUrl, imageUrlValue)
+    xbmc.log('provideTestvideo')
+    
+    url = 'https://www.s04tv.de/index.php/s04tv-kostenlos.html'
+    browser.open(url)    
+    doc = browser.response().read()
+    soup = BeautifulSoup(''.join(doc))
+    
+    xbmc.log('site loaded')
+    
+    imageTag = soup.find('div', attrs={'class' : 'field Bild'})
+    if(not imageTag):
+        xbmc.log('Error while loading test video. div "field Bild" not found.')
+        return
+    
+    link = imageTag.find('a')
+    if(not link):
+        xbmc.log('Error while loading test video. "a href" not found.')
+    linkValue = link['href']
+    imageUrl = imageTag.find('img')    
+    imageUrlValue = BASE_URL +imageUrl['src']
+    
+    newUrl = BASE_URL +linkValue
+    
+    xbmc.log('new url: ' +newUrl)
+    browser.open(newUrl)
+    
+    doc = browser.response().read()
+    soup = BeautifulSoup(''.join(doc))
+    
+    videoTag = soup.find('video')
+    if(not videoTag):
+        xbmc.log('Error while loading test video. "video" tag not found.')
+        return
+    sourceTag = videoTag.find('source')
+    if(not sourceTag):
+        xbmc.log('Error while loading test video. "video" tag not found.')
+        return
+    
+    videoUrl = sourceTag['src']
+    addLink(__language__(30004), videoUrl, imageUrlValue)
 
 
 def addDir(name,url,mode,iconimage):
-    u = sys.argv[0] +"?url=" +url +"&mode=" +str(mode)+"&name=" +name
+    parameters = {'url' : url, 'mode' : str(mode), 'name' : 
__language__(30005)}
+    u = sys.argv[0] +'?' +urllib.urlencode(parameters)
+    xbmc.log('addDir url = ' +str(u))
     ok = True
     liz = xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
     liz.setInfo(type="Video", infoLabels={"Title": name})
@@ -178,6 +179,7 @@ def addDir(name,url,mode,iconimage):
    
 
 def addLink(name,url,iconimage):
+    xbmc.log('addLink url = ' +str(url))
     ok = True
     liz = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
     liz.setInfo(type="Video", infoLabels={ "Title": name})
@@ -186,162 +188,146 @@ def addLink(name,url,iconimage):
 
 
 def findTitle(content, searchTag, attrs):
-       itemTitle = ''
-       titlePart1 = content.find(searchTag, attrs)                             
-       if(titlePart1):
-               titlePart1Value = titlePart1.find('div', attrs={'class' : 
'value'})                             
-               if(titlePart1Value):
-                       itemTitle = titlePart1Value.string
-       if(itemTitle == None):
-               itemTitle = ''
-       return itemTitle
-
-
-def get_params():
-    ''' Convert parameters encoded in a URL to a dict. '''
-    parameters = sys.argv[2]
-    
-    paramDict = {}
-    if parameters:
-        paramPairs = parameters[1:].split("&")
-        for paramsPair in paramPairs:
-            paramSplits = paramsPair.split('=')
-            if (len(paramSplits)) == 2:
-                paramDict[paramSplits[0]] = paramSplits[1]
-            #HACK: support urls like ?page=2
-            elif (len(paramSplits)) == 3:
-                paramDict[paramSplits[0]] = paramSplits[1] +'=' 
+paramSplits[2] 
-    return paramDict
+    itemTitle = ''
+    titlePart1 = content.find(searchTag, attrs)                
+    if(titlePart1):
+        titlePart1Value = titlePart1.find('div', attrs={'class' : 'value'})    
            
+        if(titlePart1Value):
+            itemTitle = titlePart1Value.string
+    if(itemTitle == None):
+        itemTitle = ''
+    return itemTitle
+
 
 
 def login(cookieFile):
-       
-       username = __addon__.getSetting('username')
-       xbmc.log('username: ' +username) 
-       password = __addon__.getSetting('password')
-       
-       cj = mechanize.LWPCookieJar()
-       
-       try:
-               xbmc.log('load cookie file')
-               #ignore_discard=True loads session cookies too
-               cj.load(cookieFile, ignore_discard=True)
-               browser.set_cookiejar(cj)
-               
-               xbmc.log('cookies loaded, checking if they are still valid...')
-               browser.open("https://www.s04tv.de";)
-               doc = browser.response().read()
-               
-               loginStatus = checkLogin(doc, username)
-               if(loginStatus == 0):
-                       return True
-       #if cookie file does not exist we just keep going...
-       except IOError:
-               xbmc.log('Error loading cookie file. Trying to log in again.')
-               pass
-       
-       xbmc.log('Logging in')  
-               
-       browser.open("https://www.s04tv.de";)
-       #HACK: find out how to address form by name
-       browser.select_form(nr=0)
-       browser.form['username'] = username
-       browser.form['password'] = password
-       browser.submit()
-       
-       cj.save(cookieFile, ignore_discard=True)
-       
-       doc = browser.response().read()
-       loginStatus = checkLogin(doc, username)                 
-       return loginStatus == 0
-       
+
+    username = __addon__.getSetting('username')
+    xbmc.log('username: ' +username) 
+    password = __addon__.getSetting('password')
+    
+    cj = mechanize.LWPCookieJar()
+    
+    try:
+        xbmc.log('load cookie file')
+        #ignore_discard=True loads session cookies too
+        cj.load(cookieFile, ignore_discard=True)
+        browser.set_cookiejar(cj)
+        
+        xbmc.log('cookies loaded, checking if they are still valid...')
+        browser.open("https://www.s04tv.de";)
+        doc = browser.response().read()
+        
+        loginStatus = checkLogin(doc, username)
+        if(loginStatus == 0):
+            return True
+    #if cookie file does not exist we just keep going...
+    except IOError:
+        xbmc.log('Error loading cookie file. Trying to log in again.')
+        pass
+    
+    xbmc.log('Logging in')    
+        
+    browser.open("https://www.s04tv.de";)
+    #HACK: find out how to address form by name
+    browser.select_form(nr=0)
+    browser.form['username'] = username
+    browser.form['password'] = password
+    browser.submit()
+    
+    cj.save(cookieFile, ignore_discard=True)
+    
+    doc = browser.response().read()
+    loginStatus = checkLogin(doc, username)            
+    return loginStatus == 0
+    
 
 def checkLogin(doc, username):
-       
-       print 'checkLogin'
-       
-       matchLoginSuccessful = re.search('Sie sind angemeldet als', doc, 
re.IGNORECASE)
-       if(matchLoginSuccessful):
-               xbmc.log('login successful')
-               return 0
-       
-       matchLoginFailed = re.search('Anmeldung fehlgeschlagen', doc, 
re.IGNORECASE)
-       if(matchLoginFailed):
-               xbmc.log('login failed')
-               xbmcgui.Dialog().ok(PLUGINNAME, __language__(30100) %username, 
__language__(30101))
-               return 1
-       
-       matchLoginFailed = re.search('Bitte geben Sie Benutzername und Passwort 
ein', doc, re.IGNORECASE)
-       if(matchLoginFailed):
-               xbmc.log('no username or password')
-               xbmcgui.Dialog().ok(PLUGINNAME, __language__(30102), 
__language__(30103))
-               return 1
-       
-       #not logged in but we don't know the reason
-       xbmc.log('You are not logged in.')
-       #Guess we are not logged in
-       return 1
-       
+    
+    print 'checkLogin'
+    
+    matchLoginSuccessful = re.search('Sie sind angemeldet als', doc, 
re.IGNORECASE)
+    if(matchLoginSuccessful):
+        xbmc.log('login successful')
+        return 0
+    
+    matchLoginFailed = re.search('Anmeldung fehlgeschlagen', doc, 
re.IGNORECASE)
+    if(matchLoginFailed):
+        xbmc.log('login failed')
+        xbmcgui.Dialog().ok(PLUGINNAME, __language__(30100) %username, 
__language__(30101))
+        return 1
+    
+    matchLoginFailed = re.search('Bitte geben Sie Benutzername und Passwort 
ein', doc, re.IGNORECASE)
+    if(matchLoginFailed):
+        xbmc.log('no username or password')
+        xbmcgui.Dialog().ok(PLUGINNAME, __language__(30102), 
__language__(30103))
+        return 1
+    
+    #not logged in but we don't know the reason
+    xbmc.log('You are not logged in.')
+    #Guess we are not logged in
+    return 1
+    
 
 
 def runPlugin(doc):
-       
-       if mode==None or doc==None or len(doc)<1:
-               buildVideoList(doc)
+    
+    if mode==None or doc==None or len(doc)<1:
+        buildVideoList(doc)
        
-       elif mode==1:
-               buildVideoList(doc)
-               
-       elif mode==2:
-               buildVideoLinks(doc,name)
+    elif mode==1:
+        buildVideoList(doc)
+            
+    elif mode==2:
+        buildVideoLinks(doc,name)
 
 
-print 'start'
+print 'S04TV: start addon'
 
-params=get_params()
+params = parse_qs(urlparse(sys.argv[2]).query)
 url=None
 name=None
 mode=None
 
 try:
-       url=params["url"]
+    url=params["url"][0]
 except:
-       pass
+    pass
 try:
-       name=params["name"]
+    name=params["name"][0]
 except:
-       pass
+    pass
 try:
-       mode=int(params["mode"])
+    mode=int(params["mode"][0])
 except:
-       pass
+    pass
 
 print "Mode: "+str(mode)
 print "URL: "+str(url)
 print "Name: "+str(name)
 
 if(url == None):
-       url = BASE_URL
+    url = BASE_URL
 
 path = xbmc.translatePath('special://profile/addon_data/%s' %(PLUGINID))
 
 if not os.path.exists(path):
-       try:
-               os.makedirs(path)
-       except:
-               path = ''
+    try:
+        os.makedirs(path)
+    except:
+        path = ''
 
 success = login(os.path.join(path, 'cookies.txt'))
 
 
 if(success):
-       browser.open(url)
-       doc = browser.response().read()
-       runPlugin(doc)
+    browser.open(url)
+    doc = browser.response().read()
+    runPlugin(doc)
 else:
-       provideTestvideoDir()
+    provideTestvideoDir()
 
 xbmcplugin.endOfDirectory(thisPlugin)
-       
-       
+    
+    
 
diff --git a/plugin.video.s04tv/resources/language/English/strings.xml 
b/plugin.video.s04tv/resources/language/English/strings.xml
index eab593b..45553a2 100644
--- a/plugin.video.s04tv/resources/language/English/strings.xml
+++ b/plugin.video.s04tv/resources/language/English/strings.xml
@@ -5,6 +5,7 @@
        <string id="30002">Previous page</string>

        <string id="30003">Next page</string>

        <string id="30004">Play test video</string>

+       <string id="30005">Play video</string>

        

        <string id="30100">Login failed for user "%s".</string> 

        <string id="30101">Please validate your credentials in plugin 
settings.</string>

diff --git a/plugin.video.s04tv/resources/language/German/strings.xml 
b/plugin.video.s04tv/resources/language/German/strings.xml
index b7326a2..8738522 100644
--- a/plugin.video.s04tv/resources/language/German/strings.xml
+++ b/plugin.video.s04tv/resources/language/German/strings.xml
@@ -5,6 +5,7 @@
        <string id="30002">Vorherige Seite</string>

        <string id="30003">Nächste Seite</string>

        <string id="30004">Testvideo abspielen</string>

+       <string id="30005">Video abspielen</string>

        

        <string id="30100">Login fehlgeschlagen für Benutzer "%s".</string>

        <string id="30101">Überprüfe Deine Daten in den 
Plugin-Einstellungen.</string>


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

Summary of changes:
 plugin.audio.radio_de/addon.py                     |   17 +-
 plugin.audio.radio_de/addon.xml                    |    6 +-
 plugin.audio.radio_de/changelog.txt                |    5 +
 plugin.audio.radio_de/resources/lib/api.py         |   16 +-
 plugin.video.s04tv/addon.xml                       |    4 +-
 plugin.video.s04tv/changelog.txt                   |    4 +-
 plugin.video.s04tv/default.py                      |  460 ++++++++++----------
 .../resources/language/English/strings.xml         |    1 +
 .../resources/language/German/strings.xml          |    1 +
 9 files changed, 252 insertions(+), 262 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to