• 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 140
Release script.skinshortcuts
(2014-10-22, 07:48)marcelveldt Wrote: One more small question of some behaviour I just spotted while investigating a users problem...
If you change the label of a shortcut the thumb/icon gets reset. Is that a problem or by design ?
Also I noticed that the labelID property gets set by the new name, while the icon assignments (overrides) check the labelID and not the defaultID (which stays the same).

So for example if you have a Movies tile with a movies thumb assigned to it and you change it name to Films, you loose the thumb.

It's both a problem and by design - it's a limitation of the labelID system thats used and icon overrides. When the labelID changes (which it does when you change the label) the icon override no longer applies, so the icon is lost.

What I find works a lot more consistently is overriding the icon based on the image, not the labelID - so something like (the completely untested) ...

Code:
<shortcut label="$INFO[Window(Home).Property(titanmb3.0.title)]" grouping="32029" type="1037" icon="mediabrowser1.png" condition="!IsEmpty(Window(Home).Property(titanmb3.0.path))">$INFO[Window(Home).Property(titanmb3.0.path)]</shortcut>

... for your available shortcut (note, the icon has to exist though it can be holding image), and for the icon override ...

Code:
<icon image="mediabrowser1.png">$VAR[Custom0Thumb]</icon>

... should give closer to the expected behaviour. (That's assuming that you can't set the icon straight to the $VAR...?)

It's one of those things that will get improved dramatically if I ever come up with something better than the labelID/defaultID system.
Reply
Tried your suggestion and it doesn't work, if you change the label the icon gets reset to DefaultShortCut.png...
No worries, I'll just hide the "change label" button for now and present it only at submenu level (as that doesn't use icons).

Oh, about setting the icon straight to the $VAR[]... Yes that's how I'd prefer it but than there's no image shown in the selectdialog.
The image works fine in the mainmenu however.
So for now I just use that placeholder image mediabrowser.png and later set the correct $VAR based on the labelID.
Offcourse if the correct image is shown right away that would be even better. The variable also contains the fallback-image if the window-properties are not (yet) filled. Maybe this is the same issue as with the labels ?

Thanks again for your time

EDIT: setting the $VAR as icon right away without the overrides is not working at all... I thought this was working but the icon overrides where still there :-)
Reply
Strange, the label should have no effect on the icon with this method (unless another override is acting on the item), and the icon should only get reset to DefaultShortcut.png if Kodi reports the image doesn't exist Huh

It's fundamentally the same issue but, due to differences in how labels and icons are handled, it would require a fair few changes to fix. I'll add it to the to-do list.
Reply
(2014-10-22, 11:51)Unfledged Wrote: Strange, the label should have no effect on the icon with this method (unless another override is acting on the item), and the icon should only get reset to DefaultShortcut.png if Kodi reports the image doesn't exist Huh

It's fundamentally the same issue but, due to differences in how labels and icons are handled, it would require a fair few changes to fix. I'll add it to the to-do list.

Don't hurry as it is working now with the workaround.
Maybe you could only take a look at the listitem.icon for the dialogselect? That is also retrieves the window property ?
If that's a lot of work than never mind, users will see the fallback image in the select dialog.
Reply
Don't worry, I won't be hurrying Wink (update to the script on the repo has been submitted, and I always only do critical fixes for a fair few days after submitting an updateSmile)

When I do fix it, though, I'll do my best to fix $INFO's/$VAR's wherever they could be used
Reply
(2014-10-22, 11:57)Unfledged Wrote: Don't worry, I won't be hurrying Wink (update to the script on the repo has been submitted, and I always only do critical fixes for a fair few days after submitting an updateSmile)

When I do fix it, though, I'll do my best to fix $INFO's/$VAR's wherever they could be used

Great! Thanks!
Reply
Thanks to very quick work by Martijn, version 0.4.2 is now on the repo.
Reply
Hi. I just discovered there is a specific setting in guisettings.xml (i don't know if it works in advancedsettings but it's always in guisettings with value special://profile/playlists/):
Code:
<system>
        <playlistspath>special://profile/playlists/</playlistspath>
    </system>

that allows to move the playlist path. I needed something like this (i usually link folder but that's tricky because you have to manually do the link for every pc) so i started using it and it works.
But not with script.skinshortcuts. Can you add the support for a different playlist path? It should be possible to get it from settings with 'system.playlistspath' setting
Reply
Once I get back to properly coding on this, I'll certainly look into it. (It won't work if you're using this method to keep playlists on a networked path, though - which is a limitation of the python methods used to list the contents of the playlist directory Smile)
Reply
Are you talking about "Files.GetDirectory"? I tried and ou're right. Is it a bug or it's supposed to fail? Because kodi internally handles it well. Content loading is perfect if i manually set the playlist.
Anyway thanks as usual.
Reply
Actually for playlists I use Pythons os.walk(). I've had Files.GetDirectory in my mind as a potential future alternative (with the big negative of having to manually implement path walking), but if that doesn't work for network paths, I won't bother!
Reply
Erase what i said it works with Files.GetDirectory. But it works with source and kodi paths that kodi can recognize i think. For example i have smb://SERVER/Videos/Movies in a source. If i try smb://SERVER/ or smb://SERVER/Videos/ it wont work but smb://SERVER/Videos/Movies/ it does.
It also works with remote userdata folders like my playlist one:
smb://SERVER/Users/root/AppData/Roaming/XBMC/userdata/playlists/video/
I think that with Files.GetDirectory it would work well so maybe you should wait to add until it fully works...
Reply
Good investigative skills Smile I'll add it to my to-do list.
Reply
Thanks! I also found out another plus for Files.GetDirectory. I tried to use pathsubstitution to move my library folder and it worked but even here your actual method fail and it doesn't read my custom video nodes. I tried with File.GetDirectory and it works Wink
Reply
Nice Smile it'll be a few days before I can look at making these changes. Whilst you're looking into Files.GetDirectory(), I'd be happy to provide advice for modifying the script... Wink
Reply
  • 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 140

Logout Mark Read Team Forum Stats Members Help
script.skinshortcuts8