Posts: 29
Joined: Jan 2013
Reputation:
0
I want to get Fanart backgrounds for TV shows I scrape with my custom scraper in <GetDetails>.
I have the IMDB title ID.
Can someone post a regexp code that will do the job?
Posts: 29
Joined: Jan 2013
Reputation:
0
Ok, so what should the final xml look like in order for the background to appear in XBMC?
like this?
<Banner>
<id>89141</id>
<BannerPath>fanart/original/73739-34.jpg</BannerPath>
<BannerType>fanart</BannerType>
<BannerType2>1920x1080</BannerType2>
<Colors>|148,149,153|13,23,22|165,159,137|</Colors>
<Language>en</Language>
<Rating>7.5758</Rating>
<RatingCount>33</RatingCount>
<SeriesName>false</SeriesName>
<ThumbnailPath>_cache/fanart/original/73739-34.jpg</ThumbnailPath>
<VignettePath>fanart/vignette/73739-34.jpg</VignettePath>
</Banner>
Posts: 1,052
Joined: Jul 2011
Reputation:
89
scudlee
Retired Team-Kodi Member
Posts: 1,052
You have to remember the order in which the functions are processed, compared to when the buffers are substituted in. GetTVDBid (and GetFanart) won't be run until after GetDetails has returned, so of course $$20 will be empty because it hasn't been filled yet.
What I was suggesting above was to have GetTVDBid return the call to GetFanart.
And remember each function as a whole needs to return a <details>...</details> block, you don't need to wrap each call to a function in them. (The reason I put them around the call to GetFanart was because it was meant to be the complete output of GetTVDBid.)
Posts: 29
Joined: Jan 2013
Reputation:
0
2013-03-05, 19:50
(This post was last modified: 2013-03-05, 19:51 by meathook2.)
Well, now in xbmc.log, I see the call to the chain function "GetThumb" but i don't get the output from it after that.
I also tried to put the input directly without an expression:
<GetFanart dest="17" clearbuffers="no">
<RegExp input="$$17" output="<details><fanart url="http://thetvdb.com/banners/">\1</fanart></details>" dest="17">
<RegExp input="$$1" output="<details><chain function="GetThumb"><Banner><id>888699</id><BannerPath>fanart/original/253463-2.jpg</BannerPath><BannerType>fanart</BannerType><BannerType2>1920x1080</BannerType2><Colors/><Language>en</Language><Rating>8.1667</Rating>
<RatingCount>6</RatingCount><SeriesName>false</SeriesName><ThumbnailPath>_cache/fanart/original/253463-2.jpg</ThumbnailPath><VignettePath>fanart/vignette/253463-2.jpg</VignettePath></Banner></chain></details>" dest="17">
<expression noclean="1"/>
<!--<expression noclean="1"><banner>(.|\r|\n)*?</banner></expression>-->
</RegExp>
<expression noclean="1"/>
</RegExp>
</GetFanart>
by the way, with this expression in "GetFanart": <expression noclean="1"><banner>(.|\r|\n)*?</banner></expression>
I don't get any results although it does match the contents of "http://www.thetvdb.com/api/1D62F2F90030C444/series/253463/banners.xml" when I search it in Notepad ++.
Why is that?