OSMC Skin weird behaviour

This is for @Chillbo I think… (but also @sam_nazarko maybe)

whenever I do xbmcplugin.setContent(int(sys.argv[1]), ‘episodes’) in an addon, the skin goes to black, but only on my Vero4k+, not on my win7 installation of kodi. This thing does not happen with other skins.

The problem is that even activating the debug log doesn’t show anything wrong. The log is identical between win7 and vero4k but the result is different.

This happens to me in every addon that tries to set the content to ‘episodes’, if I set it to generic ‘videos’ it doesn’t happen, but obviously it doesn’t look as good without plot, season/episode infos etc.

A couple addons that display this beaviour:

you can browse in them until you get inside a specific tv-show or series and it happens.

Can somebody help to troubleshoot the problem?

Simple: an addon is not allowed to set any media library content types - only content type videos, if it’s a video addon. Some skins don’t use content types to offer very specific views for certain content types like the OSMC Skin does, so it might not have any negative side effects with them, but that doesn’t mitigate that you’re trying to do something that’s not meant to happen according to Kodi’s addon rules. And the addons you’re mentioning are not sticking to Kodi’s addon rules either, it seems.

It should, however show the same issue (or none) on all platforms. It puzzles me that it doesn’t. Can you post debug logs trying to repoduce the issue on both platforms, please?

vero 4k https://paste.osmc.tv/ajiniqaqeh

win7 https://gist.github.com/nixxo/802b2af05718cb8bb11a4fc230fddfdd

From your screenshot, I’ve now spotted the difference: You’re accessing the addon via Videos/Video addons on your Windows setup which uses the MyVideoNav.xml window that supports the TV show episodes view. On your Vero 4K you’re accessing the same addon via the Programs section which uses the MyPrograms.xml window which doesn’t offer that view at all (for the reasons outlined in my inital post). That explains the different behaviour on your setups.

How to solve this issue: Access the addon through the Videos home menu link.

Our skin offers certain views only in scenarios that Kodi wants them to be available - making them completely unavailable in other scenarios. I can certainly have a look at altering our skin’s behaviour to prevent this negative side effect, but a) I’m not sure that’s really trivial as the TV show episodes view is made to only be used for those and nowhere else (with scraped media content) and b) it would be catering for a scenario that’s not meant to be there in the first place. :see_no_evil:

yes, the skin is the same version as the one on the vero.

I think the problem is in the script-skinshortcuts-includes.xml file. If I copy it from my vero to my win7 installation I can replicate the problem.

I tried to restore my vero4k skin to the default settings and nothing, but then I restored the main menu to default and… problem solved.

Now I’ll try to recreate my main menu step by step to see what is the customization that triggers this behavior.

Edit: well… not completely. If I access the addon via the Video-addons menu item, then open the addon, browse to the show I want to see, then the ‘episodes’ are shown as pictured above.
But If I add the parent folder to the ‘favorites’ and access the addon via the favorites, then the weird behavior occur.

That just confirms what I suspected… Depending on how you created the home menu link to the addon via the skinshortcuts script on either setup, it uses the MyVideoNav.xml window or the MyPrograms.xml window. It has nothing to do with the script itself. And I suspect, the Favourites do access their contents via the MyPrograms.xml window as well, if it’s content from a video addon.

Will check how we can prevent this behaviour from occuring :thinking: There’s one aspect in your screenshots that clearly shows in what way setting a content type other than videos is not meant ot happen inside a video addon: The secondary info label below the currently selected item in a list is not populated by the addon because it contains information the database would only provide. This is simply bad addon behaviour… But this shouldn’t mean you get a black screen either, I have to admit.

Yes, I checked again and can confirm.

If i execute the addon via MYVIDEONAV.XML there is no problem, if I do it via MYPROGRAMS.XML it shows the weird behavior.

For your second point about setting the content type I have to admit I don’t understand (I’m still a noob in kodi development)
When I create a listItem I then do a item.setInfo(‘video’, {video_infos}) where i set infos like season, episode, plot etc… for each item
Then when the list is populated I set the content of that list depending on what the list is about (tvshows, episodes, videos) with xbmcplugin.setContent(handle, type)

As I’m new to this I just copied this things from other addons, like the two I linked (or even the netflix one is like this)

Could you try and replicate this on your Windows setup again and test with this skin version, whether the issue still occurs? https://github.com/osmc/skin.osmc/archive/refs/heads/matrix.zip

ok, now both behave in the same way

Perfect! I’ve also changed the way the list reacts to the secondary label missing…