Kodi Community Forum
Release skin helper service - 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 skin helper service (/showthread.php?tid=235676)



RE: skin helper service - murnaz - 2023-06-06

thanks it works


RE: skin helper service - Fuchs2468 - 2023-07-20

Hello @Angelinas.

I have problems with some functions of SHS.

- PVRThumbs in the OSD do not always load, I only get my channel logo.
(estimated probability of loading available PVRThumbs in OSD is 30%)

- SkinHelper.ShowInfoAtPlaybackStart almost never works on PVR.

I have a workaround for this problem. But I don't know if it's enough.
Could you please check my solution?

I increased "xbmc.sleep(100)" to "xbmc.sleep(500)" at "def show_info_panel(self)" and "def wait_for_player".

With this change I was able to increase the estimated probability that the display works to about 80-90%.


RE: skin helper service - hackmonker02 - 2023-09-09

@Angelinas. A bit confused regarding the addon. I saw the example of having upnext episodes but anyway we can merge both upnext and in progress episodes? Like after finishing the inprogress get replaced by the next episode. Hope you can tell me if its possible.


RE: skin helper service - Fuchs2468 - 2023-10-31

Hello @Angelinas.

I have a good news (SkinHelper.DisableScreenSaverOnFullScreenMusic) is working again.

Here is my change in script.skin.helper.service "listitem_monitor.py".

old:
python:
    def check_screensaver(self):
        '''Allow user to disable screensaver on fullscreen music playback'''
        if getCondVisibility(
                "Window.IsActive(visualisation) + Skin.HasSetting(SkinHelper.DisableScreenSaverOnFullScreenMusic)"):
            if not self.screensaver_disabled:
                # disable screensaver when fullscreen music active
                self.screensaver_disabled = True
                screensaver_setting = kodi_json('Settings.GetSettingValue', '{"setting":"screensaver.mode"}')
                if screensaver_setting:
                    self.screensaver_setting = screensaver_setting
                    kodi_json('Settings.SetSettingValue', {"setting": "screensaver.mode", "value": None})
                    log_msg(
                        "Disabled screensaver while fullscreen music playback - previous setting: %s" %
                        self.screensaver_setting, xbmc.LOGINFO)
        elif self.screensaver_disabled and self.screensaver_setting:
            # enable screensaver again after fullscreen music playback was ended
            kodi_json('Settings.SetSettingValue', {"setting": "screensaver.mode", "value": self.screensaver_setting})
            self.screensaver_disabled = False
            self.screensaver_setting = None
            log_msg(
                "fullscreen music playback ended - restoring screensaver: %s" %
                self.screensaver_setting, xbmc.LOGINFO)

new:
python:
    def check_screensaver(self):
        '''Allow user to disable screensaver on fullscreen music playback'''
        if getCondVisibility(
                "Window.IsActive(visualisation) + Skin.HasSetting(SkinHelper.DisableScreenSaverOnFullScreenMusic)"):
            xbmc.executebuiltin('InhibitScreensaver(true)')
        elif getCondVisibility(
                "!Window.IsActive(visualisation) | !Skin.HasSetting(SkinHelper.DisableScreenSaverOnFullScreenMusic)"):
            xbmc.executebuiltin('InhibitScreensaver(false)')

here is my "listitem_monitor.py" for testing:
https://paste.kodi.tv/izitikeliw.kodi


RE: skin helper service - latts9923 - 2024-02-16

In Nexus, I am not seeing the country label for some Movies with multiple countries using $INFO[Window(Home).Property(SkinHelper.ListItem.Country)]. I also tried $INFO[Window(Home).Property(SkinHelper.ListItem.Country.0)], but still no joy. For the Movies that are displaying a label, it is a two letter country...such as "us" for United States of America. With Matrix using v1.1.43 I see "United States of America" for the label, but not with v1.20.1 for Nexus.


RE: skin helper service - Fuchs2468 - 2024-02-17

(2024-02-16, 19:46)latts9923 Wrote: In Nexus, I am not seeing the country label for some Movies with multiple countries using $INFO[Window(Home).Property(SkinHelper.ListItem.Country)]. I also tried $INFO[Window(Home).Property(SkinHelper.ListItem.Country.0)], but still no joy. For the Movies that are displaying a label, it is a two letter country...such as "us" for United States of America. With Matrix using v1.1.43 I see "United States of America" for the label, but not with v1.20.1 for Nexus.

I recommend using "$INFO[Window(Home).Property(SkinHelper.ListItem.Country)]" only for movie sets, it works well.
Otherwise you should only use "$INFO[Window(Home).Property(SkinHelper.ListItem.Country)]" as a fallback.

Here is an example of movie sets:

Image


RE: skin helper service - latts9923 - 2024-02-18

@Fuchs2468
Thanks...yeah, I use "$INFO[Window(Home).Property(SkinHelper.ListItem.Country)]" for Sets, but I also use it to display a country flag instead of text in the Video Info screen by using...
xml:
<onload condition="System.HasAddon(script.skin.helper.service)">RunScript(script.skin.helper.service,action=stripstring,splitchar= /,string=$INFO[Window(Home).Property(SkinHelper.ListItem.Country)],output=country.flag,index=0)</onload>



RE: skin helper service - Dumyat - 2024-02-18

Does anybody know if a particular date format can be changed?
When I call the premiere date for PVR items, I'm getting yyyy/mm/dd returned, but I would like to see the regular format used for my region of dd/mm/yyyy.
Any ideas if this is possible?


RE: skin helper service - Fuchs2468 - 2024-02-18

(2024-02-18, 18:51)Dumyat Wrote: Does anybody know if a particular date format can be changed?
When I call the premiere date for PVR items, I'm getting yyyy/mm/dd returned, but I would like to see the regular format used for my region of dd/mm/yyyy.
Any ideas if this is possible?

You could use "$INFO[Window(Home).Property(SkinHelper.ListItem.premiered.formatted)]" then you will get this format "18 Feb 2024".


RE: skin helper service - Dumyat - 2024-02-18

(2024-02-18, 20:43)Fuchs2468 Wrote:
(2024-02-18, 18:51)Dumyat Wrote: Does anybody know if a particular date format can be changed?
When I call the premiere date for PVR items, I'm getting yyyy/mm/dd returned, but I would like to see the regular format used for my region of dd/mm/yyyy.
Any ideas if this is possible?
You could use "$INFO[Window(Home).Property(SkinHelper.ListItem.premiered.formatted)]" then you will get this format "18 Feb 2024".
Ah, I wasn't aware of that feature.
I actually just tried the above, but no luck. I'm still on Matrix at the moment. Would that make a difference do you think?


RE: skin helper service - Fuchs2468 - 2024-02-18

(2024-02-18, 22:55)Dumyat Wrote: Ah, I wasn't aware of that feature.
I actually just tried the above, but no luck. I'm still on Matrix at the moment. Would that make a difference do you think?

I don't know if it works with matrix.
But it works on Nexus.

Image


RE: skin helper service - Dumyat - 2024-02-18

Ok, no worries.
I just saw on the SHS wiki page the same code is mentioned there as well. That would suggest it's always been available, even for Matrix and earlier Confused Not going to worry about it anymore for now, but it does give me a good reason to update to Nexus and beyond I guess.... Wink
Cheers


RE: skin helper service - Fuchs2468 - 2024-02-19

(2024-02-18, 15:02)latts9923 Wrote: @Fuchs2468
Thanks...yeah, I use "$INFO[Window(Home).Property(SkinHelper.ListItem.Country)]" for Sets, but I also use it to display a country flag instead of text in the Video Info screen by using...
xml:
<onload condition="System.HasAddon(script.skin.helper.service)">RunScript(script.skin.helper.service,action=stripstring,splitchar= /,string=$INFO[Window(Home).Property(SkinHelper.ListItem.Country)],output=country.flag,index=0)</onload>

I took a quick look at your code.
I noticed this variable.
I think the variable is wrong.

xml:
<variable name="value_countryflag">
    <value condition="!String.IsEmpty(ListItem.Country)">$VAR[countries_path]$INFO[ListItem.Country,,.png]</value>
    <value condition="String.IsEmpty(ListItem.Country) + !String.IsEmpty(Window(Home).Property(country.flag))">$INFO[Window(Home).Property(country.flag),resource://resource.images.moviecountryicons.flags/,.png]</value>
</variable>

Since you have the info “ListItem.Country”,
this will always set "$INFO[Window(Home).Property(country.flag),resource://resource.images.moviecountryicons.flags/,.png]" to false.
You shouldn't use "String.IsEmpty(ListItem.Country)".


RE: skin helper service - latts9923 - 2024-02-19

@Fuchs2468
Hmm...I use this same variable in Matrix and it works just fine for Movies that are missing the Country value in the database. There has to be something funky with the Nexus version of Skin Helper or Metadatautils. Like you said, the Sets work fine in Nexus...I see the country text and flag. But I get nothing for Movies.


RE: skin helper service - Fuchs2468 - 2024-02-23

(2024-02-19, 04:07)latts9923 Wrote: @Fuchs2468
Hmm...I use this same variable in Matrix and it works just fine for Movies that are missing the Country value in the database. There has to be something funky with the Nexus version of Skin Helper or Metadatautils. Like you said, the Sets work fine in Nexus...I see the country text and flag. But I get nothing for Movies.

I tested the “action=stripstring” function on Titan-Mod.

xml:
RunScript(script.skin.helper.service,action=stripstring,splitchar= / ,string=$INFO[Window(Home).Property(SkinHelper.ListItem.Country)],output=country.flag,index=0)

I can tell you that it works with Nexus.
The limitation is that it only works with "index=0".
The reason is that we need ",splitchar= / ," but we only get ",splitchar= /,".
There is always a missing space, which is why only "index=0" is available for this query.

Another thing I noticed was that Kodi couldn't process the path you used.

xml:
$INFO[Window(Home).Property(country.flag),resource://<my_languageflags>/,.png]

I then switched to this path and it works.

xml:
resource://<my_languageflags>/$INFO[Window(Home).Property(country.flag)].png

I think the better solution at the moment is "script.embuary.helper".

xml:
RunScript(script.embuary.helper,action=split,value='$ESCINFO[ListItem.Country]',separator='" / "',prop=Mysplit)

look here and screenshots:
https://github.com/sualfred/script.embuary.helper/wiki/Script:-Actions-and-helpers#split-value

Image

Image