The branch, frodo has been updated
       via  25942a6f87ea4ae34700375b81c3baf9930961c4 (commit)
       via  7f4e83ce87352c2e6b55f08afd520636c7236244 (commit)
      from  30571739e501acc262d82107b8318a0beaadf5f6 (commit)

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

commit 25942a6f87ea4ae34700375b81c3baf9930961c4
Author: beenje <bee...@xbmc.org>
Date:   Thu Nov 14 22:28:00 2013 +0100

    [plugin.video.flw.outdoors] updated to version 1.0.2

diff --git a/plugin.video.flw.outdoors/addon.xml 
b/plugin.video.flw.outdoors/addon.xml
index 47c6bdf..7d0aa81 100644
--- a/plugin.video.flw.outdoors/addon.xml
+++ b/plugin.video.flw.outdoors/addon.xml
@@ -1,19 +1,28 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="plugin.video.flw.outdoors"

-       name="FLW Outdoors"

-       version="1.0.1"

-       provider-name="divingmule">

-  <requires>

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

-       <import addon="script.module.simplejson"/>

-  </requires>

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

-            library="default.py">

-        <provides>video</provides>

-  </extension>

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

-    <summary>Fishing Shows from FLW Outdoors On Demand</summary>

-    <description>FLW Outdoors, named after Forrest L. Wood, the legendary 
founder of Ranger Boats, is the largest fishing tournament organization in the 
world and is offering anglers the chance to win more than $33 million through 
231 tournaments in 2009. FLW Outdoors also has taken fishing mainstream with 
FLW Fantasy Fishing, having paid out the largest awards in the history of 
fantasy sports.</description>

-    <platform>all</platform>

-  </extension>

-</addon>

+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="plugin.video.flw.outdoors"
+       name="FLW Outdoors"
+       version="1.0.2"
+       provider-name="divingmule">
+  <requires>
+    <import addon="xbmc.python" version="2.1.0"/>
+    <import addon="script.common.plugin.cache" version="2.5.2"/>
+    <import addon="plugin.video.youtube" version="4.4.6"/>
+    <import addon="script.module.beautifulsoup" version="3.2.1"/>
+  </requires>
+  <extension point="xbmc.python.pluginsource" library="default.py">
+    <provides>video</provides>
+  </extension>
+  <extension point="xbmc.addon.metadata">
+    <summary>Fishing Shows from FLW Outdoors On Demand</summary>
+    <description>
+        FLW is the premier tournament fishing organization that provides
+        unparalleled fishing resources and entertainment to our anglers,
+        sponsors, fans and host communities.
+    </description>
+    <platform>all</platform>
+    <language>en</language>
+    <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
+    <source>https://code.google.com/p/flw-xbmc/</source>
+    <forum></forum>
+  </extension>
+</addon>
diff --git a/plugin.video.flw.outdoors/changelog.txt 
b/plugin.video.flw.outdoors/changelog.txt
index d2d9d29..8d27a82 100644
--- a/plugin.video.flw.outdoors/changelog.txt
+++ b/plugin.video.flw.outdoors/changelog.txt
@@ -1,3 +1,6 @@
+Version 1.0.2

+updated for frodo/gotham

+

 Version 1.0.1

 fix for website changes

 

diff --git a/plugin.video.flw.outdoors/default.py 
b/plugin.video.flw.outdoors/default.py
index 00ff900..5d3a7d2 100644
--- a/plugin.video.flw.outdoors/default.py
+++ b/plugin.video.flw.outdoors/default.py
@@ -1,112 +1,170 @@
-import urllib,urllib2,re,os

-import xbmcplugin,xbmcgui,xbmcaddon

-try:

-    import json

-except:

-    import simplejson as json

-

-__settings__ = xbmcaddon.Addon(id='plugin.video.flw.outdoors')

-__language__ = __settings__.getLocalizedString

-__home__ = __settings__.getAddonInfo('path')

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

-

-

-def CATEGORIES():

