Kodi Community Forum

Full Version: script.embuary.helper - a skin helper service / widgets alternative
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 22 23 24 25 26
I added some conditions so it should only trigger if the required listitems are not empty, but I'm still getting the error if I navigate away too quickly. Is there a slight delay in the calculation triggering? Can you think of any way to avoid this error beyond slower navigating  Big Grin

Help is mucho appreciated.


  <!--HiddenFocusButton-->
  <include name="HiddenFocusButton">
    <control type="button">
      <visible allowhiddenfocus="true">false</visible>
      <animation effect="slide" end="0,0" time="380" reversible="false">Focus</animation>
      <onfocus condition="System.HasAddon(script.embuary.helper) + !String.IsEmpty(ListItem.Property(WatchedEpisodes)) + !String.IsEmpty(ListItem.Property(TotalEpisodes)) + !String.IsEqual(ListItem.Overlay,OverlayWatched.png) + [Container.Content(tvshows) | Container.Content(seasons)]">RunScript(script.embuary.helper,action=calc,do='"($INFO[ListItem.Property(WatchedEpisodes)] / $INFO[ListItem.Property(TotalEpisodes)]) * 100"',prop=MyResult)</onfocus>
      <onfocus condition="System.HasAddon(script.embuary.helper) + !String.IsEmpty(Container.TotalWatched) + !String.IsEmpty(Container.NumItems) + [Control.IsVisible(500) + Container.Content(episodes) + !Skin.String(DetailedListView_Display,Square)]">RunScript(script.embuary.helper,action=calc,do='"($INFO[Container.TotalWatched] / $INFO[Container.NumItems]) * 100"',prop=MyResult)</onfocus>
      <onunfocus condition="!String.IsEmpty(Window(Home).Property(MyResult))">ClearProperty(MyResult,home)</onunfocus>
    </control>
  </include>
(2020-01-29, 22:43)sualfred Wrote: [ -> ]Update from my repo or from the Emby repo. Or use the source from GitHub. I will submit it on the weekend that does not mean it will be available on the weekend (review process).
Thank you for the details @sualfred.
-- delete it --
(2020-01-30, 19:31)Cyberdom Wrote: [ -> ]
(2020-01-29, 22:43)sualfred Wrote: [ -> ]Update from my repo or from the Emby repo. Or use the source from GitHub. I will submit it on the weekend that does not mean it will be available on the weekend (review process).
Thank you for the details @sualfred.  
Thank you @sualfred.

Since update 1.4.2 available on the Kodi repository, the problem with accented characters has been fixed.
Hi @sualfred

I am (still!) using the following window properties provided by Marcel's script.skin.helper.service and i was wondering if it's possible to get these using your helper addon.


$INFO[Window(home).Property(SkinHelper.ListItem.ExtendedPlots)]
This provides movies titles with plots of all movies in the set combined in a text string to show them in a text viewer or in a plot textbox...

Image

Image



$INFO[Window(home).Property(SkinHelper.ListItem.xx.Art.Discart)]
These are to show the disc art of each movie in the set. Marcel was starting the xx numbering from 0 and so on but in Bello i am showing only the first three...

Image


These are the last stuff from Marcel's script (plus this one) that i am still cant find a way to replace them. It would be nice if there is way to do that with your script.

Thanks
Nessus
The fastest solution is a hidden skin container with the folderpath of the movie collection. Then you can use something like below. It's 99,9% instant without Python overhead. 

Code:

        <control type="list" id="2001">
            <include>HiddenObject</include>
            <content sortby="year">$INFO[ListItem.FolderPath]</content>
            <visible>String.IsEqual(ListItem.DBtype,set)</visible>
        </control>

Code:

<value condition="String.IsEqual(ListItem.DBType,set)">$INFO[ListItem.Plot,,[CR][CR]]$INFO[Container(2001).ListItemAbsolute(0).Label,$LOCALIZE[31192]:[CR]]$INFO[Container(2001).ListItemAbsolute(0).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(1).Label]$INFO[Container(2001).ListItemAbsolute(1).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(2).Label]$INFO[Container(2001).ListItemAbsolute(2).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(3).Label]$INFO[Container(2001).ListItemAbsolute(3).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(4).Label]$INFO[Container(2001).ListItemAbsolute(4).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(5).Label]$INFO[Container(2001).ListItemAbsolute(5).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(6).Label]$INFO[Container(2001).ListItemAbsolute(6).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(7).Label]$INFO[Container(2001).ListItemAbsolute(7).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(8).Label]$INFO[Container(2001).ListItemAbsolute(8).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(9).Label]$INFO[Container(2001).ListItemAbsolute(9).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(10).Label]$INFO[Container(2001).ListItemAbsolute(10).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(11).Label]$INFO[Container(2001).ListItemAbsolute(11).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(12).Label]$INFO[Container(2001).ListItemAbsolute(12).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(13).Label]$INFO[Container(2001).ListItemAbsolute(13).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(14).Label]$INFO[Container(2001).ListItemAbsolute(14).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(15).Label]$INFO[Container(2001).ListItemAbsolute(15).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(16).Label]$INFO[Container(2001).ListItemAbsolute(16).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(17).Label]$INFO[Container(2001).ListItemAbsolute(17).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(18).Label]$INFO[Container(2001).ListItemAbsolute(18).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(19).Label]$INFO[Container(2001).ListItemAbsolute(19).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(20).Label]$INFO[Container(2001).ListItemAbsolute(20).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(21).Label]$INFO[Container(2001).ListItemAbsolute(21).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(22).Label]$INFO[Container(2001).ListItemAbsolute(22).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(23).Label]$INFO[Container(2001).ListItemAbsolute(23).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(24).Label]$INFO[Container(2001).ListItemAbsolute(24).Year, (,)[CR]]$INFO[Container(2001).ListItemAbsolute(25).Label]$INFO[Container(2001).ListItemAbsolute(25).Year, (,)[CR]]</value
Wow!... that's a lot of code for replacing just one line!... but i guess since there is no python overhead it's the best option.

Thanks
Nessus
Yep, it's not nice but costs nearly nothing
(2020-02-16, 22:22)sualfred Wrote: [ -> ]Yep, it's not nice but costs nearly nothing

Hey man, this might be a weird question, but is there any way to replicate what your "Continue Watching" TV Show episode widget does as a smartplaylist? I ask because my kodi machine is pretty slow, so it takes ~30 seconds to populate the widget, and I saw this post from the author of the Bingie skin: 
Quote:Can widget loading be faster? Regarding loading of widgets: Widgets from library node/smartplaylist will be much much faster than widgets from plugin source, including skin helper widgets that does a pre-processing. Most of the widgets are possible to make with only smartplaylists, with the exception of Mixed media and widgets based on trakt/tmdb or other plugin source. 
This led me to believe I could re-create your widget -- which is a God send -- as a smart playlist so that it loads more swiftly on my resource-poor machine.  Sorry for the bother
@ntilikp this will give you your in progress TV shows if that's what you're after -

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>In Progress TV Shows</name>
    <match>all</match>
    <rule field="inprogress" operator="true" />
    <limit>25</limit>
    <order direction="descending">lastplayed</order>
</smartplaylist>
if you want episodes plus movies you have to use two <content> fields in a skin code. But they aren't ordered then. First movies, then episodes.
(2020-02-19, 06:35)ntilikp Wrote: [ -> ]
(2020-02-16, 22:22)sualfred Wrote: [ -> ]Yep, it's not nice but costs nearly nothing

Hey man, this might be a weird question, but is there any way to replicate what your "Continue Watching" TV Show episode widget does as a smartplaylist? I ask because my kodi machine is pretty slow, so it takes ~30 seconds to populate the widget, and I saw this post from the author of the Bingie skin: 
Quote:Can widget loading be faster? Regarding loading of widgets: Widgets from library node/smartplaylist will be much much faster than widgets from plugin source, including skin helper widgets that does a pre-processing. Most of the widgets are possible to make with only smartplaylists, with the exception of Mixed media and widgets based on trakt/tmdb or other plugin source. 
This led me to believe I could re-create your widget -- which is a God send -- as a smart playlist so that it loads more swiftly on my resource-poor machine.  Sorry for the bother 
@ntilikp , unfortunately, there is no way, as far as I know, without an addon, to get what the next unwatched episode for your recently played tv shows is.  It is easy with a playlist to show the in-progress episodes, but if you do not have any in-progress episode, I don't know of a way with a playlist to get the next unwatched one.  Say for example that you just finished watching episode 3 of season 2 of a show.  You would want the widget to show you episode 4 as part of "Continue Watching", correct? Well, if you have no other unwatched episodes in previous seasons of the show, then a smart playlist that shows unwatched episodes of recently played tv shows will show you that episode. 

However, if, say, you also did not watch episode 2 of season 1, then the unwatched playlist will show you that episode before episode 4 of season 2.  That is because it cannot distinguish between the first unwatched episode of the show and the "next" unwatched episode after the one you last watched.  That is why you need an addon.  At least, that is the way I understand it.  Hope this helps.

Regards,

Bart
(2020-02-19, 15:03)bsoriano Wrote: [ -> ]
(2020-02-19, 06:35)ntilikp Wrote: [ -> ]
(2020-02-16, 22:22)sualfred Wrote: [ -> ]Yep, it's not nice but costs nearly nothing

Hey man, this might be a weird question, but is there any way to replicate what your "Continue Watching" TV Show episode widget does as a smartplaylist? I ask because my kodi machine is pretty slow, so it takes ~30 seconds to populate the widget, and I saw this post from the author of the Bingie skin: 
Quote:Can widget loading be faster? Regarding loading of widgets: Widgets from library node/smartplaylist will be much much faster than widgets from plugin source, including skin helper widgets that does a pre-processing. Most of the widgets are possible to make with only smartplaylists, with the exception of Mixed media and widgets based on trakt/tmdb or other plugin source. 
This led me to believe I could re-create your widget -- which is a God send -- as a smart playlist so that it loads more swiftly on my resource-poor machine.  Sorry for the bother  
@ntilikp , unfortunately, there is no way, as far as I know, without an addon, to get what the next unwatched episode for your recently played tv shows is.  It is easy with a playlist to show the in-progress episodes, but if you do not have any in-progress episode, I don't know of a way with a playlist to get the next unwatched one.  Say for example that you just finished watching episode 3 of season 2 of a show.  You would want the widget to show you episode 4 as part of "Continue Watching", correct? Well, if you have no other unwatched episodes in previous seasons of the show, then a smart playlist that shows unwatched episodes of recently played tv shows will show you that episode. 

However, if, say, you also did not watch episode 2 of season 1, then the unwatched playlist will show you that episode before episode 4 of season 2.  That is because it cannot distinguish between the first unwatched episode of the show and the "next" unwatched episode after the one you last watched.  That is why you need an addon.  At least, that is the way I understand it.  Hope this helps.

Regards,

Bart 

I see, that's disappointing, but thanks for the response!
@sualfred - I'm currently using colorbox for blur but I'm wondering if the implementation in embuary helper offers any advantages/disadvantages or if it is the same implementation?
@jurialmunkey 

It's just easier to implement and I only offer blur + defining the blur radius. 
Depends on how you have integrated it.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26