Custom home items no longer working
#31
We see the same listing there as you, but after choosing for example Single Image or Multi-Image, usually the normal Windows file dialog would come up. Instead, in Metropolis, we get a listing of only those file locations that have been defined in the Kodi File Manager before coming into the Menu Setup area.

Still works with 15.1 on other skins such as Aeon Nox and Mimic, so I imagine it's just a small setting somewhere in your code.
Reply
#32
Hmm, I'll look at what they do then.
Reply
#33
I only really spot one difference, and I'm not quite sure why it'd work on my Macs and Linux boxes and not Windows.. but if you feel up for it, would you mind removing a line from shortcuts/overrides.xml and tell me if it fixes the problem, pagali?

It's line 154, which reads:

Code:
<backgroundBrowseDefault>special://skin/media/home_art</backgroundBrowseDefault>
Reply
#34
Midnight here... bedtime. But I'll try it in the morning.
Reply
#35
(2015-10-06, 06:33)jingai Wrote: I only really spot one difference, and I'm not quite sure why it'd work on my Macs and Linux boxes and not Windows.. but if you feel up for it, would you mind removing a line from shortcuts/overrides.xml and tell me if it fixes the problem, pagali?

It's line 154, which reads:

Code:
<backgroundBrowseDefault>special://skin/media/home_art</backgroundBrowseDefault>

I tried removing it on my Windows install for them Jingai, and also changing it to match the syntax of the example in the script's documentation. No dice.
It only displays sources you have defined in sources.xml. I define everything I need in sources.xml under "Files" and so they are displayed as a path when selecting backgrounds (as well as other scripts and addons).
I think this is by design, the script is doing it on purpose.

Image