-        
addDir(__language__(30000),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=flwlatestvideos&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30001),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=flwtv&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30002),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=tipsfromthepros&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30003),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=flwtour&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30004),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=fantasyonflw&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30005),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=collegeonflw&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30006),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=flwpodcast&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30007),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=ReelCast&method=getVideosInChannel',1,icon)

-        
addDir(__language__(30008),'http://www.flwoutdoors.com/flwMedia/ajax.cfm?callsign=flwmagpublic&method=getVideosInChannel',1,icon)

-

-

-def INDEX(url):

-        req = urllib2.Request(url)

-        req.addheaders = [('Referer', 
'http://www.flwoutdoors.com/flwondemand.cfm?cs=flwtour'),

-                        ('Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; 
rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)')]

-        response = urllib2.urlopen(req)

-        link=response.read()

-        data=json.loads(link)

-        videos = data["CHANNEL"]["AFILE"]

-        for video in videos:

-            title = video["TITLE"]

-            if not video["PATH"]=='':

-                path = video["PATH"]

-            else:

-                path = 'http://www.jidocs.com'+str(video["STREAMING_PATH"])[4:]

-            thumbnail = video["THUMBNAIL"]

-            description = video["DESCRIPTION"]

-            addLink (title,path,description,thumbnail)

-        

-

-def get_params():

-        param=[]

-        paramstring=sys.argv[2]

-        if len(paramstring)>=2:

-            params=sys.argv[2]

-            cleanedparams=params.replace('?','')

-            if (params[len(params)-1]=='/'):

-                params=params[0:len(params)-2]

-            pairsofparams=cleanedparams.split('&')

-            param={}

-            for i in range(len(pairsofparams)):

-                splitparams={}

-                splitparams=pairsofparams[i].split('=')

-                if (len(splitparams))==2:

-                    param[splitparams[0]]=splitparams[1]

-                                

-        return param

-

-

-def addLink(name,url,description,iconimage):

-        ok=True

-        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)

-        liz.setInfo( type="Video", infoLabels={ "Title": name, "Plot": 
description } )

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)

-        return ok

-

-

-def addDir(name,url,mode,iconimage):

-        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)

-        ok=True

-        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)

-        liz.setInfo( type="Video", infoLabels={ "Title": name } )

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)

-        return ok

-        

-              

-params=get_params()

-url=None

-name=None

-mode=None

-

-try:

-    url=urllib.unquote_plus(params["url"])

-except:

-    pass

-try:

-    name=urllib.unquote_plus(params["name"])

-except:

-    pass

-try:

-    mode=int(params["mode"])

-except:

-    pass

-

-print "Mode: "+str(mode)

-print "URL: "+str(url)

-print "Name: "+str(name)

-

-if mode==None:

-    print ""

-    CATEGORIES()

-       

-elif mode==1:

-    print ""+url

-    INDEX(url)

-

-        

-xbmcplugin.endOfDirectory(int(sys.argv[1]))

