![]() |
How to make a scraper return multiple Thumbs / FanArts? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60) +--- Thread: How to make a scraper return multiple Thumbs / FanArts? (/showthread.php?tid=50452) |
How to make a scraper return multiple Thumbs / FanArts? - m69bv3 - 2009-05-06 Hi, I'm writing a scraper and I wonder what is the xmlformat that the scraper should output to have:
Code: <thumbs> Seems to work but is it the right way? And how can i specify FanArt? especially backdrops for AEON. Thanks for your help! 'xcuse my english i'm french - spiff - 2009-05-06 that is correct for thumbs. fanart is a bit different atm, i plan to change it at some point, but anyways; Code: <fanart url="basepath"> see the tmdb scraper for a "live" example - m69bv3 - 2009-05-07 Thanks! It's perfect! - ultrabrutal - 2009-06-26 1. Spiff, how does XBMC differ between 1080p and 720p fanart (could find any info on this)? If it doesn't wouldn't be nice to let it pick the correct one based on the screen setup, so that you don't pick a 720p for a 1080p screen? Something like this: Code: <fanart url="basepath"> This could also been shown in the fanart overview of the thumbnails as an overlay and even sorted by this. 2. The preview attribute. Is it relative also, or does it need the full path to the preview? Multiple fanart regex's in GetDetails - ultrabrutal - 2009-07-07 Spiff, my question from above remains if you can answer it ![]() Plus I've run into a problem I need some help with. I have two regex for fanart, one for 720p and one for 1080p. I need the results from both merged into a usable result. Right now I don't get any fanart at all in XBMC ![]() 1080p: Code: <RegExp conditional="fanart" input="$$4" output="<fanart url="http://files.mymovies.dk/Backdrops/">\1</fanart>" dest="5+"><RegExp input="$$1" output="<thumb preview="\1" resolution="1080p">\2</thumb>" dest="4"><expression repeat="yes">FileThumb="[^>]*\/(.+)" F[^<]*File1080P="[^>]*\/(.+)" Hash1080p</expression></RegExp><expression noclean="1">(.+)</expression></RegExp> 720p: Code: <RegExp conditional="fanart" input="$$4" output="<fanart url="http://files.mymovies.dk/Backdrops/">\1</fanart>" dest="5+"><RegExp input="$$1" output="<thumb preview="\1" resolution="720p">\2</thumb>" dest="4"><expression repeat="yes">FileThumb="[^>]*\/(.+)" File720P="[^>]*\/(.+)" Hash720p</expression></RegExp><expression noclean="1">(.+)</expression></RegExp> XML which GetDetails is working on: Code: <Backdrops> I'm not a regex nor a scraper shark, so wondering if it is possible to merge these results into something which works with XBMC? Tnx - ultrabrutal - 2009-07-07 This is what I've come up with: Code: <RegExp conditional="fanart" input="$$4" output="<fanart url="http://files.mymovies.dk/Backdrops/">\1</fanart>" dest="5+"><RegExp input="$$1" output="<thumb preview="\1" resolution="1080p">\2</thumb>" dest="4"><expression repeat="yes">FileThumb="[^>]*\/(.+)" F[^<]*File1080P="[^>]*\/(.+)" Hash1080p</expression></RegExp><RegExp input="$$1" output="<thumb preview="\1" resolution="720p">\2</thumb>" dest="4+"><expression repeat="yes">FileThumb="[^>]*\/(.+)" File720P="[^>]*\/(.+)" Hash720p</expression></RegExp><expression noclean="1">(.+)</expression></RegExp> However it does not give any results in XBMC. And yes I have a setting called 'fanart' which is set to true. ScraperXML test crashes for me so I'm working in the blind here ![]() - ultrabrutal - 2009-07-08 Nicezia, new version of ScraperXML test does not crash but no result what so ever is returned/shown in gui. In XBMC a result is there but something is wrong with the fanart. Regex'es works in regextester but when run in XBMC, something goes wrong. Will try to catch you on IRC again - spiff - 2009-07-13 i don't quite grasp what the problem is? your expressions are obviously invalid. unless i have misunderstood something it would just be Code: FileThumb="[^>]* File1080P="([^"]+)" ![]() and Code: FileThumb="[^>]* File720P="([^"]+)" Hash720P="[^"]*" File1080P="" xbmc does not different between 1080p and 720p fanart, we use whatever you give us at whatever res it's at (except the xbox which resamples everything > 720p to 720p) - ultrabrutal - 2009-07-13 Tnx spiff! I guess I cannot trust regextester ![]() For those who cares, here is the working code: Code: <RegExp conditional="fanart" input="$$4" output="<fanart>\1</fanart>" dest="5+"><RegExp input="$$1" output="<thumb preview="\1" dim="1920x1080">\2</thumb>" dest="4"><expression repeat="yes">FileThumb="([^"]*)" F[^<]*File1080P="([^"]*)" Hash1080p</expression></RegExp><RegExp input="$$1" output="<thumb preview="\1" dim="1920x720">\2</thumb>" dest="4+"><expression repeat="yes">FileThumb="([^"]*)" File720P="([^"]*)" Hash720p</expression></RegExp><expression noclean="1">(.+)</expression></RegExp> NB! XBMC do not support "dim" yet in any skin |