Scraper setup questions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
MaDDoGo Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 1
Location: Sabadell (Barcelona)
Post: #1
Hi,

I'm editing the filmaffinity scraper and I have a question. I want to disable some options if one is selected.

For example, I want to disable themoviedb, IMPAwards and other cover scrapers if Download only filmaffinity is selected. Can I do this?

Thanks!
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,233
Joined: Nov 2003
Reputation: 82
Post: #2
sure you can, you can either disable or hide settings using

enable="eq(<offsettosettingyouwantoconditionon>,true)" if it's a bool, or ,<valueofsetring> if it's a string. if you want to check for a blank string you can use
enable="!eq(-1,)"

here we are disabled if the setting above is blank.

if you prefer, you can hide settings using the 'visible' attribute, same syntax.

see e.g. the utub plugin

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
MaDDoGo Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 1
Location: Sabadell (Barcelona)
Post: #3
Thanks for the fast answer Smile If the condition depends of various settings what I have to do?

Here's the settings.xml:
Quote:<settings>
<setting label="30012" type="lsep" />
<setting label="30002" type="bool" id="OnlyFilmAffinity" default="false" />
<setting label="30011" type="bool" id="EnableFilmAffinityPosters" default="true" />
<setting label="30013" type="lsep" />
<setting label="30001" type="labelenum" values="Ninguno|HD-Trailers(480p)|HD-Trailers(720p)|HD-Trailers(1080p)|Filmaffinity" id="TrailerQ" default="Filmaffinity"/>
<setting label="30014" type="lsep" />
<setting label="30003" type="bool" id="EnableFanArt" default="true" />
<setting label="30004" type="bool" id="EnableIMPAwards" default="true" />
<setting label="30005" type="bool" id="EnableMoviePosterDB" default="true" />
<setting label="30007" type="bool" id="EnableTMDBPoster" default="true" />
<setting label="30015" type="lsep" />
<setting label="30006" type="bool" id="EnableIMDBPosters" default="true" />
<setting label="30009" type="bool" id="ExtraiMDB" default="true" />
<setting label="30000" type="bool" id="EnableFullCast" default="true" />
<setting label="30010" type="bool" id="iMDBRatings" default="true" />
<setting label="30008" type="bool" id="StudioFlagsON" default="true" />
</settings>

I want to disable all EnableFanart, IMPAwards, MoviePoster, TMDB and IMDB posters if the setting onlyfilmaffinity is true and disable onlyfilmaffinity if anyone of the others are true (I hope you understand, because I explain really poor and worse in English Smile)

Programing Explanation:

If (EnableFanArt OR EnableIMPAwards OR EnableMoviePosterDB OR EnableTMDBPoster OR EnableIMDBPosters OR EnableFilmAffinityPosters) == True
then OnlyFilmAffinity = False
Else if OnlyFilmAffinity == True
then EnableFanArt AND EnableIMPAwards AND EnableMoviePosterDB AND EnableTMDBPoster AND EnableIMDBPosters AND EnableFilmAffinityPosters= False

Thanks for advance Big Grin

PS: There is any way to force configuration after installing or updating the addon with new settings? I say this because in this new version I'm working I added a trailer's choice and I want to force configure the scraper after installing it, is this possible?
(This post was last modified: 2011-01-07 19:33 by MaDDoGo.)
find quote