+import urllib
+import urllib2
+import re
+import json
+from urlparse import urlparse, parse_qs
+
+import StorageServer
+from BeautifulSoup import BeautifulSoup
+
+import xbmcplugin
+import xbmcgui
+import xbmcaddon
+
+cache = StorageServer.StorageServer("flwoutdoors", 6)
+addon = xbmcaddon.Addon()
+addon_version = addon.getAddonInfo('version')
+addon_id = addon.getAddonInfo('id')
+icon = addon.getAddonInfo('icon')
+
+
+def addon_log(string):
+    try:
+        log_message = string.encode('utf-8', 'ignore')
+    except:
+        log_message = 'addonException: addon_log'
+    xbmc.log("[%s-%s]: %s" %(addon_id, addon_version, 
log_message),level=xbmc.LOGNOTICE)
+
+
+def make_request(url, post_data=None):
+    addon_log('Request URL: %s' %url)
+    headers = {
+        'User-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) 
Gecko/20100101 Firefox/24.0',
+        'Referer': 'http://www.flwoutdoors.com'
+        }
+    try:
+        req = urllib2.Request(url, post_data, headers)
+        response = urllib2.urlopen(req)
+        response_url = urllib.unquote_plus(response.geturl())
+        data = response.read()
+        response.close()
+        return data
+    except urllib2.URLError, e:
+        addon_log('We failed to open "%s".' % url)
+        if hasattr(e, 'reason'):
+            addon_log('We failed to reach a server.')
+            addon_log('Reason: %s' %e.reason)
+        if hasattr(e, 'code'):
+            addon_log('We failed with error code - %s.' % e.code)
+
+
+def cache_categories():
+    url = 'http://www.flwoutdoors.com/flwondemand.cfm'
+    soup = BeautifulSoup(make_request(url))
+    items = soup.find('ul', attrs={'class': 'menu'})('a')
+    cats = []
+    for i in items:
+        cats.append({'callsign': i['id'].lstrip('divTab'),
+                     'title': i.string.encode('utf-8')})
+    return repr(cats)
+
+
+def display_categories():
+    cats = eval(cache.cacheFunction(cache_categories))
+    for i in cats:
+        add_dir(i['title'], i['callsign'], 'category', icon)
+
+
+def display_category(callsign):
+    url = 'http://www.flwoutdoors.com/flwMedia/ajax.cfm'
+    post_data = {'method': 'getVideosInChannel',
+                 'callsign': callsign}
+    data = json.loads(make_request(url, urllib.urlencode(post_data)))
+    items = data['CHANNEL']['AFILE']
+    for i in items:
+        youtube_embed = None
+        path = None
+        if i.has_key('YOUTUBEEMBED') and len(i['YOUTUBEEMBED']) > 0:
+            pattern = re.compile('src="(.+?)"')
+            youtube_embed = pattern.findall(i['YOUTUBEEMBED'])
+        if youtube_embed:
+            try:
+                youtube_id = youtube_embed[0].split('/embed/')[1]
+                path = 
'plugin://plugin.video.youtube/?action=play_video&videoid=%s' %youtube_id
+            except:
+                pass
+        if not path:
+            keys = ['PATH_ORIGINAL','STREAMING_PATH', 'PODCAST_PATH', 
'MOBILE_PATH']
+            for x in keys:
+                if i.has_key(x) and len(i[x]) > 0:
+                    path = i[x]
+                    break
+            if path.startswith('mp4:') and i.has_key('FILENAME_HD') and 
len(i['FILENAME_HD']) > 0:
+                path = path.replace(i['FILENAME'], i['FILENAME_HD'])
+        duration = get_duration(i['DURATION'].split('.')[0])
+        meta = {'Duration': duration}
+        if i.has_key('DESCRIPTION') and len(i['DESCRIPTION']) > 0:
+            meta['Plot'] = i['DESCRIPTION']
+        add_dir(i['TITLE'].encode('utf-8'), path, 'resolve', i['THUMBNAIL'], 
meta, False)
+
+
+def add_dir(name, url, mode, iconimage, meta={}, isfolder=True):
+    params = {'name': name, 'url': url, 'mode': mode}
+    url = '%s?%s' %(sys.argv[0], urllib.urlencode(params))
+    listitem = xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
+    meta["Title"] = name
+    if not isfolder:
+        listitem.setProperty('IsPlayable', 'true')
+    listitem.setInfo(type="Video", infoLabels=meta)
+    xbmcplugin.addDirectoryItem(int(sys.argv[1]), url, listitem, isfolder)
+
+
+def get_rtmp_url(path):
+    rtmp_url = (
+        '%s %s %s %s' %
+        ('rtmp://flwoutdoorsfs.fplive.net/flwoutdoors',
+        'swfUrl=http://www.flwoutdoors.com/FLWMedia/FLWVideoPlayer.swf',
+        'playpath=' + path,
+        'app=flwoutdoors')
+        )
+    return rtmp_url
+
+
+def get_duration(duration):
+    if duration is None:
+        return 1
+    d_split = duration.split(':')
+    if len(d_split) == 4:
+        del d_split[-1]
+    minutes = int(d_split[-2])
+    if int(d_split[-1]) >= 30:
+        minutes += 1
+    if len(d_split) >= 3:
+        minutes += (int(d_split[-3]) * 60)
+    if minutes < 1:
+        minutes = 1
+    return minutes
+
+
+def get_params():
+    p = parse_qs(sys.argv[2][1:])
+    for i in p.keys():
+        p[i] = p[i][0]
+    return p
+
+
+params = get_params()
+
+try:
+    mode = params['mode']
+except:
+    mode = None
+
+addon_log(repr(params))
+
+if not mode:
+    display_categories()
+    xbmcplugin.endOfDirectory(int(sys.argv[1]))
+
+elif mode == 'category':
+    display_category(params['url'])
+    xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
+    xbmc.executebuiltin('Container.SetViewMode(503)')
+    xbmcplugin.endOfDirectory(int(sys.argv[1]))
+
+elif mode == 'resolve':
+    path = params['url']
+    if path.startswith('mp4:'):
+        path = get_rtmp_url(path)
+    item = xbmcgui.ListItem(path=path)
+    xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
\ No newline at end of file
diff --git a/plugin.video.flw.outdoors/icon.png 
b/plugin.video.flw.outdoors/icon.png
index f1de069..f337dc1 100644
Binary files a/plugin.video.flw.outdoors/icon.png and 
b/plugin.video.flw.outdoors/icon.png differ

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

