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?
Arctic Fuse - Alpha now available. Support me on Ko-fi.
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

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

A second method i would think about is
xml:
String.EndsWith(Listitem.folderpath,/) | [!String.IsEmpty(Listitem.FileExtension) + String.EndsWith(Listitem.folderpath, .Listitem.FileExtension)]
Skins |  Titan M O D   •   S W A N (WIP)
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

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

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

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Checking if MyVideoNav is in Files mode?0