The branch, frodo has been updated
       via  62244496b8e6e60ab00c559b32363aadafc378dc (commit)
      from  ae5fd48bf8fa97ec6787f0ac5fc7db3b9ae5f617 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=62244496b8e6e60ab00c559b32363aadafc378dc

commit 62244496b8e6e60ab00c559b32363aadafc378dc
Author: Martijn Kaijser <[email protected]>
Date:   Tue May 20 19:04:16 2014 +0200

    [script.artwork.downloader] 12.0.26

diff --git a/script.artwork.downloader/addon.xml 
b/script.artwork.downloader/addon.xml
index 86272bd..3fcb84e 100644
--- a/script.artwork.downloader/addon.xml
+++ b/script.artwork.downloader/addon.xml
@@ -2,7 +2,7 @@
 <addon
     id="script.artwork.downloader"
     name="Artwork Downloader"
-    version="12.0.25"
+    version="12.0.26"
     provider-name="Martijn"
     >
   <requires>
diff --git a/script.artwork.downloader/changelog.txt 
b/script.artwork.downloader/changelog.txt
index 63dd0ce..251c14c 100644
--- a/script.artwork.downloader/changelog.txt
+++ b/script.artwork.downloader/changelog.txt
@@ -1,3 +1,6 @@
+v12.0.26
+- Call TMDb config to get up-to-date image base URL
+
 v12.0.25
 - Always apply language filters else you end up with a random language
 
diff --git a/script.artwork.downloader/lib/provider/tmdb.py 
b/script.artwork.downloader/lib/provider/tmdb.py
index 9c06500..ac3ed1c 100644
--- a/script.artwork.downloader/lib/provider/tmdb.py
+++ b/script.artwork.downloader/lib/provider/tmdb.py
@@ -31,8 +31,8 @@ from operator import itemgetter
 __localize__    = ( sys.modules[ "__main__" ].__localize__ )
 
 API_KEY = '4be68d7eab1fbd1b6fd8a3b80a65a95e'
+API_CFG = 'http://api.themoviedb.org/3/configuration?api_key=%s'
 API_URL = 'http://api.themoviedb.org/3/movie/%s/images?api_key=%s'
-BASE_IMAGEURL = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/";
 
 class TMDBProvider():
 
@@ -40,8 +40,12 @@ class TMDBProvider():
         self.name = 'TMDB'
 
     def get_image_list(self, media_id):
-        data = get_data(API_URL%(media_id, API_KEY), 'json')
         image_list = []
+        api_cfg = get_data(API_CFG%(API_KEY), 'json')
+        if api_cfg == "Empty" or not api_cfg:
+            return image_list
+        BASE_IMAGEURL = api_cfg['images'].get('base_url')
+        data = get_data(API_URL%(media_id, API_KEY), 'json')
         if data == "Empty" or not data:
             return image_list
         else:

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

Summary of changes:
 script.artwork.downloader/addon.xml            |    2 +-
 script.artwork.downloader/changelog.txt        |    3 +++
 script.artwork.downloader/lib/provider/tmdb.py |    8 ++++++--
 3 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to