commit 7f4e83ce87352c2e6b55f08afd520636c7236244
Author: beenje <bee...@xbmc.org>
Date:   Thu Nov 14 22:27:21 2013 +0100

    [plugin.video.euronews_com] updated to version 2.0.4

diff --git a/plugin.video.euronews_com/addon.xml 
b/plugin.video.euronews_com/addon.xml
index 2000862..a023461 100644
--- a/plugin.video.euronews_com/addon.xml
+++ b/plugin.video.euronews_com/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.euronews_com" name="euronews.com" version="2.0.2" 
provider-name="AddonScriptorDE">
+<addon id="plugin.video.euronews_com" name="euronews.com" version="2.0.4" 
provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
     </requires>
@@ -12,9 +12,10 @@
         <language></language>
         <description lang="en">Livestream and latest news videos from 
euronews.com | Available languages: English, Greek, French, German, Italian, 
Spanish, Portuguese, Polish, Russian, Ukrainian, Turkish, Arabic and 
Persian</description>
         <disclaimer lang="en">Some parts of this addon may not be legal in 
your country of residence - please check with your local laws before 
installing.</disclaimer>
-        <website>http://www.euronews.com</website>
+        <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
         
<source>https://github.com/AddonScriptorDE/plugin.video.euronews_com</source>
         <forum>http://forum.xbmc.org/showthread.php?tid=157182</forum>
         <email>AddonScriptorDE at yahoo dot de</email>
+        <website>http://www.euronews.com</website>
     </extension>
 </addon>
diff --git a/plugin.video.euronews_com/changelog.txt 
b/plugin.video.euronews_com/changelog.txt
index 26cb17a..611007d 100644
--- a/plugin.video.euronews_com/changelog.txt
+++ b/plugin.video.euronews_com/changelog.txt
@@ -2,5 +2,10 @@
 - Initial release
 1.0.1 / 2.0.1
 - Fixed livestreams
-1.0.2 / 2.0.1
+1.0.2 / 2.0.2
 - Fixed livestreams
+1.0.3 / 2.0.3
+- Fixed site changes
+- Added better thumbs
+1.0.4 / 2.0.4
+- Added context menu "Add to queue"
diff --git a/plugin.video.euronews_com/default.py 
b/plugin.video.euronews_com/default.py
index 9f0d0ad..d818728 100644
--- a/plugin.video.euronews_com/default.py
+++ b/plugin.video.euronews_com/default.py
@@ -10,33 +10,29 @@ import xbmcplugin
 import xbmcaddon
 import xbmcgui
 
+addon = xbmcaddon.Addon()
 socket.setdefaulttimeout(30)
 pluginhandle = int(sys.argv[1])
