Kodi Community Forum
Release script favourites - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: Release script favourites (/showthread.php?tid=114671)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


script favourites - `Black - 2011-11-15

I added a new feature to the favourites script so that it's now very easy to set a favourite as a string for use as a custom home item or something else.

If you run the script like this
Code:
RunScript(script.favourites,property=CustomFavourite1)

it will open a select dialog and if you choose a favourite, the script will set the following strings based on the provided property:
Code:
CustomFavourite1.Label
CustomFavourite1.Path
CustomFavourite1.Icon
CustomFavourite1.List (the absolute path without the 'Activate.Window()' part. can be used to fill a container with listitems)

I hope this will make things a lot easier for you. Smile

script-favourites is available from the official repo.


- Mudislander - 2011-11-15

Thanks, I'll give it a whirl.


- Hitcher - 2011-11-15

Thanks.


- BigNoid - 2011-11-15

Can an option be added for playlist=play in a select dialog? We now run it per custom favorite, would be nice for users to choose thus instead of us.


- Hitcher - 2011-11-15

If you're taking suggestions can an album be set to play as well?

Thanks.


- `Black - 2011-11-15

If the selected favourite is a playlist, yes/no dialog pops up where you can choose.

@Hitcher
I'll add that.


- Hitcher - 2011-11-15

Cheers.


- `Black - 2011-11-15

I took a look into it and I think it's not possible because there are several edge cases where you don't know if it's an album or not.

Edit: Only thing I could do is to ask for play every time if it's music. But there will be an error if you try to play an artist or year favourite.


- pecinko - 2011-11-15

`Black Wrote:I took a look into it and I think it's not possible because there are several edge cases where you don't know if it's an album or not.

So it will remain as skinner definable feature?


- Hitcher - 2011-11-15

No worries, thanks for looking.


- BigNoid - 2011-11-15

Works as expected. only thing I'm missing is an option to clear the current setting.


- `Black - 2011-11-15

I could add it but if you add a button to clear it, you could simply add 3 onclick actions with

Code:
Skin.Reset(property.Label)
Skin.Reset(property.Path)
Skin.Reset(property.Icon)

Or do you want to clear it differently?

@pecinko
No way for the skinner to choose. It's ActivateWindow(...) for everything except videos or songs. User can choose for playlists.


- BigNoid - 2011-11-15

yeah, but it's much cleaner if it's done like with add-ons. The first item in the list is for "None - clear the current settings". I can't add that in the select dialog that pops-up.
Also if I was to add a clear button for every item then there is even more code than I use now for the same functionality.


- pecinko - 2011-11-16

Big_Noid Wrote:yeah, but it's much cleaner if it's done like with add-ons. The first item in the list is for "None - clear the current settings".

+1 for this if possible


- pecinko - 2011-11-16

`Black Wrote:@pecinko
No way for the skinner to choose. It's ActivateWindow(...) for everything except videos or songs. User can choose for playlists.

If it's like that, that's cool for me.