2015-02-15, 22:55
I'm developing a video addon and need to know the status of the "hide watched" setting. I use setResolvedUrl for media files and Kodi handles their watched status fine, but I also want to hide virtual folders if they contain no unwatched files. I have found
but it doesn't work on the current plugin directory, so for example it will get the hide watched state for "addons" when I'm providing the top-level directory of my addon, rather than "tvshows". I don't see another way to fetch this and have locally implemented
but wanted to check for other ways to get this value before sending a pull request.
A related issue is that when the hide watched flag is changed, it doesn't refresh the contents of the plugin directory. I have a local change for that, too, that does a refresh if the flag is changed when viewing a plugin directory, but wanted to again verify first I wasn't missing some other notification or way to set my plugin to be refreshed when this changes.
Code:
xbmc.getCondVisibility('System.Setting(hidewatched)')
but it doesn't work on the current plugin directory, so for example it will get the hide watched state for "addons" when I'm providing the top-level directory of my addon, rather than "tvshows". I don't see another way to fetch this and have locally implemented
Code:
xbmcplugin.getHideWatched(handle [,content])
but wanted to check for other ways to get this value before sending a pull request.
A related issue is that when the hide watched flag is changed, it doesn't refresh the contents of the plugin directory. I have a local change for that, too, that does a refresh if the flag is changed when viewing a plugin directory, but wanted to again verify first I wasn't missing some other notification or way to set my plugin to be refreshed when this changes.