From 4694b7cd3348549eefce7c6efcfbcac54d2cfaa2 Mon Sep 17 00:00:00 2001 From: Whiplash Date: Sat, 19 Oct 2019 22:03:28 +0200 Subject: [PATCH] [polpoTV] json fix + scraped thumbnail --- channels/polpotv.json | 2 +- channels/polpotv.py | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/channels/polpotv.json b/channels/polpotv.json index 905cb59a..e47c4dca 100644 --- a/channels/polpotv.json +++ b/channels/polpotv.json @@ -1,7 +1,7 @@ { "id": "polpotv", "name": "PolpoTV", - "language": ["it"], + "language": ["ita"], "active": true, "adult": false, "thumbnail": "https://polpo.tv/build/assets/apple-touch-icon-152x152.png", diff --git a/channels/polpotv.py b/channels/polpotv.py index b8452b8b..2a603680 100644 --- a/channels/polpotv.py +++ b/channels/polpotv.py @@ -95,6 +95,7 @@ def findvideos(item): return itemlist def get_itemlist_movie(movie,item): + logger.info("kod.polpotv get_itemlist_movie") itemlist=[] try: if movie['originalLanguage']['id']=='it': @@ -102,24 +103,32 @@ def get_itemlist_movie(movie,item): else: scrapedtitle=movie['translations'][1]['name'] if scrapedtitle=='': - scrapedtitle=movie['originalTitle'] + scrapedtitle=movie['originalTitle'] except: scrapedtitle=movie['originalTitle'] try: scrapedplot=movie['translations'][1]['overview'] except: scrapedplot = "" - scrapedthumbnail = "" + try: + scrapedthumbnail="http://"+movie['posterPath'] + except: + scrapedthumbnail="" + try: + scrapedfanart="http://"+movie['backdropPath'] + except: + scrapedfanart="" itemlist.append( - Item(channel=item.channel, - action="findvideos", - title="[COLOR azure]" + scrapedtitle + "[/COLOR]", - fulltitle=scrapedtitle, - show=scrapedtitle, - plot=scrapedplot, - thumbnail=scrapedthumbnail, - contentType='movie', - contentTitle=scrapedtitle, - url="%s%s/releases" %(host,movie['@id'] ), - extra=item.extra)) + Item(channel=item.channel, + action="findvideos", + title="[COLOR azure]" + scrapedtitle + "[/COLOR]", + fulltitle=scrapedtitle, + show=scrapedtitle, + plot=scrapedplot, + fanart=scrapedfanart, + thumbnail=scrapedthumbnail, + contentType='movie', + contentTitle=scrapedtitle, + url="%s%s/releases" %(host,movie['@id'] ), + extra=item.extra)) return itemlist