Checking if MyVideoNav is in Files mode?
#1
Hi,

Does anyone know of a way to check if MyVideoNav/MyMusicNav is in files mode?

Kodi doesn't set Container.Content(files) if the source has a content type set (even though it is being browsed through files mode) - instead, it sets Container.Content to whatever the source content type is.

Currently I'm using:
Code:
!String.StartsWith(Container.FolderPath,videodb://) + !String.StartsWith(Container.FolderPath,musicdb://) + !String.StartsWith(Container.FolderPath,plugin://)

That feels really clunky though. I feel like there should be a single Boolean to check if in files mode (really I think content type should be set to files when in files mode regardless of whether a content type was set for the source but that is a different discussion to be had).

Does anyone have any suggestions of a better method?
Reply
#2
I would second this.

Another Method can be set custom property on 'top' level ,or if using script.skinshortcuts, by abuse container.folderpath
which comes with the assumption that you navigate on top level before entering a specific source

-
<onfocus condition="string.contains(container.folderpath,sources)">SetProperty(CurrentSource,$INFO[container.folderpath],home)</onfocus>

A second method i would think about is
String.EndsWith(Listitem.folderpath,/) | [!String.IsEmpty(Listitem.FileExtension) + String.EndsWith(Listitem.folderpath, .Listitem.FileExtension)]
Skins                                                                                        
Reply
#3
(2020-03-24, 09:06)mardukL Wrote: I would second this.

Another Method can be set custom property on 'top' level ,or if using script.skinshortcuts, by abuse container.folderpath
which comes with the assumption that you navigate on top level before entering a specific source

-
<onfocus condition="string.contains(container.folderpath,sources)">SetProperty(CurrentSource,$INFO[container.folderpath],home)</onfocus>

A second method i would think about is
String.EndsWith(Listitem.folderpath,/) | [!String.IsEmpty(Listitem.FileExtension) + String.EndsWith(Listitem.folderpath, .Listitem.FileExtension)]
"metoo"

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Checking if MyVideoNav is in Files mode?00
This forum uses Lukasz Tkacz MyBB addons.