Mine looks a little crazy because I use the same one for multiple file systems (Kodi just ignores the ones that don't apply to the current OS).
Code:
<files>
        <default pathversion="1"></default>
        <source>
            <name>Backup Server</name>
            <path pathversion="1">smb://xxx.xxx.xxx.xxx/media/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Kodi Addons</name>
            <path pathversion="1">/storage/.kodi/addons</path>
            <allowsharing>false</allowsharing>
        </source>
        <source>
            <name>Kodi Emulators</name>
            <path pathversion="1">/storage/.kodi/addons/emulator.retroarch/bin/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Kodi Folder</name>
            <path pathversion="1">/storage/.kodi/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>MediaNAS </name>
            <path pathversion="1">smb://xxx.xxx.xxx.xxx/NAS/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>MediaNAS Downloads</name>
            <path pathversion="1">smb://xxx.xxx.xxx.xxx/Downloads/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>MediaNAS Media</name>
            <path pathversion="1">smb://xxx.xxx.xxx.xxx/Media/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>MediaNAS shared</name>
            <path pathversion="1">smb://xxx.xxx.xxx.xxx/shared/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>MediaNAS Temp</name>
            <path pathversion="1">smb://XBMC-NAS/Temp/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>OpenElec Downloads</name>
            <path pathversion="1">/storage/downloads</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>OpenElec Root</name>
            <path pathversion="1">/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>OpenElec Storage</name>
            <path pathversion="1">/storage</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Windows c:</name>
            <path pathversion="1">c:\</path>
            <allowsharing>false</allowsharing>
        </source>
        <source>
            <name>Windows d:</name>
            <path pathversion="1">d:\</path>
            <allowsharing>false</allowsharing>
        </source>
        <source>
            <name>Windows Network</name>
            <path pathversion="1">smb://</path>
            <allowsharing>false</allowsharing>
        </source>
    </files>

Everyone should add a "root" source to their "Files" source in sources.xml. My example shows both Linux "/" and Windows "C:"\.
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#36
(2015-10-06, 10:34)MacGyver Wrote:
(2015-10-06, 06:33)jingai Wrote: I only really spot one difference, and I'm not quite sure why it'd work on my Macs and Linux boxes and not Windows.. but if you feel up for it, would you mind removing a line from shortcuts/overrides.xml and tell me if it fixes the problem, pagali?

It's line 154, which reads:

Code:
<backgroundBrowseDefault>special://skin/media/home_art</backgroundBrowseDefault>

I tried removing it on my Windows install for them Jingai, and also changing it to match the syntax of the example in the script's documentation. No dice.
It only displays sources you have defined in sources.xml. I define everything I need in sources.xml under "Files" and so they are displayed as a path when selecting backgrounds (as well as other scripts and addons).
I think this is by design, the script is doing it on purpose.

special://skin/media/home_art won't work as the default, as (on repo versions of the skin, and from what I understand of the way Kodi handles it) that folder won't exist - it will inside the Textures.xbt file.

Unfortunately this isn't something the script is doing, rather it's how Kodi works. The script is just calling the Kodi's image browse Python API - specifically xbmcgui.Dialog().browse(). If no custom sources have been added to the File Manager, Kodi populates the image browse dialog with a nice selection of default sources. If anything has been added, only those sources are shown and any other source you'd like to choose an image from needs to be added as well.
Reply
#37
That's what I meant by "by design", I see no problem with it.
It would be convenient if the script could figure out what is outside of sources separate from each Kodi flavor but that would probably be a nightmare to code and unnecessary given that one only needs to add it to sources to be available. Smile
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#38
(2015-10-06, 10:58)BobCratchett Wrote: special://skin/media/home_art won't work as the default, as (on repo versions of the skin, and from what I understand of the way Kodi handles it) that folder won't exist - it will inside the Textures.xbt file.

Aye, I had intended to remove that before pushing it all up (was a relic from when I was still getting my bearings with the script), but had forgotten. Hence the suggestion to remove it, thinking maybe it was breaking something on Windows.

(2015-10-06, 10:58)BobCratchett Wrote: Unfortunately this isn't something the script is doing, rather it's how Kodi works. The script is just calling the Kodi's image browse Python API - specifically xbmcgui.Dialog().browse(). If no custom sources have been added to the File Manager, Kodi populates the image browse dialog with a nice selection of default sources. If anything has been added, only those sources are shown and any other source you'd like to choose an image from needs to be added as well.

I figured it was a Kodi thing, but it's odd that it behaves differently on Mac and Linux. I can choose paths that are not in my sources.xml no problem on either platform.

My files section in sources.xml is exactly this:

Code:
<files>
        <default pathversion="1"></default>
</files>
Reply
#39
Another thing though.. why would it work for pagali in Mimic and Aeon Nox if Kodi itself is the issue...?
Reply
#40
(2015-10-06, 14:40)jingai Wrote: My files section in sources.xml is exactly this:

Code:
<files>
        <default pathversion="1"></default>
</files>

In which case Kodi will provide a nice range of sources for you to select from (on most platforms it includes your home folder + every drive). The issue is only when there are sources defined. (And I'm not 100% sure this is referring to the same thing - do sources added via the File Manager get added to the 'files' section of sources.xml...? I've only ever investigated the problem via Kodi's File Manager.)

(2015-10-06, 15:04)jingai Wrote: Another thing though.. why would it work for pagali in Mimic and Aeon Nox if Kodi itself is the issue...?

That depends on the versions of Mimic and Aeon Nox pagali is using. There's no repo version of either skin which uses Skin Shortcuts to manage the main menu + therefore the background. There's an in-development version of Mimic on Git that does, and there's an in-development version of Silvo's mod of Nox 5 that similarly does, but if these versions aren't being used, the method to manage the background will be quite different.
Reply
#41
(2015-10-06, 15:33)BobCratchett Wrote: The issue is only when there are sources defined. (And I'm not 100% sure this is referring to the same thing - do sources added via the File Manager get added to the 'files' section of sources.xml...? I've only ever investigated the problem via Kodi's File Manager.)

And this is indeed the problem. Once I added one source, I now see the same 'issue' on my machines.

So, for those that are having this problem.. I'm not sure if this was a design decision or an omission in Kodi, but the 'problem' lies there.

(2015-10-06, 15:33)BobCratchett Wrote:
(2015-10-06, 15:04)jingai Wrote: Another thing though.. why would it work for pagali in Mimic and Aeon Nox if Kodi itself is the issue...?

That depends on the versions of Mimic and Aeon Nox pagali is using. There's no repo version of either skin which uses Skin Shortcuts to manage the main menu + therefore the background. There's an in-development version of Mimic on Git that does, and there's an in-development version of Silvo's mod of Nox 5 that similarly does, but if these versions aren't being used, the method to manage the background will be quite different.

That's the most likely answer then. I don't follow either skin, so I didn't know, but that makes the most sense.
Reply
#42
(2015-10-06, 06:33)jingai Wrote: I only really spot one difference, and I'm not quite sure why it'd work on my Macs and Linux boxes and not Windows.. but if you feel up for it, would you mind removing a line from shortcuts/overrides.xml and tell me if it fixes the problem, pagali?

It's line 154, which reads:

Code:
<backgroundBrowseDefault>special://skin/media/home_art</backgroundBrowseDefault>

Closed Kodi, commented out that line and restarted Kodi. No change, the items listed in File Manager are still the only folders that can be navigated to and opened. That "home_art" folder is not available, by the way.

The other skins I referred to above are Aeon Nox 5 (Silvo mod) 574-2.0.7 and Mimic 2.3.0, both as I've mentioned on Windows 7 Pro and Kodi 15.1. I just tested them both again, and setting the background image for a menu item brings up the normal Windows dialog that allows you to navigate to any folder available to the PC. So maybe the problem isn't with Kodi itself, but with the Skin Shortcuts script?

EDIT: Please note that this is in no way a complaint! If Skin Shortcuts makes it possible for me to use your lovely skin, I'm a happy camper! As noted, I found the workaround to make it work for me. I'm just concerned that users who don't see this thread will be lost and give up on it.
Reply
#43
Just had a look at Mimic 2.3.0.. he's not using script-skinshortcuts.xml at all for managing the script. He has several custom-11*.xml dialogs that do the job. Hence the difference..

@BobCratchett, I'd prefer to stick with the dialog the script supplies for this, but is there no way in Python to present the user with a dialog that, I guess, just ignores the stuff they have defined in files section of sources.xml?
Reply
#44
Not in a good way. As MacGyver suggested, its technically possible to code the entire background select dialog manually rather than relying on Kodi's api, but by the time you get into having a list of defaults for all platforms (including detecting the users home folder + attached drives), parsing the sources.xml and adding them too, all the Files.GetDirectory parsing, the fact we have to manually access the select dialog (can't use the Python api if we want to show images in it) and the fun that is always a recursive function as this would have to be, to me it's too much trouble. (One of those things I might look at one day, but no time soon)

An alternative could be to use the built-in function Skin.SetImage to set the background to a skin string (presumably how, ultimately, Mimic + Nox 5 do their background browsing). Combine that with some clever Python code that keeps track of when the select dialog closes (so we know it's finished), then retrieving the skin string (if set) should technically work, but it's very very messy and no guarantee it would work well.

The only other alternative I can think of is for someone to ask Team Kodi if they'll consider changing the behaviour of the python api'd browse dialog...

So, sorry, it's not something that can be easily or quickly worked around script-side.
Reply
#45
(2015-10-06, 20:25)BobCratchett Wrote: An alternative could be to use the built-in function Skin.SetImage to set the background to a skin string (presumably how, ultimately, Mimic + Nox 5 do their background browsing).

Yeah, this is how they do it. I was mostly wondering if the script had access to the same dialog, and you answered that.

(2015-10-06, 20:25)BobCratchett Wrote: The only other alternative I can think of is for someone to ask Team Kodi if they'll consider changing the behaviour of the python api'd browse dialog...

This 'seems' like the best answer to me, but now that I'm thinking about it.. I believe I ran into the same problem with my iPhoto addon and asked the team about it many years back. I forget what the answer was, but they had some reason for not providing the same dialog via the Python API..

ahh I found my original ticket on it, but unfortunately I was only asking for network shares be added to the dialog, which they did in fact do.

Created a new ticket to see what can be done about this.
Reply

Logout Mark Read Team Forum Stats Members Help
Custom home items no longer working0