Kodi Community Forum

Full Version: Special Features
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
(2018-03-15, 03:48)wyrm Wrote: [ -> ]@smitchell6879 ,

Couple of issues with the special features discoverabilty.  First one is that your posted visible tag was a bit (alright a lot) wrong.   The following works, but is still a bit slow:

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

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.

Thanks mate
Wyrm (AppTV)
 Thanks for the pointer! We're all stuck behind a bit of a learning curve, be it with Python or with Kodi itself. That's a good tip that should point us in the right direction though! I've opened an issue here, and you're more than welcome to keep an eye on it, or provide feedback!
(2018-03-15, 03:48)wyrm Wrote: [ -> ]@smitchell6879 ,

Couple of issues with the special features discoverabilty.  First one is that your posted visible tag was a bit (alright a lot) wrong.   The following works, but is still a bit slow:

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

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.

Thanks mate
Wyrm (AppTV)


I will look into this some more as of right now I have to split part of the code to a module to get it into the official repo.. so I may have to do some refactoring anyways...
@wyrm

So I just took a look at the read me for skin helper.

https://github.com/marcelveldt/script.sk...s---Common

All of his list item properties are to be used the in the same way ...

He fills the properties with information about the item as it is focused.

My specialfeatures.visible give u a true string if item has special features...

If you can give me a example where he actually sets Listitem property ... Which would be called as $INFO[Listitem.Property(thenameoftheproperty)] then I would appreciate so I can track down how he does it. Because I would like to do it that away.

But from what I see is all is called from
$INFO[Window(home).Property(thenameoftheproperty)].which is what I am doing.
@wyrm @smitchell6879 - There is no way for a plugin to set ListItem.Properties for list content that is not its own (that's why skin helper uses window properties instead). Also, window properties can only be strings/integers, not booleans. AFAIK, the current implemented approach is the only possible way to show a flag.
(2018-03-15, 07:50)jurialmunkey Wrote: [ -> ]@wyrm @smitchell6879 - There is no way for a plugin to set ListItem.Properties for list content that is not its own (that's why skin helper uses window properties instead). Also, window properties can only be strings/integers, not booleans. AFAIK, the current implemented approach is the only possible way to show a flag.
@jurialmunkey @smitchell6879 ,

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:

Code:
$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.

Wyrm (AppTV)
(2018-03-15, 09:39)wyrm Wrote: [ -> ]
(2018-03-15, 07:50)jurialmunkey Wrote: [ -> ]@wyrm @smitchell6879 - There is no way for a plugin to set ListItem.Properties for list content that is not its own (that's why skin helper uses window properties instead). Also, window properties can only be strings/integers, not booleans. AFAIK, the current implemented approach is the only possible way to show a flag.
@jurialmunkey @smitchell6879 ,

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:

Code:
$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.

Wyrm (AppTV)

I really do like the way you think, the setting artwork would be really cool; Issue I see with it is the way Kodi doesn't like to clear the cached images that easily so if the user happens to remove the extras then I would have to figure out a way for kodi to clear that one cached image instantly. And personally I have found at times I have to remove the whole drive before kodi will truly clean the cached images.
Maybe someone else that knows more about how to all of that operates can help out.
@smitchell6879 -- Artwork Beef has functions to remove artwork types and it appears to work instantaneously after they are removed.

Btw, @wyrm I've got to say that is really a genius idea! Because even if you want to use a different flag you would still be able to do
!String.IsEmpty(ListItem.Art(SpecialFeaturesFlag))
(2018-03-16, 04:51)jurialmunkey Wrote: [ -> ]@smitchell6879 -- Artwork Beef has functions to remove artwork types and it appears to work instantaneously after they are removed.
Guess you would have all the tools you need in that case. As a side note my skin now has complete support for the script, unfortunately some of my views just wont work with the current flag implementation

Quote:Btw, @wyrm I've got to say that is really a genius idea! Because even if you want to use a different flag you would still be able to do
!String.IsEmpty(ListItem.Art(SpecialFeaturesFlag))
yep, the different flag solution had occured to me as well, but main reason was the original solution would generate huge amounts of log spam. Apart from being a big problem for my CDO, I’m sure it would slow things down

Wyrm (AppTV)
I will look into adding that for the next release... On a good note this is now in the Kodi 17 official repo as a context menu.
@smitchell6879 - Has the "SpecialFeatures.Widget" property changed names? It doesn't appear to work for me to fill a list content any more (using official repo version on Krypton).

Also, congrats on getting your add-on in the official repo! I hope it is the first of many Wink
It shouldn't have but there were some issues getting it in the repo and some miss communication... So in the process something may have broken by mistake... I am pretty busy for the the rest of the week but I will try to take a look at the official verison this weekend and see if something has changed on me.

I do apologise for the delay.
(2018-03-22, 08:39)smitchell6879 Wrote: [ -> ]It shouldn't have but there were some issues getting it in the repo and some miss communication... So in the process something may have broken by mistake... I am pretty busy for the the rest of the week but I will try to take a look at the official verison this weekend and see if something has changed on me.

I do apologise for the delay.

No worries at all! Take your time. There's no rush Smile
(2018-03-23, 02:19)jurialmunkey Wrote: [ -> ]No worries at all! Take your time. There's no rush Smile 
    @jurialmunkey Off topic, but just wanted to say I'm thrilled you're starting to integrate SF with your skins. I've been using Eminence for ages (or my mod of it anyway), and just recently started testing Aura (beautiful design)... If you finish Aura before I finish writing Blend, I'm gonna be switching to it. Absolutely gorgeous work, and a huge source of inspiration for my current pet project!
smitchell6879,

I am using your addon to play the memento movie in chronological order. Movie is made up of 46 mkv files, if i hit play all, it plays the movie with no issues, but if I select a specific part and hit enter, a pop up box shows up and asks the user to enter the movie name.

Before this pop up box shows, I can read "query local information only information".

File name is: Memento (2000)(DVD)Part1.mkv, Part2.mkv, etc.

WIndows 7, Kodi 17.6

Not sure what is causing the issue
(2018-03-24, 04:12)Edworld Wrote: [ -> ]smitchell6879,

I am using your addon to play the memento movie in chronological order. Movie is made up of 46 mkv files, if i hit play all, it plays the movie with no issues, but if I select a specific part and hit enter, a pop up box shows up and asks the user to enter the movie name.

Before this pop up box shows, I can read "query local information only information".

File name is: Memento (2000)(DVD)Part1.mkv, Part2.mkv, etc.

WIndows 7, Kodi 17.6

Not sure what is causing the issue

you have show info as your default action... I forgot about this issue.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21