Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Hack to get tmdb.py working

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


killerkiwi2005 at gmail

Jul 21, 2010, 4:40 AM

Post #1 of 2 (395 views)
Permalink
Hack to get tmdb.py working

Heres a hack to get movie art working again.. looks like theres a
redirect happening that myth cant handle

file:
/usr/share/mythtv/mythvideo/scripts/Movie/tmdb.py

replace the method below:

def displayMovieData(self, data):
'''Display movie data to stdout
'''
if data == None:
return
data_keys = data.keys()
data_keys_org = data.keys()
for index in range(len(data_keys)):
data_keys[index] = data_keys[index].replace(u' ',u'').lower()

for key in self.mythtvgrabber:
if key.lower() in data_keys:
if key.lower() in ["coverart", "fanart"]:
d = data[data_keys_org[data_keys.index(key.lower())]]
urls = []
for url in d.split(","):
import urllib2
ufile = urllib2.urlopen(url) ## get file-like object for url
urls.append(ufile.geturl())
# Myth only uses the first one anyway so break out
break

sys.stdout.write(u"%s:%s\n" % (key, urls))
else:
sys.stdout.write(u"%s:%s\n" % (key,
data[data_keys_org[data_keys.index(key.lower())]]))

mythtvgrabber = []
for item in self.mythtvgrabber:
mythtvgrabber.append(item.lower())
for key in data_keys:
if not key in mythtvgrabber:
sys.stdout.write(u"%s:%s\n" %
(self.camelcase(data_keys_org[data_keys.index(key)]),
data[data_keys_org[data_keys.index(key)]]))
# end displayMovieData(()

And it works again

--
"Weekends don't count unless you spend them doing something completely
pointless. " - Calven

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


ross.jemima at gmail

Jul 21, 2010, 12:02 PM

Post #2 of 2 (366 views)
Permalink
Re: Hack to get tmdb.py working [In reply to]

Jason Taylor wrote:
> Heres a hack to get movie art working again.. looks like theres a
> redirect happening that myth cant handle
>

Thanks Jason, I had noticed that had stopped working. I'll give it a
try later on.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.