-addonID = 'plugin.video.euronews_com'
-addon = xbmcaddon.Addon(id=addonID)
+addonID = addon.getAddonInfo('id')
 translation = addon.getLocalizedString
 
 while (not 
os.path.exists(xbmc.translatePath("special://profile/addon_data/"+addonID+"/settings.xml"))):
     addon.openSettings()
 
-forceViewMode = addon.getSetting("forceViewMode")
+forceViewMode = addon.getSetting("forceViewMode") == "true"
 viewMode = str(addon.getSetting("viewMode"))
 language = addon.getSetting("language")
-languages = ["en", "gr", "fr", "de", "it",
-             "es", "pt", "pl", "ru", "ua", "tr", "ar", "pe"]
+languages = ["en", "gr", "fr", "de", "it", "es", "pt", "pl", "ru", "ua", "tr", 
"ar", "pe"]
 language = languages[int(language)]
-language2 = language.replace("en", "www").replace(
-    "pe", "persian").replace("ar", "arabic")
+language2 = language.replace("en", "www").replace("pe", 
"persian").replace("ar", "arabic")
 
 
 def index():
     addLink(translation(30001), "", 'playLive', "")
     addDir(translation(30002), "", 'newsMain', "")
     content = getUrl("http://"+language2+".euronews.com";)
