[packages/griffith] parse posters
glen
glen at pld-linux.org
Tue Jul 28 20:11:38 CEST 2015
commit 78f08559264606f45a0d51f225731ec08f849213
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Jul 28 21:11:32 2015 +0300
parse posters
Kodi.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/Kodi.py b/Kodi.py
index 87dea0a..5728c5a 100644
--- a/Kodi.py
+++ b/Kodi.py
@@ -194,6 +194,12 @@ class ImportPlugin(IP):
if notes:
details['notes'] = "\n".join(notes)
+ # handle poster
+ # take first <thumb aspect="poster"> element
+ posters = item.xpath('thumb[@aspect="poster"]')
+ if posters:
+ details['image'] = posters[0].get('preview')
+
# increment for next iteration
self.itemindex = self.itemindex + 1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/griffith.git/commitdiff/78f08559264606f45a0d51f225731ec08f849213
More information about the pld-cvs-commit
mailing list