The branch, frodo has been updated
       via  2aefced116f39fc58280e44c06146604c8810d0e (commit)
      from  8af753e0599f881f0852cbba061de29be028dadc (commit)

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

commit 2aefced116f39fc58280e44c06146604c8810d0e
Author: beenje <[email protected]>
Date:   Thu Apr 25 21:37:06 2013 +0200

    [plugin.video.itunes_trailers] updated to version 0.1.1

diff --git a/plugin.video.itunes_trailers/addon.py 
b/plugin.video.itunes_trailers/addon.py
index 814f057..0302a0f 100644
--- a/plugin.video.itunes_trailers/addon.py
+++ b/plugin.video.itunes_trailers/addon.py
@@ -51,7 +51,7 @@ def show_movies():
         'limit',
         choices=(0, 50, 100)
     )
-    items = get_movies(source, limit)
+    items = get_movies2(source, limit)
     finish_kwargs = {
         'sort_methods': ['date', 'title', 'playlist_order']
     }
@@ -117,7 +117,7 @@ def download_trailer(download_url, play_url):
 
 
 @plugin.cached()
-def get_movies(source, limit):
+def get_movies2(source, limit):
     scraper = MovieScraper()
     if source == 'all':
         movies = scraper.get_all_movies(limit)
diff --git a/plugin.video.itunes_trailers/addon.xml 
b/plugin.video.itunes_trailers/addon.xml
index 5ae1a6c..7098147 100644
--- a/plugin.video.itunes_trailers/addon.xml
+++ b/plugin.video.itunes_trailers/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.itunes_trailers" name="Apple iTunes Trailers" 
version="0.1.0" provider-name="Tristan Fischer ([email protected])">
+<addon id="plugin.video.itunes_trailers" name="Apple iTunes Trailers" 
version="0.1.1" provider-name="Tristan Fischer ([email protected])">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.xbmcswift2" version="2.4.0"/>
@@ -39,5 +39,7 @@
         <description lang="pt">O navegador de Trailers do Apple iTunes coloca 
no seu XBMC as mais recentes e exclusivas apresentações de filmes em HD. 
Funcionalidades:[CR]- Ver Trailers em 480p/720p/1080p[CR]- Transferir 
Trailers[CR]- Adicionar Filmes ao CouchPotato</description>
         <description lang="pt_BR">Apple iTunes Movie Trailers entrega os 
previews mais novos e exclusivos em HD para o XBMC. Recursos:[CR]-Assista 
trailers em 480p/720p/1080p[CR]-Download Trailers[CR]-Adicione filmes ao 
CouchPotato</description>
         <description lang="sv">Apple iTunes Movie Trailers ger dig dom senaste 
och exklusivaste filmförhandsgranskningarna i HD till ditt XBMC. 
Funktioner:[CR]- Se trailers i 480p/720p/1080p[CR]- Ladda ner trailers[CR]- 
Lägg till filmer i CouchPotato</description>
+        <disclaimer lang="de">KEIN iTunes benötigt!</disclaimer>
+        <disclaimer lang="en">NO iTunes required!</disclaimer>
     </extension>
 </addon>
diff --git a/plugin.video.itunes_trailers/changelog.txt 
b/plugin.video.itunes_trailers/changelog.txt
index 47fb067..c1b99a5 100644
--- a/plugin.video.itunes_trailers/changelog.txt
+++ b/plugin.video.itunes_trailers/changelog.txt
@@ -1,3 +1,6 @@
+0.1.1 (25.04.2013)
+- fixed covers (apple switched to relative covers)
+
 0.1.0 (15.04.2013)
 - added Trakt.tv Integration via Trakt.tv List Manager
 - added translations
diff --git a/plugin.video.itunes_trailers/resources/lib/scraper.py 
b/plugin.video.itunes_trailers/resources/lib/scraper.py
index 13ed8e1..e2ebbe2 100644
--- a/plugin.video.itunes_trailers/resources/lib/scraper.py
+++ b/plugin.video.itunes_trailers/resources/lib/scraper.py
@@ -34,6 +34,7 @@ class NetworkError(Exception):
 class MovieScraper(object):
 
     MOVIES_URL = BASE_URL + '/home/feeds/%s.json'
+    COVER_BASE_URL = 'http://trailers.apple.com'
 
     def get_all_movies(self, limit, filter_dict=None):
         return self._get_movies('studios', limit, filter_dict)
@@ -50,9 +51,13 @@ class MovieScraper(object):
     def _get_movies(self, source, limit, filter_dict):
 
         def __poster(url):
+            if not url.startswith('http'):
+                url = self.COVER_BASE_URL + url
             return url.replace('poster', 'poster-xlarge')
 
         def __background(url):
+            if not url.startswith('http'):
+                url = self.COVER_BASE_URL + url
             return url.replace('poster', 'background')
 
         def __date(date_str):
@@ -128,7 +133,7 @@ class TrailerScraper(object):
             trailer = {
                 'title': li.find('h3').string,
                 'date': '%s.%s.20%s' % (d, m, y),
-                'duration': duration_str.split()[1],
+                'duration': duration_str.split('Runtime:')[-1].strip(),
                 'thumb': li.find('img')['src'],
                 'background': self.BACKGROUND_URL % location,
                 'urls': trailer_urls

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

Summary of changes:
 plugin.video.itunes_trailers/addon.py              |    4 ++--
 plugin.video.itunes_trailers/addon.xml             |    4 +++-
 plugin.video.itunes_trailers/changelog.txt         |    3 +++
 .../resources/lib/scraper.py                       |    7 ++++++-
 4 files changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to