Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better discoverability for items containing special features. #27

Open
evertiro opened this issue Mar 15, 2018 · 1 comment
Open

Comments

@evertiro
Copy link
Contributor

Cross posted from https://forum.kodi.tv/showthread.php?tid=327042&pid=2714296#pid2714296

The following has been suggested as a quick fix:

<visible>System.HasAddon(plugin.video.specialfeatures) + !String.IsEmpty(Window(home).Property(SpecialFeatures.Visible))</visible>

Per wyrm:

I say its slow as your window property is a string and not a boolean, thus you have to use string operations to check it (much, much slower than boolean operations under Kodi).

I can't offer any python pointers on listitem properties as my python is rudimentary at best, but you might like to check out Marcel's skin helper scripts as he makes extensive use of listitem properties to add to the music and video library. As the script stands I guess the user can now see if the current item has any special features, but it would be better if we could display something for the non focused items as well. If nothing else changing Window(home).Property(SpecialFeatures.Visible) to a boolean will speed up the checks required by the skin.

@evertiro
Copy link
Contributor Author

RE: https://forum.kodi.tv/showthread.php?tid=327042&pid=2714355#pid2714355

Sorry guys, Yes you are correct it is window properties and so only possible for the focused item. Have been reviewing my skin code for Voldermorts extras script implementation and now realise what he did to allow flags for focused AND unfocused listitems. He copied a image file named for the listitems DBID into his scripts addon_data directory for each listitem with extras found during his extras directory scan. Then the skin writer would use something like this to display the file:

$INFO[ListItem.DBID,special://profile/addon_data/script.videoextras/movies/,.png]

Rather cunning really. At the risk of being labelled a Deatheater, could not the same trick be pulled but stored in the Kodi video library as a new Art type (SpecialFeatureFlag). That way we could take advantage of the library image cache and avoid some of the file i/o that the above entails. Pretty sure addons are allowed to add new Art types to the db, otherwise just use the original trick and we can then show a flag for both focused and unfocused listitems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant