The branch, eden has been updated
       via  c53220139bd80ff0bb6e0eef3055bbf073996ebd (commit)
      from  ac3f6135046288aeb5a4b7a300e226c596853e6a (commit)

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

commit c53220139bd80ff0bb6e0eef3055bbf073996ebd
Author: Martijn Kaijser <[email protected]>
Date:   Thu Jan 2 09:29:10 2014 +0100

    [script.module.metahandler] 1.4.0

diff --git a/script.module.metahandler/addon.xml 
b/script.module.metahandler/addon.xml
index 9bfb0aa..3bc0b94 100644
--- a/script.module.metahandler/addon.xml
+++ b/script.module.metahandler/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.module.metahandler" 
      name="metahandler" 
-     version="1.3.1" 
+     version="1.4.0" 
      provider-name="Eldorado (inspired by anarchintosh, westcoast, daledude, 
t0mm0)">
   <requires>
     <import addon="xbmc.python" version="2.0" />
diff --git a/script.module.metahandler/changelog.txt 
b/script.module.metahandler/changelog.txt
index a31ce41..35b497a 100644
--- a/script.module.metahandler/changelog.txt
+++ b/script.module.metahandler/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 1.4.0[/B]
+- New TMDB API key
+- Updated calls to TMDB so we only make one request per movie
+
 [B]Version 1.3.1[/B]
 - Fixed bug on getting tvshows from cache - returns None instead of letting 
exception pass
 - Re-added db initialization - stupid mistake
diff --git a/script.module.metahandler/lib/metahandler/TMDB.py 
b/script.module.metahandler/lib/metahandler/TMDB.py
index 7bd7683..2c8160f 100644
--- a/script.module.metahandler/lib/metahandler/TMDB.py
+++ b/script.module.metahandler/lib/metahandler/TMDB.py
@@ -28,7 +28,7 @@ class TMDB(object):
     or if there is data missing on TMDB, another call is made to IMDB to fill 
in the missing information.       
     '''  
     
-    def __init__(self, api_key='b91e899ce561dd19695340c3b26e0a02', 
view='json', lang='en'):
+    def __init__(self, api_key='af95ef8a4fe1e697f86b8c194f2e5e11', 
view='json', lang='en'):
         #view = yaml json xml
         self.view = view
         self.lang = self.__get_language(lang)
@@ -275,9 +275,9 @@ class TMDB(object):
         return meta
 
 
-    def _get_info(self, tmdb_id, q = False):
+    def _get_info(self, tmdb_id, values='', q = False):
         ''' Helper method to start a TMDB getInfo request '''            
-        r = self._do_request('movie/'+str(tmdb_id), '')
+        r = self._do_request('movie/'+str(tmdb_id), values)
         if q: q.put(r)
         return r
 
@@ -385,22 +385,15 @@ class TMDB(object):
             tmdb_id = imdb_id
 
         if tmdb_id:
-            #metaQueue = queue.Queue()
-            castQueue = queue.Queue()
-            trailerQueue = queue.Queue()
-            #Thread(target=self._get_info, args=(tmdb_id,metaQueue)).start()
-            #meta = metaQueue.get()
-
-            #Only grab extra info if initial search returns results
-            meta = self._get_info(tmdb_id)
+
+            #Attempt to grab all info in one request
+            meta = self._get_info(tmdb_id, 'append_to_response=casts,trailers')
             if meta is None: # fall through to IMDB lookup
                 meta = {}
-            else:               
-                #Grab extra info on threads
-                Thread(target=self._get_cast, args=(tmdb_id,castQueue)).start()
-                Thread(target=self._get_trailer, 
args=(tmdb_id,trailerQueue)).start()
-                cast = castQueue.get()
-                trailers = trailerQueue.get()
+            else:
+                #Parse out extra info from request
+                cast = meta['casts']
+                trailers = meta['trailers']
                 
                 if meta.has_key('poster_path') and meta['poster_path']:
                     meta['cover_url'] = self.poster_prefix + 
meta['poster_path']

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

Summary of changes:
 script.module.metahandler/addon.xml               |    2 +-
 script.module.metahandler/changelog.txt           |    4 +++
 script.module.metahandler/lib/metahandler/TMDB.py |   27 +++++++-------------
 3 files changed, 15 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to