• 1
  • 16
  • 17
  • 18(current)
  • 19
  • 20
  • 51
[RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC')
Martijn Wrote:That would run it each time you enter home am i right?
Maybe have it in startup.xml so it's started one time.

What if you use sleep instead of quit/shutdown on you htpc? I do.
My skins:

Amber
Quartz

Now that ronie's added the running property I run it from Startup.xml and then use a conditional for the Home.xml in case someone has switched skins..

PHP Code:
<onload condition="IsEmpty(Window(Home).Property(Watchlist_Running))">RunScript(script.watchlist,movies=$INFO[Skin.String(Watchlist_Movies)]&amp;episodes=$INFO[Skin.String(Watchlist_Episodes)]&amp;albums=$INFO[Skin.String(Watchlist_Albums)]&amp;limit=6)</onload
Using 0.1.7 and no issues. Works like a charm
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Hitcher Wrote:Now that ronie's added the running property I run it from Startup.xml and then use a conditional for the Home.xml in case someone has switched skins..

PHP Code:
<onload condition="IsEmpty(Window(Home).Property(Watchlist_Running))">RunScript(script.watchlist,movies=$INFO[Skin.String(Watchlist_Movies)]&amp;episodes=$INFO[Skin.String(Watchlist_Episodes)]&amp;albums=$INFO[Skin.String(Watchlist_Albums)]&amp;limit=6)</onload

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?
My skins:

Amber
Quartz

If this script should be automaticly run consider using service addon. Not sure if we could enable/disable it from skin tho.
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

My previous forum/trac nickname: grajen3
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?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
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>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
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.
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:

Amber
Quartz

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
Maybe, but I've been told we are in feature freeze.
My skins:

Amber
Quartz

pecinko Wrote:Maybe, but I've been told we are in feature freeze.

Just tell every one it's a bug Wink
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
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
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:

Amber
Quartz

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 :-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
  • 1
  • 16
  • 17
  • 18(current)
  • 19
  • 20
  • 51

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Watchlist script (was 'Adding Plex's 'On Deck' feature to XBMC')2