-    match = re.compile(
-        '<li class="menu-element-programs"><a title="(.+?)" href="(.+?)">', 
re.DOTALL).findall(content)
-    addDir(match[0][0], "http://"+language2+".euronews.com"+match[
-           0][1], 'listShows', "")
+    match = re.compile('<li class="menu-element-programs"><a title="(.+?)" 
href="(.+?)">', re.DOTALL).findall(content)
+    addDir(match[0][0], "http://"+language2+".euronews.com"+match[0][1], 
'listShows', "")
     content = content[content.find('<ol id="categoryNav">'):]
     content = content[:content.find('</ol>')]
     spl = content.split('<a')
@@ -53,13 +49,12 @@ def index():
             addDir(title, url, 'listVideos', "")
     addDir(translation(30004), "", 'search', "")
     xbmcplugin.endOfDirectory(pluginhandle)
-    if forceViewMode == "true":
+    if forceViewMode:
         xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
 
 def newsMain():
-    addDir(translation(30003), "http://"+language2 +
-           ".euronews.com/news/", 'listVideos', "")
+    addDir(translation(30003), "http://"+language2+".euronews.com/news/";, 
'listVideos', "")
     content = getUrl("http://"+language2+".euronews.com";)
     content = content[content.find('<ol class="lhsMenu">'):]
     content = content[:content.find('</ol>')]
@@ -73,7 +68,7 @@ def newsMain():
         title = cleanTitle(title)
         addDir(title, url, 'listVideos', "")
     xbmcplugin.endOfDirectory(pluginhandle)
-    if forceViewMode == "true":
+    if forceViewMode:
         xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
 
@@ -86,26 +81,26 @@ def listVideos(url):
         url = "http://"+language2+".euronews.com"+match[0]
         match = re.compile('src="(.+?)"', re.DOTALL).findall(content1)
         thumb = match[0]
+        match = re.compile('/articles/(.+?)/', re.DOTALL).findall(thumb)
+        if match:
+            thumb = 
"http://static.euronews.com/articles/"+match[0]+"/650x365_"+match[0]+".jpg";
         match = re.compile('<p>(.+?)</p>', re.DOTALL).findall(content1)
         desc = ""
-        if len(match) > 0:
-            desc = match[0]
-            desc = cleanTitle(desc)
+        if match:
+            desc = cleanTitle(match[0])
         match = re.compile('title="(.+?)"', re.DOTALL).findall(content1)
         match2 = re.compile('alt="(.+?)"', re.DOTALL).findall(content1)
-        if len(match) > 0:
+        if match:
             title = match[0]
-        elif len(match2) > 0:
+        elif match2:
             title = match2[0]
         title = cleanTitle(title)
-        match = re.compile(
-            '<p class="cet" style="(.+?)">(.+?) (.+?)</p>', 
re.DOTALL).findall(content1)
+        match = re.compile('<p class="cet" style="(.+?)">(.+?) (.+?)</p>', 
re.DOTALL).findall(content1)
         date = ""
-        if len(match) > 0:
+        if match:
             date = match[0][1]
             title = date+" - "+title
         addLink(title, url, 'playVideo', thumb, desc)
-
     content2 = content
     content = content[content.find('id="main-content">'):]
     if "</ul></div>" in content:
@@ -122,31 +117,31 @@ def listVideos(url):
             url = "http://"+language2+".euronews.com"+match[0]
             match = re.compile('src="(.+?)"', re.DOTALL).findall(entry)
             thumb = match[0]
+            match = re.compile('/articles/(.+?)/', re.DOTALL).findall(thumb)
+            if match:
+                thumb = 
"http://static.euronews.com/articles/"+match[0]+"/650x365_"+match[0]+".jpg";
             match1 = re.compile('> \\| (.+?) (.+?)<', re.DOTALL).findall(entry)
-            match2 = re.compile(
-                '<span class="artDate">(.+?) (.+?)</span>', 
re.DOTALL).findall(entry)
-            match3 = re.compile(
-                '<p class="cet">(.+?) - (.+?) (.+?)</p>', 
re.DOTALL).findall(entry)
+            match2 = re.compile('<span class="artDate">(.+?) (.+?)</span>', 
re.DOTALL).findall(entry)
+            match3 = re.compile('<p class="cet">(.+?) - (.+?) (.+?)</p>', 
re.DOTALL).findall(entry)
             date = ""
-            if len(match1) > 0:
+            if match1:
                 date = match1[0][0]
-            elif len(match2) > 0:
+            elif match2:
                 date = match2[0][0]
-            elif len(match3) > 0:
+            elif match3:
                 date = match3[0][1]
             match = re.compile('<p>(.+?)</p>', re.DOTALL).findall(entry)
             desc = ""
-            if len(match) > 0:
-                desc = match[0]
-                desc = cleanTitle(desc)
+            if match:
+                desc = cleanTitle(match[0])
             match = re.compile('title="(.+?)"', re.DOTALL).findall(entry)
             match2 = re.compile('alt="(.+?)"', re.DOTALL).findall(entry)
-            if len(match) > 0:
+            if match:
                 title = match[0]
-            elif len(match2) > 0:
+            elif match2:
                 title = match2[0]
             title = cleanTitle(title)
-            if date != "":
+            if date:
                 title = date+" - "+title
             addLink(title, url, 'playVideo', thumb, desc)
     spl = content2.split('<li')
@@ -154,8 +149,7 @@ def listVideos(url):
         entry = spl[i]
         match = re.compile('>(.+?) -', re.DOTALL).findall(entry)
         date = match[0]
-        match = re.compile(
-            '  <a href="(.+?)">(.+?)</a>', re.DOTALL).findall(entry)
+        match = re.compile('  <a href="(.+?)">(.+?)</a>', 
re.DOTALL).findall(entry)
         url = "http://"+language2+".euronews.com"+match[0][0]
         title = match[0][1]
         title = date+" - "+cleanTitle(title)
@@ -167,17 +161,13 @@ def listVideos(url):
 
 def listNoComment(url):
     content = getUrl(url)
-    match = re.compile(
-        '<p id="topStoryImg"><a href="(.+?)" title="(.+?)"><img src="(.+?)"', 
re.DOTALL).findall(content)
-    match2 = re.compile(
-        '<span class="cet">(.+?) (.+?)</span>', re.DOTALL).findall(content)
-    addLink(match2[0][0]+" - "+match[0][1], "http://"+language2 +
-            ".euronews.com"+match[0][0], 'playVideo', match[0][2], "")
+    match = re.compile('<p id="topStoryImg"><a href="(.+?)" title="(.+?)"><img 
src="(.+?)"', re.DOTALL).findall(content)
+    match2 = re.compile('<span class="cet">(.+?) (.+?)</span>', 
re.DOTALL).findall(content)
+    addLink(match2[0][0]+" - "+match[0][1], "http://"+language2 + 
".euronews.com"+match[0][0], 'playVideo', match[0][2], "")
     spl = content.split('<div class="column span-8')
     for i in range(1, len(spl), 1):
         entry = spl[i]
-        match = re.compile(
-            '<em>nocomment \\| (.+?) (.+?)</em>', re.DOTALL).findall(entry)
+        match = re.compile('<em>nocomment \\| (.+?) (.+?)</em>', 
re.DOTALL).findall(entry)
         date = match[0][0]
         match = re.compile('href="(.+?)"', re.DOTALL).findall(entry)
         url = "http://"+language2+".euronews.com"+match[0]
@@ -204,8 +194,7 @@ def listShows(url):
         title = cleanTitle(title)
         match = re.compile('src="(.+?)"', re.DOTALL).findall(entry)
         thumb = match[0]
-        match = re.compile(
-            'class="artTitle">(.+?)</p>', re.DOTALL).findall(entry)
+        match = re.compile('class="artTitle">(.+?)</p>', 
re.DOTALL).findall(entry)
         desc = ""
         if len(match) > 0:
             desc = match[0]
@@ -224,8 +213,7 @@ def search():
     keyboard.doModal()
     if keyboard.isConfirmed() and keyboard.getText():
         search_string = keyboard.getText().replace(" ", "+")
-        content = getUrl(
-            "http://"+language2+".euronews.com/search/";, 
data="q="+search_string)
+        content = getUrl("http://"+language2+".euronews.com/search/";, 
data="q="+search_string)
         content = content[content.find('<ol class="searchRes">'):]
         content = content[:content.find('</ol>')]
         spl = content.split('<li')
@@ -234,8 +222,7 @@ def search():
             match = re.compile('href="(.+?)"', re.DOTALL).findall(entry)
             url = "http://"+language2+".euronews.com"+match[0]
             match = re.compile('<em>(.+?)</em>', re.DOTALL).findall(entry)
-            title = match[0].replace("<strong>", "").replace(
-                "</strong>", "").replace("<br />", "")
+            title = match[0].replace("<strong>", "").replace("</strong>", 
"").replace("<br />", "")
             title = cleanTitle(title)
             match = re.compile('src="(.+?)"', re.DOTALL).findall(entry)
             thumb = match[0]
@@ -247,13 +234,18 @@ def search():
 
 def playVideo(url):
     content = getUrl(url)
-    match = re.compile('videofile:"(.+?)"', re.DOTALL).findall(content)
-    if len(match) > 0:
-        listitem = xbmcgui.ListItem(
-            path="http://video.euronews.com/"+match[0]+".flv";)
+    match = re.compile('file: "(.+?)"', re.DOTALL).findall(content)
+    if match:
+        listitem = xbmcgui.ListItem(path=match[0])
         xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
 
 
+def queueVideo(url, name):
+    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+    listitem = xbmcgui.ListItem(name)
+    playlist.add(url, listitem)
+
+
 def playLive():
     content = getUrl("http://euronews.hexaglobe.com/json/";)
     content = content[content.find('"'+language+'":'):]
@@ -265,7 +257,7 @@ def playLive():
 
 
 def cleanTitle(title):
-    return title.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", 
"&").replace("&#038;", "&").replace("&#39;", "'").replace("&#039;", 
"'").replace("&#8211;", "-").replace("&#8220;", "-").replace("&#8221;", 
"-").replace("&#8217;", "'").replace("&quot;", "\"").strip()
+    return title.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", 
"&").replace("&#038;", "&").replace("&#39;", "'").replace("&#039;", 
"'").replace("&#8211;", "-").replace("&#8220;", "-").replace("&#8221;", 
"-").replace("&#8217;", "'").replace("&#8230;", "…").replace("&quot;", 
"\"").strip()
 
 
 def getUrl(url, data=None, cookie=None):
