Git Product home page Git Product logo

Comments (4)

MoojMidge avatar MoojMidge commented on July 16, 2024

I'm not really sure I understand the problem.

The result is that, even with the widget refreshing, watched statuses are not updated and ready to use, but require an action by the user to trigger Kodi registering changes to the library database.

Are you saying that even when the widget refreshes the watched statuses are not correct, or that the watched statuses are not correct because the widget has not yet refreshed? If you wait another 10 minutes and the widget refreshes automatically, is the status correct even if you haven't changed windows or refreshed the skin?

My question is, when the widget refreshes, is there a way to make Kodi also check MySQL -- like happens when Kodi opens the Titles window, or refreshes the skin? This would keep the widget accurately synced across Kodi clients without needing additional user input.

Note: just to make sure I'm expressing myself clearly, I don't mean updating the library. The library is already up-to-date, the home screen is just stale.

Unfortunately, the only way I know how to do this is to basically fake a library scan to trick Kodi into thinking the library is being updated which forces the GUI to be refreshed.

However I am not clear on what is actually happening since I haven't seen these types of issues when using a local database. To be honest I'm surprised the behaviour is different when using a remote database as I didn't think Kodi cached database results.

Can you enable debug logging in the UpNext settings (Expert > Troubleshooting > Log Level > change to Debug) and send me a log of what happens when the widgets refresh on the HTPC but shows the wrong status? The problem may be that the widget is refreshing but not actually querying the database.

Edit: I'm asking for a lot now, but a bonus feature would be an option to set the widget to refresh using OnScreensaverDeactivated, instead of at a time interval.

I haven't tested it, but you can try this branch and see if it does what you want. Should refresh the widgets if the screensaver is deactivated more than 60 seconds after it was activated after it has been activated for the normal widget refresh period, and also re-adjust the refresh time interval to account for the screensaver refresh.

from service.upnext.

MoojMidge avatar MoojMidge commented on July 16, 2024

I think I know what the issue is now.

Only the "More like this..." recommendation widgets actually use the widget reload parameter, because they were intended to show recommendations for a movie/tvshow that was picked at random and needed to reload intermittently to show changing content.

The other widgets are populated based on the internal Kodi watched/in-progress state, and these widgets are automatically updated when Kodi changes the watched/in-progress state of any video in your library, so there is no need to manually refresh these widgets.

But this logic only applies when you have a local video database, where the automatic update of widgets is based on a video being played and a subsequent library update is requested by the Kodi client to the local database. As the Kodi client requested the database update it then knows that it needs to refresh the GUI content.

However, for a remote database, the connected clients don't really know what any of the other clients are doing, and I guess there is no Kodi functionality that has implemented database triggers that let connected clients know that the database has actually been updated.

Anyway, long story short, I will add an option to apply the widget refresh functionality to all widgets, which should workaround this issue.

from service.upnext.

MoojMidge avatar MoojMidge commented on July 16, 2024

screensaver_refresh branch has been updated to include the new option.

from service.upnext.

MoojMidge avatar MoojMidge commented on July 16, 2024

V2.0.20+dev.0 with the refresh all widgets option enabled should work as expected when using a remote database. If you are still having issues, let me know.

from service.upnext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.