The branch, frodo has been updated
via a32e65f39d0abb67b2aa54e8465ede5042714879 (commit)
from 2195a1ee7fd63ba82ca65dbdc77f08edd05b9c96 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=a32e65f39d0abb67b2aa54e8465ede5042714879
commit a32e65f39d0abb67b2aa54e8465ede5042714879
Author: beenje <[email protected]>
Date: Mon Aug 12 19:01:19 2013 +0200
[plugin.video.esa] updated to version 1.0.3
diff --git a/plugin.video.esa/addon.xml b/plugin.video.esa/addon.xml
index a50a5df..acca8d6 100644
--- a/plugin.video.esa/addon.xml
+++ b/plugin.video.esa/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.esa" name="ESA Videos" version="1.0.2"
provider-name="Jose Antonio Montes (jamontes)">
+<addon id="plugin.video.esa" name="ESA Videos" version="1.0.3"
provider-name="Jose Antonio Montes (jamontes)">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
diff --git a/plugin.video.esa/changelog.txt b/plugin.video.esa/changelog.txt
index d2463bd..6e193bf 100644
--- a/plugin.video.esa/changelog.txt
+++ b/plugin.video.esa/changelog.txt
@@ -1,3 +1,5 @@
+1.0.3
+- Added Other Categories menu entry.
1.0.2
- Added Science@ESA menu entry.
1.0.1
diff --git a/plugin.video.esa/default.py b/plugin.video.esa/default.py
index 9e87d33..2fb20ee 100644
--- a/plugin.video.esa/default.py
+++ b/plugin.video.esa/default.py
@@ -111,6 +111,13 @@ def create_index(params):
lutil.log('esa.create_index action=["%s"] title=["%s"] url=["%s"]' %
(action, title, url))
lutil.addDir(action=action, title=title, url=url)
+ # Other Categories
+ action = 'other_categories'
+ url = ''
+ title = translation(30108)
+ lutil.log('esa.create_index action=["%s"] title=["Other Categories"]
url=["%s"]' % (action, url))
+ lutil.addDir(action=action, title=title, url=url)
+
# Search
action = 'search'
url = ''
@@ -120,6 +127,24 @@ def create_index(params):
lutil.close_dir(pluginhandle, updateListing=False)
+# Other Categories menu
+def other_categories(params):
+ lutil.log("greenpeace.other_categories "+repr(params))
+
+ action = 'main_list'
+ page_url = 'http://spaceinvideos.esa.int/Videos'
+ buffer_web = lutil.carga_web(page_url)
+
+ category_pattern = '<a href="(/Directorates/[^"]*?)"
title="[^"]*?">([^<]*?)</a>'
+
+ for category_link, title in lutil.find_multiple(buffer_web,
category_pattern):
+ url = '%s%s/(sortBy)/%s' % (root_url, category_link, sort_method)
+ title = title.replace('"', '"').replace(''',
'´').replace('&', '&') # Cleanup the title.
+ lutil.log('esa.other_categories action=["%s"] title=["%s"] url=["%s"]'
% (action, title, url))
+ lutil.addDir(action=action, title=title, url=url)
+
+ lutil.close_dir(pluginhandle, updateListing=False)
+
# Main list menu
def main_list(params):
@@ -135,7 +160,7 @@ def main_list(params):
pattern_videos = '<div class="psr_image arrow">[^<]+<a
href="([^"]*?)">[^<]+<img src="([^"]*?)".*?<li><a
href="[^"]*?">([^<]+)</a></li>'
pattern_released = '<li>Released: ([^<]+)</li>'
pattern_nextpage = '<span class="next"><a href="([^"]*?)">'
- pattern_next = '/content/search/\(offset\)/([0-9]+)'
+ pattern_next = '/\(offset\)/([0-9]+)'
pattern_last = '<span class="other">\.\.\.</span><span class="other"><a
href="[^"]*?">([^<]+)</a></span>'
pattern_no_last = '<span class="other"><a href="[^"]*?">([^<]+)</a></span>'
pattern_search_text = '\?SearchText=(.+)\&result_type='
@@ -145,7 +170,7 @@ def main_list(params):
# We must setup the previous page entry from the second page onwards.
if page_offset:
if page_offset == '10':
- prev_page_url = page_url.replace('/content/search/(offset)/10',
'/content/search')
+ prev_page_url = page_url.replace('/(offset)/10', '')
else:
prev_page_url = page_url.replace(page_offset, "%s" %
(int(page_offset) - 10))
@@ -154,10 +179,7 @@ def main_list(params):
lutil.addDir(action="main_list", title="<< %s (%s)" %
(translation(30106), (int(page_offset) / 10)), url=prev_page_url,
reset_cache=reset_cache)
# This is to force ".." option to go back to main index instead of
previous page list.
- if reset_cache == "yes":
- updateListing = True
- else:
- updateListing = False
+ updateListing = reset_cache == "yes"
videolist = lutil.find_multiple(buffer_web,pattern_videos)
@@ -200,7 +222,7 @@ def main_list(params):
def search(params):
search_string = lutil.get_keyboard_text(translation(30105))
if search_string:
- params['url'] =
'http://spaceinvideos.esa.int/content/search?SearchText=%s&SearchButton=Go' %
lutil.get_url_encoded(search_string)
+ params['url'] =
'http://spaceinvideos.esa.int/content/search?SearchText=%s&SearchButton=Go&sortBy=%s'
% (lutil.get_url_encoded(search_string), sort_method)
lutil.log("esa.search Value of search url: %s" % params['url'])
return main_list(params)
diff --git a/plugin.video.esa/resources/language/Czech/strings.xml
b/plugin.video.esa/resources/language/Czech/strings.xml
index 9841bc7..e56e961 100644
--- a/plugin.video.esa/resources/language/Czech/strings.xml
+++ b/plugin.video.esa/resources/language/Czech/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Hledat text</string>
<string id="30106">PÅedchozà Stránka</string>
<string id="30107">Všechny Videa</string>
+ <string id="30108">Ostatnà kategorie</string>
</strings>
diff --git a/plugin.video.esa/resources/language/English/strings.xml
b/plugin.video.esa/resources/language/English/strings.xml
index 09eee99..7ead856 100644
--- a/plugin.video.esa/resources/language/English/strings.xml
+++ b/plugin.video.esa/resources/language/English/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Search text</string>
<string id="30106">Previous Page</string>
<string id="30107">All the Videos</string>
+ <string id="30108">Other Categories</string>
</strings>
diff --git a/plugin.video.esa/resources/language/French/strings.xml
b/plugin.video.esa/resources/language/French/strings.xml
index b26258d..92976ff 100644
--- a/plugin.video.esa/resources/language/French/strings.xml
+++ b/plugin.video.esa/resources/language/French/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Text a chercher</string>
<string id="30106">Page Précédente</string>
<string id="30107">Toutes les Vidéos</string>
+ <string id="30108">Autres Catégories</string>
</strings>
diff --git a/plugin.video.esa/resources/language/German/strings.xml
b/plugin.video.esa/resources/language/German/strings.xml
index ad676bc..79eae2c 100644
--- a/plugin.video.esa/resources/language/German/strings.xml
+++ b/plugin.video.esa/resources/language/German/strings.xml
@@ -9,4 +9,5 @@
<string id="30105">Suchbegriff</string>
<string id="30106">Vorherige Seite</string>
<string id="30107">Alle Videos</string>
+ <string id="30108">Weitere Kategorien</string>
</strings>
diff --git a/plugin.video.esa/resources/language/Greek/strings.xml
b/plugin.video.esa/resources/language/Greek/strings.xml
index d770077..a7005f8 100644
--- a/plugin.video.esa/resources/language/Greek/strings.xml
+++ b/plugin.video.esa/resources/language/Greek/strings.xml
@@ -10,4 +10,5 @@
<String id="30105">ÎναζήÏηÏη κειμÎνοÏ
</string>
<String id="30106">Î ÏοηγοÏμενη Σελίδα</string>
<String id="30107">Îλα Ïα ÎίνÏεο</string>
-</strings>
\ No newline at end of file
+ <String id="30108">ÎοιÏÎÏ ÎαÏηγοÏίεÏ</string>
+</strings>
diff --git a/plugin.video.esa/resources/language/Italian/strings.xml
b/plugin.video.esa/resources/language/Italian/strings.xml
index e0cf8be..dab3942 100644
--- a/plugin.video.esa/resources/language/Italian/strings.xml
+++ b/plugin.video.esa/resources/language/Italian/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Cerca testo</string>
<string id="30106">Pagina Precedente</string>
<string id="30107">Tutti i Video</string>
+ <string id="30108">Altre Categorie</string>
</strings>
diff --git a/plugin.video.esa/resources/language/Portuguese/strings.xml
b/plugin.video.esa/resources/language/Portuguese/strings.xml
index e9bff66..e4fa541 100644
--- a/plugin.video.esa/resources/language/Portuguese/strings.xml
+++ b/plugin.video.esa/resources/language/Portuguese/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Texto Pesquisa</string>
<string id="30106">Página Anterior</string>
<string id="30107">Todos os VÃdeos</string>
+ <string id="30108">Outras Categorias</string>
</strings>
diff --git a/plugin.video.esa/resources/language/Spanish/strings.xml
b/plugin.video.esa/resources/language/Spanish/strings.xml
index 9973615..2145b66 100644
--- a/plugin.video.esa/resources/language/Spanish/strings.xml
+++ b/plugin.video.esa/resources/language/Spanish/strings.xml
@@ -10,4 +10,5 @@
<string id="30105">Texto a buscar</string>
<string id="30106">Página Anterior</string>
<string id="30107">Todos los VÃdeos</string>
+ <string id="30108">Otras CategorÃas</string>
</strings>
-----------------------------------------------------------------------
Summary of changes:
plugin.video.esa/addon.xml | 2 +-
plugin.video.esa/changelog.txt | 2 +
plugin.video.esa/default.py | 36 ++++++++++++++++----
.../resources/language/Czech/strings.xml | 1 +
.../resources/language/English/strings.xml | 1 +
.../resources/language/French/strings.xml | 1 +
.../resources/language/German/strings.xml | 1 +
.../resources/language/Greek/strings.xml | 3 +-
.../resources/language/Italian/strings.xml | 1 +
.../resources/language/Portuguese/strings.xml | 1 +
.../resources/language/Spanish/strings.xml | 1 +
11 files changed, 41 insertions(+), 9 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons