Kodi Community Forum

Full Version: script.skinshortcuts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2016-05-12, 22:57)marcelveldt Wrote: [ -> ]It's safe. repo update is in seperate branch

That makes things much easier Smile (You won't be surprised to hear I have an update or two about ready to go, so I'll get them PR'd in the near future!)
(2016-05-12, 22:43)BobCratchett Wrote: [ -> ]Thanks for the translation, bsoriano - I'll PR it to the master branch once the Eurovision semifinal is over. (Though I'm not 100% sure what our policy is whilst waiting for the repo update now it's all done via git - certainly we don't want to be adding features in case there are fixes required by the repo-guardians and the PR has to be rebased, though I don't think translations will make a difference...)

@Guilouz yes please for the French translation Smile

Edit:- @bsoriano, I know we went over this back in the MadNox days, but because memory starts to fail at my age, just to confirm this is the Spanish translation, not the Spanish (Argentina) or Spanish (Mexico) translations...?

Edit2:- There's a few translations which have an empty "" or two - for example:-

Code:
msgctxt "#32065"
msgid ""
"There are no available items to choose from for the category that you choose."
msgstr ""
"No hay ítems disponibles para seleccionar de la categoría que usted eligió."

and a couple which are split into multiple lines:-

Code:
msgctxt "#32094"
msgid "Install Kodi Log Uploader add-on to easily provide a debug log."
msgstr ""
"Instalar el complemento Kodi Log Uploader para proveer fácilmente una "
"bitácora de debug."

Are you able to confirm that they work correctly like that...?

Hmm, I will check, perhaps the software I use caused that (POEdit).

EDIT: It seems that POEdit was responsible for those. I fixed them, as well as some other little translation mishaps. Here is the updated file: https://www.dropbox.com/s/15u7to3visd04o...s.zip?dl=0

Thanks Bob for being thorough!

Regards,

Bart
And thanks to you for the translations, now on master.
French translations now on Git. Thanks.
Thanks for icons changes. It works perfectly.

Perhaps is it possible to change this :

Code:
listitems.append( self._create(["ActivateWindow(TVGuide)", "32022", "32034", {"icon": "DefaultTVShows.png"} ]) )
listitems.append( self._create(["ActivateWindow(RadioGuide)", "32087", "32034", {"icon": "DefaultTVShows.png"} ]) )

By :

Code:
listitems.append( self._create(["ActivateWindow(TVGuide)", "32022", "32034", {"icon": "DefaultTVGuide.png"} ]) )
listitems.append( self._create(["ActivateWindow(RadioGuide)", "32087", "32034", {"icon": "DefaultRadioGuide.png"} ]) )

To not have same icon for TVShows, TVGuide and RadioGuide.


And overriding DefaultFolder.png not working when selection is a folder (working when it's item).

Code:
<icon image="DefaultFolder.png">DefaultFolderSquare.png</icon>


And not working with content of :

Code:
||BROWSE||script.skin.helper.service/?action=widgets&amp;path=skinplaylists,librarydataprovider,scriptwidgets,extendedinfo,smartshortcuts,pvr,smartishwidgets
Hi Bob, is it possible to use the allmenus option for a vertical menu when also building additional submenus? I've been having trouble getting it to work correctly in Mimic.

Here's the build line I'm using...

Code:
RunScript(script.skinshortcuts,type=buildxml&amp;mode=single&amp;mainmenuID=9000&amp;group=mainmenu|quicknav)

If I try to use a single list for my vertical menu (as shown below), I get the "quicknav" submenu items attached to the last item in my main menu. Is there a way to get the allmenus option to ignore the quicknav submenu? The quicknav menu is used elsewhere in the skin and has no relation to the main menu.

Code:
<content>
    <include>skinshortcuts-allmenus</include>
</content>

Thanks for any guidance, appreciate it!
(2016-05-20, 02:56)Guilouz Wrote: [ -> ]Thanks for icons changes. It works perfectly.

Perhaps is it possible to change this :

Code:
listitems.append( self._create(["ActivateWindow(TVGuide)", "32022", "32034", {"icon": "DefaultTVShows.png"} ]) )
listitems.append( self._create(["ActivateWindow(RadioGuide)", "32087", "32034", {"icon": "DefaultTVShows.png"} ]) )

By :

Code:
listitems.append( self._create(["ActivateWindow(TVGuide)", "32022", "32034", {"icon": "DefaultTVGuide.png"} ]) )
listitems.append( self._create(["ActivateWindow(RadioGuide)", "32087", "32034", {"icon": "DefaultRadioGuide.png"} ]) )

To not have same icon for TVShows, TVGuide and RadioGuide.

Your suggested replacements aren't default icons (wiki), so will need to give some thought about how to achieve this. (Preferably a way where they still use default icons, but can be overridden individually)

(2016-05-20, 02:56)Guilouz Wrote: [ -> ]And overriding DefaultFolder.png not working when selection is a folder (working when it's item).

Code:
<icon image="DefaultFolder.png">DefaultFolderSquare.png</icon>


And not working with content of :

Code:
||BROWSE||script.skin.helper.service/?action=widgets&amp;path=skinplaylists,librarydataprovider,scriptwidgets,extendedinfo,smartshortcuts,pvr,smartishwidgets

Will debug the folder icon when I get chance (hopefully before the weekend). In the meantime, it's worth checking that the Skin Helper script uses DefaultFolder.png as the icon, and doesn't do anything with the thumbnail.

(2016-05-23, 23:01)braz Wrote: [ -> ]Hi Bob, is it possible to use the allmenus option for a vertical menu when also building additional submenus? I've been having trouble getting it to work correctly in Mimic.

Here's the build line I'm using...

Code:
RunScript(script.skinshortcuts,type=buildxml&amp;mode=single&amp;mainmenuID=9000&amp;group=mainmenu|quicknav)

If I try to use a single list for my vertical menu (as shown below), I get the "quicknav" submenu items attached to the last item in my main menu. Is there a way to get the allmenus option to ignore the quicknav submenu? The quicknav menu is used elsewhere in the skin and has no relation to the main menu.

Code:
<content>
    <include>skinshortcuts-allmenus</include>
</content>

Thanks for any guidance, appreciate it!

I can't think of a reason why additional menu's should be included in the allmenus include, so that sounds like a bug. I'll fix it when I get a moment, hopefully before the weekend.
@Guilouz - Regarding folder icons, I can confirm the issue. It appears that (what the script refers to as) the node listings aren't being passed through the icon override code. Should be an easy fix when I have the time to work out where exactly the fix fits into the code Wink

Regarding overriding the specific icons you were talking about, it can already by overriding based on the labelID. For the two you pointed out, the following should do it:

Code:
<icon labelID="32022">DefaultTVGuide.png</icon>
<icon labelID="32087">DefaultRadioGuide.png</icon>

I don't think those labelID's are used elsewhere in the available shortcuts, but if they are you can be specific about which <content /> elements they should be overriden in with the "grouping" attribute.
(2016-05-24, 17:40)BobCratchett Wrote: [ -> ]@Guilouz - Regarding folder icons, I can confirm the issue. It appears that (what the script refers to as) the node listings aren't being passed through the icon override code. Should be an easy fix when I have the time to work out where exactly the fix fits into the code Wink

Regarding overriding the specific icons you were talking about, it can already by overriding based on the labelID. For the two you pointed out, the following should do it:

Code:
<icon labelID="32022">DefaultTVGuide.png</icon>
<icon labelID="32087">DefaultRadioGuide.png</icon>

I don't think those labelID's are used elsewhere in the available shortcuts, but if they are you can be specific about which <content /> elements they should be overriden in with the "grouping" attribute.

Good news for folder icon Smile

I try this and it's not working :

Code:
<icon labelID="32022">DefaultTVGuide.png</icon>
<icon labelID="32087">DefaultRadioGuide.png</icon>

Always same icons for TV Shows, Live TV and Radio, see my overrides.xml :

Code:
<icon image="DefaultShortcut.png">special://skin/extras/icons/addtile.png</icon>
<icon image="DefaultFolder.png">DefaultFolderSquare.png</icon>
<icon image="DefaultVideo.png">DefaultAddonVideo.png</icon>
<icon image="DefaultMovies.png">DefaultMoviesSquare.png</icon>
<icon image="DefaultTVShows.png">DefaultTVShowsSquare.png</icon>
<icon image="DefaultMusicVideos.png">DefaultMusicVideosSquare.png</icon>
<icon image="DefaultPicture.png">DefaultAddonPicture.png</icon>
<icon image="DefaultDVDFull.png">DefaultDVDFullSquare.png</icon>
<icon image="DefaultInProgressShows.png">DefaultInProgressShowsSquare.png</icon>
<icon image="DefaultRecentlyAddedMovies.png">DefaultRecentlyAddedMoviesSquare.png</icon>
<icon image="DefaultRecentlyAddedEpisodes.png">DefaultRecentlyAddedEpisodesSquare.png</icon>
<icon image="DefaultVideoPlaylists.png">DefaultMusicPlaylists.png</icon>
<icon image="DefaultPlaylist.png">DefaultMusicPlaylists.png</icon>
<icon labelID="32022">DefaultTVGuide.png</icon>
<icon labelID="32087">DefaultRadioGuide.png</icon>

Image
@Guilouz - Sorry, that's my bad - those two shortcuts, being 'common' shortcuts, have text-based labelID's rather than using their string ID (see here for common labelID's) - they should be 'livetv' and 'radio' respectively, rather than '32022' and '32087'.

As regards the folder icon issue, I believe I've got the fix but the only computer I have access to at present is locked down meaning no Git access so I can't push the changes. If you're willing to test, the end of 'buildNodeFunction' in 'library.py' - line 281 - needs changing to:-

Code:
# Override icons
tree = DATA._get_overrides_skin()
for item in returnList:
    item = self._get_icon_overrides( tree, item, None )

return returnList

(I've included the current last line - 'return returnList' - to indicate that the additions need to go before that, and the indent of the surrounding code (python indents with 4 spaces rather than a tab) needs to be maintained)

Otherwise I'm hoping to get a little time in front of a non-corporate machine on Thursday.


@braz - similarly, I've got a fix for the allmenus include, but not in a position to push it. The change needed for you is in xmlfunctions.py, line 574 needs changing from:-

Code:
if buildMode == "single":

to:-

Code:
if buildMode == "single" and not isinstance( item, basestring ):

(obviously respecting the indent of the line!)
(2016-05-24, 21:23)BobCratchett Wrote: [ -> ]@Guilouz - Sorry, that's my bad - those two shortcuts, being 'common' shortcuts, have text-based labelID's rather than using their string ID (see here for common labelID's) - they should be 'livetv' and 'radio' respectively, rather than '32022' and '32087'.

As regards the folder icon issue, I believe I've got the fix but the only computer I have access to at present is locked down meaning no Git access so I can't push the changes. If you're willing to test, the end of 'buildNodeFunction' in 'library.py' - line 281 - needs changing to:-

Code:
# Override icons
tree = DATA._get_overrides_skin()
for item in returnList:
    item = self._get_icon_overrides( tree, item, None )

return returnList

(I've included the current last line - 'return returnList' - to indicate that the additions need to go before that, and the indent of the surrounding code (python indents with 4 spaces rather than a tab) needs to be maintained)

Otherwise I'm hoping to get a little time in front of a non-corporate machine on Thursday.

Working when add code to 'library.py'.


I have tried this but not working :

Code:
<icon labelID="livetv">DefaultTVGuide.png</icon>
<icon labelID="radio">DefaultRadioGuide.png</icon>

And not working with content (widgets) of this :

Code:
||BROWSE||script.skin.helper.service/?action=widgets&amp;path=skinplaylists,librarydataprovider,scriptwidgets,extendedinfo,smartshortcuts,pvr,smartishwidgets
(2016-05-24, 21:23)BobCratchett Wrote: [ -> ]@braz - similarly, I've got a fix for the allmenus include, but not in a position to push it. The change needed for you is in xmlfunctions.py, line 574 needs changing from:-

Code:
if buildMode == "single":

to:-

Code:
if buildMode == "single" and not isinstance( item, basestring ):

(obviously respecting the indent of the line!)
Thanks Bob, I downloaded the latest script.skinshortcuts from github and applied this change in xmlfunctions.py. The extra submenu no longer shows up when clicking the last item in the single menu. However, the last item's submenu doesn't show up either, looks like more code changes are necessary. Please let me know if debug logs will help, this is really easy to reproduce with Mimic 4.02 for Krypton.

No rush, thank for your support!
Just implemented the context menu, very cool! Makes more sense to have the up, down, delete options there IMO.
i added a overrides.xml in the userdata folder.
<?xml version="1.0" encoding="UTF-8"?>
<overrides>
<override action="RunPlugin(plugin://plugin.video.salts/?mode=search&section=Movies)">
<action>ActivateWindow(10025,plugin://plugin.video.salts/?mode=browse&section=Movies,return)</action>
<action>RunPlugin(plugin://plugin.video.salts/?mode=search&section=Movies)</action>
</override>
<overrides>
<override action="RunPlugin(plugin://plugin.video.salts/?mode=search&section=TV)">
<action>ActivateWindow(10025,plugin://plugin.video.salts/?mode=browse&section=TV,return)</action>
<action>RunPlugin(plugin://plugin.video.salts/?mode=search&section=TV)</action>
</override>
</overrides>

in my shortcut i have
<shortcuts>
<shortcut>
<defaultID>search</defaultID>
<label>movies</label>
<label2>Custom item</label2>
<icon>special://skin/extras/icons/files.png</icon>
<thumb>special://skin/extras/icons/search.png</thumb>
<action>RunPlugin(plugin://plugin.video.salts/?mode=search&amp;section=Movies)</action>
</shortcut>
<shortcut>
<defaultID>search</defaultID>
<label>TV</label>
<label2>Custom item</label2>
<icon>special://skin/extras/icons/files.png</icon>
<thumb>special://skin/extras/icons/search.png</thumb>
<action>RunPlugin(plugin://plugin.video.salts/?mode=search&amp;section=TV)</action>

yet only the the action in shortcut works,
can anyone help me?