[RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC')

  Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ronie Offline
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #261
pieh Wrote:If this script should be automaticly run consider using service addon. Not sure if we could enable/disable it from skin tho.

pieh, when a users switches skins, why don't we start the new skin from Startup.xml ?

currently, when changing skins, we skip everything the new skin has defined in Startup.xml and this leads to missing bits and pieces in the skin.

any thoughts?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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
ronie Offline
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #262
pecinko Wrote:Yup, but what do you think would be a solution for a situation were user is switching from a skin that uses say 4 items to a skin using 8. Or, from a skin not using music items in WL script to a skin that uses all.

All I came up with would be to run it on home.xml load to make sure all info would be fetched?

The way I see it you either re-run it on home with definable parameters or make a background service but with fixed parameters. I may be missing something, though?

what i would do is to conditionally run the script in Home.xml only:
Quote:<onload condition="IsEmpty(Window(Home).Property(Quartz_Watchlist))">RunScript(script.watchlist,...)</onload>
<onload condition="IsEmpty(Window(Home).Property(Quartz_Watchlist))">SetProperty(Quartz_Watchlist,True)</onload>

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #263
ronie Wrote:pieh, when a users switches skins, why don't we start the new skin from Startup.xml ?

currently, when changing skins, we skip everything the new skin has defined in Startup.xml and this leads to missing bits and pieces in the skin.

any thoughts?

This is probably the best solution.

[Image: sig_zps3af3b48e.jpg]
find quote
pecinko Online
Donor
Posts: 2,995
Joined: Dec 2008
Reputation: 26
Location: Prague / Belgrade
Post: #264
Guys everything tells me to keep my mouth shut or risk being marked as major pain in the ass that's always complaining and requesting something but still:

I still think there's no way of telling what parameters were used by previous skin, meaning you need to re-run it with your own to be sure. Even with property check ronie suggested - ones the property is set it will not guard from future skin switches.

Maybe I'm just being stupid.. (you don't need to comfirm this Smile

My skins:

Quartz
Amber
find quote
`Black Online
Skilled Skinner
Posts: 1,998
Joined: Apr 2009
Reputation: 49
Location: Germany
Post: #265
If a skin was changed, stop all scripts started by the previous skin, run startup.xml from the new skin and activate settings -> appearance. That would be the safest way... besides a skin could have it's own scripts which need to be run so you have to restart XBMC anyway at the moment.

[Image: xp1080.png]
find quote
pecinko Online
Donor
Posts: 2,995
Joined: Dec 2008
Reputation: 26
Location: Prague / Belgrade
Post: #266
Maybe, but I've been told we are in feature freeze.

My skins:

Quartz
Amber
find quote
Martijn Online
Team-XBMC
Posts: 7,674
Joined: Jul 2011
Reputation: 114
Location: Dawn of time
Post: #267
pecinko Wrote:Maybe, but I've been told we are in feature freeze.

Just tell every one it's a bug Wink

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first


For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
`Black Online
Skilled Skinner
Posts: 1,998
Joined: Apr 2009
Reputation: 49
Location: Germany
Post: #268
pecinko Wrote:Maybe, but I've been told we are in feature freeze.

Yep so if this doesn't make it to Eden, I wouldn't care about this problem too much. A quick restart of XBMC isn't much of a problem, no one changes a skin every 5 minutes... you're using one and that's it.

[Image: xp1080.png]
find quote
pecinko Online
Donor
Posts: 2,995
Joined: Dec 2008
Reputation: 26
Location: Prague / Belgrade
Post: #269
Well grumpy old fart (me) still thinks it would be better to sacrifice script options temporarily and make them hardcoded ATM. You would check if script is running and launch it if it's not.

I guess it's just my personal preference. I'll keep with the flow, of courz.

My skins:

Quartz
Amber
find quote
ronie Offline
Team-XBMC Member
Posts: 8,247
Joined: Jan 2009
Reputation: 108
Post: #270
let me try to clear up some of the confusion...

pecinko Wrote:I still think there's no way of telling what parameters were used by previous skin
indeed, and there's no need to.
your skin should just run the script with the parameters it needs.
the script will detect if it was previously started (by another skin) and kill that thread.

pecinko Wrote:Even with property check ronie suggested - ones the property is set it will not guard from future skin switches.

you don't need to worry about skin switches.
the only thing you have to make sure of is that you run the script once,
when a user starts your skin or switches to your skin.

the two lines of code i posted above should take care of that and it's all you need.

please let me know if there's anything you don't get or if i've missed something :-)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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
Post Reply