@@ -285,7 +277,6 @@ def getUrl(url, data=None, cookie=None):
 
 
 def parameters_string_to_dict(parameters):
-    ''' Convert parameters encoded in a URL to a dict. '''
     paramDict = {}
     if parameters:
         paramPairs = parameters[1:].split("&")
@@ -299,28 +290,27 @@ def parameters_string_to_dict(parameters):
 def addLink(name, url, mode, iconimage, desc=""):
     u = sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
     ok = True
-    liz = xbmcgui.ListItem(
-        name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
+    liz = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
     liz.setInfo(type="Video", infoLabels={"Title": name, "Plot": desc})
     liz.setProperty('IsPlayable', 'true')
-    ok = xbmcplugin.addDirectoryItem(handle=int(
-        sys.argv[1]), url=u, listitem=liz)
+    if mode=="playVideo":
+        liz.addContextMenuItems([(translation(30006), 
'RunPlugin(plugin://'+addonID+'/?mode=queueVideo&url='+urllib.quote_plus(u)+'&name='+urllib.quote_plus(name)+')',)])
+    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, 
listitem=liz)
     return ok
 
 
 def addDir(name, url, mode, iconimage, desc=""):
     u = sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
     ok = True
-    liz = xbmcgui.ListItem(
-        name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
+    liz = xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
     liz.setInfo(type="Video", infoLabels={"Title": name, "Plot": desc})
-    ok = xbmcplugin.addDirectoryItem(handle=int(
-        sys.argv[1]), url=u, listitem=liz, isFolder=True)
+    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, 
listitem=liz, isFolder=True)
     return ok
 
 params = parameters_string_to_dict(sys.argv[2])
 mode = urllib.unquote_plus(params.get('mode', ''))
 url = urllib.unquote_plus(params.get('url', ''))
