Page 1 of 1

Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 4:57 pm
by r-win
Hi,

I've got a question about thumbnails. When creating a FeedItemUrlExtractor, you can pass a thumbnailUrl to the ContentURLContainer returned by extractUrl.

When creating a WebResourceUrlExtractor, you can do the same. However, with the WebResourceUrlExtractor, you can also add a thumbnail to the WebResourceContainer returned by extractItems method. It seems that the WebResourceUrlExtractor ignores the thumbnails specified in the ContentURLContainer, and returns the "global" thumbnail for all items, as returned in the WebResourceContainer.

I'm not sure if this is by design, or if this is a bug. It's also possible, of course, that I'm doing something wrong. The plugin which has this issue is the Uitzending Gemist plugin, posted here.

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 5:26 pm
by zip
Yes, currently if container thumbnail is there it overrides the item thumbnail. I think it should be the other way around. Will fix for 1.1.

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 6:23 pm
by r-win
And if it's not there, it will ignore the item thumbnail, and show the placeholder instead.

Thanx for fixing!

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 8:53 pm
by zip
actually I was wrong. It separates thumbnail for the container and the items. It should already have the behaviour where container thumbnail is only used if item thumbnail is missing.

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 9:19 pm
by r-win
Well, then I suspect it's not working. It never uses the icon from the item itself, only from the container.

Weird fact is that it works with the Feeds, just not with WebResources.

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 9:26 pm
by zip
I tried Genre Comedy with your plugin and an getting no thumbnails at all:

  Code:
Uitzending Gemist: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=http://odi.omroep.nl/video/embedplayer/h264_bb/49f80d131eed1f790955b2bcdcc01de8/50b7d24f/POW_00494667/?type=http&, thumbnailUrl=, expiresImmediately=true, cacheKey=MEDIUM_14692056, live=false, ]


Or do I have to try another feed?

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 9:53 pm
by r-win
Weird, try the last one (Het Zandkasteel). I'll try the genre feed tomorrow: already in bed here :-)

Thanks again for looking into this.

Re: Thumbnails for WebResources

PostPosted: Thu Nov 29, 2012 10:08 pm
by zip
The same.

  Code:
22:06:37,960 DEBUG [FeedItemUrlExtractor] Uitzending Gemist: Starting extraction of url for item: Het Zandkasteel - La, la, la liedjes  (ma 26 nov 2012, 09:40)
22:06:38,059 DEBUG [FeedItemUrlExtractor] Uitzending Gemist: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=http://odi.omroep.nl/video/embedplayer/h264_bb/df53b614942e46e3c462eedc2f12ed12/50b7dc6d/NPS_1209735/?type=http&, thumbnailUrl=, expiresImmediately=true, cacheKey=MEDIUM_15011870, live=false, ]
22:06:38,059 DEBUG [ContentURLContainer] Cannot parse thumbnail URL: no protocol:

Re: Thumbnails for WebResources

PostPosted: Fri Nov 30, 2012 7:14 am
by r-win
Alright zip, that pointed me in the right direction. You're right, I forgot a @ somewhere in the Groovy syntax with XmlSlurper. So no problem in Serviio, but one in my plugin.

Thanks again!

Re: Thumbnails for WebResources

PostPosted: Fri Nov 30, 2012 9:43 am
by zip
Cool.