jellyfin / jellycon

Kodi Addon for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
311 stars 29 forks source link

Next up widget does not update #250

Open gzpr opened 1 year ago

gzpr commented 1 year ago

Next up jellycon widget does not update upon watching an item/marking it as watched. I will mark an item as watched, and it will be marked as watched in jellyfin but the kodi widget itself won't reflect the change (show the next unwatched episode) unless I reload the skin.

Tested it on multiple skins and the same behavior happens in each of them. Running latest stable version of Kodi.

mcarlton00 commented 1 year ago

The widget does update, as evidenced by the fact that after reloading the skin it has the right data. I think what's happening is that the skin is populating content before the addon has the chance to update it's data. But I'm also not sure how to fix that without forcing a manual skin reload, which could cause screen flashing as the skin gets loaded repeatedly.

gzpr commented 1 year ago

For what it's worth, the embuary skin has a next up widget, and it works as you'd expect but can only be used with a local database which would make me have to use jellyfin for kodi which isn't really an option for me.

mcarlton00 commented 1 year ago

Embuary definitely seems to be an edge case in terms of skin utilities, and is hardcoded to look for embycon in over 1000 places last time I looked.

Just for clarification, you're talking about when you embed the Jellycon Next Up widget into a kodi skin for viewing on the home screen, correct? Not displaying it directly through the addons -> jellycon -> libraries etc etc menus.

mcarlton00 commented 1 year ago

So a bit of digging: If you drop a xbmc.executebuiltin("ReloadSkin()") at the start of this function:

https://github.com/jellyfin/jellycon/blob/351c872c4698187b4f4dd22db0dc15427eaeaab6/resources/lib/play_utils.py#L1016-L1018

then it does update as expected. The problem with reloading the skin is that it sets you back to the default view. So for example, if you're on the TV Shows menu item and reload the skin, you'll get sent back to Movies or Pictures or whatever is the highlighted view when you first start Kodi. This is arguably even more annoying. Theoretically I should be able to find whatever the current view is and automatically move back to it, but I can't figure out how to retrieve that value and navigate to it programmatically.

gzpr commented 1 year ago

Just for clarification, you're talking about when you embed the Jellycon Next Up widget into a kodi skin for viewing on the home screen, correct? Not displaying it directly through the addons -> jellycon -> libraries etc etc menus.

That's correct. It's when it's added as a widget to the home screen. When jellycon next up is used like a menu entry that has its own view it actually works as intended i.e. it automatically updates upon change.

Provided stop_all_playback means what I think it does the skin would only reload after playing an item and then closing the player, and not for instance, marking an item watched from the context menu? This wouldn't be really ideal.

Don't know if this will help you but I noticed both embuary helper and skin helper scripts have this in their next up widget paths at the end: &reload=$INFO[Window(Home).Property(EmbuaryWidgetUpdate) and &reload=$INFO[Window(Home).Property(widgetreload)] respectively but I assume these aren't built in kodi functions you could use?

mcarlton00 commented 1 year ago

Correct, those aren't built into Kodi, they're functions of the addons. If I'm understanding correctly, provided one of the helper widgets are installed it should be automatically updating on it's own. It seems like the helpers are supposed to refresh stuff in the background automatically, otherwise why would skin makers bother to include them? Unfortunately, I have no idea how they work. I can't get the Embuary helper to show anything, and I can't get the skin helper widgets addon installed at all. It's failing on dependencies downstream from the addon. Seems something is hardcoded to an out of date version.

kyle-sawatsky commented 4 days ago

Hey, I'm assuming this is still an issue. Am I understanding correctly that if you add the lists (such as Unwatched Movies) as a menu item and not as a widget it will update fine?

I was using Jellyfin for Kodi before but experiencing some bizarre behaviour regarding which audio track is selected automatically so wanted to come back to Jellycon.