+name = urllib.unquote_plus(params.get('name', ''))
 
 if mode == 'listVideos':
     listVideos(url)
@@ -334,6 +324,8 @@ elif mode == 'playLive':
     playLive()
 elif mode == 'playVideo':
     playVideo(url)
+elif mode == 'queueVideo':
+    queueVideo(url, name)
 elif mode == 'search':
     search()
 else:
diff --git a/plugin.video.euronews_com/resources/language/English/strings.xml 
b/plugin.video.euronews_com/resources/language/English/strings.xml
index 1a22c7b..7c6472b 100644
--- a/plugin.video.euronews_com/resources/language/English/strings.xml
+++ b/plugin.video.euronews_com/resources/language/English/strings.xml
@@ -5,6 +5,7 @@
   <string id="30003">All</string>
   <string id="30004">Search</string>
   <string id="30005">No video available</string>
+  <string id="30006">Add to queue</string>
   <string id="30100">Language</string>
   <string id="30101">Force View</string>
   <string id="30102">ViewID</string>
diff --git a/plugin.video.euronews_com/resources/language/German/strings.xml 
b/plugin.video.euronews_com/resources/language/German/strings.xml
index bec4714..716cf36 100644
--- a/plugin.video.euronews_com/resources/language/German/strings.xml
+++ b/plugin.video.euronews_com/resources/language/German/strings.xml
@@ -2,6 +2,7 @@
 <strings>
   <string id="30003">Alle</string>
   <string id="30004">Suchen</string>
+  <string id="30006">In Abspielliste einreihen</string>
   <string id="30100">Sprache</string>
   <string id="30101">View erzwingen</string>
 </strings>

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

Summary of changes:
 plugin.video.euronews_com/addon.xml                |    5 +-
 plugin.video.euronews_com/changelog.txt            |    7 +-
 plugin.video.euronews_com/default.py               |  126 ++++-----
 .../resources/language/English/strings.xml         |    1 +
 .../resources/language/German/strings.xml          |    1 +
 plugin.video.flw.outdoors/addon.xml                |   47 ++--
 plugin.video.flw.outdoors/changelog.txt            |    3 +
 plugin.video.flw.outdoors/default.py               |  282 ++++++++++++--------
 plugin.video.flw.outdoors/icon.png                 |  Bin 39820 -> 69081 bytes
 .../resources/language/English/strings.xml         |   13 -
 10 files changed, 271 insertions(+), 214 deletions(-)
 delete mode 100644 
plugin.video.flw.outdoors/resources/language/English/strings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
Xbmc-addons@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to