Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add websocket connection to UI for live UI updates #43

Closed
Andrewpaps opened this issue Jun 6, 2023 · 2 comments · Fixed by #131
Closed

Add websocket connection to UI for live UI updates #43

Andrewpaps opened this issue Jun 6, 2023 · 2 comments · Fixed by #131
Labels
enhancement New feature or request

Comments

@Andrewpaps
Copy link

Description of the bug
Library not updating after search until page refresh

To Reproduce

  1. Add or download item
  2. Cross mark will not become check mark until page refresh

Expected behaviour
Check mark will appear after file recognition.

@Andrewpaps Andrewpaps added the bug Something isn't working label Jun 6, 2023
@Casvt
Copy link
Owner

Casvt commented Jun 6, 2023

The reason this isn't implemented yet is that the UI would need to constantly check the queue for if an item is downloaded and then change the check mark. This is quite resource intensive because we would need to constantly make requests (like every second).

This is already happening for tasks that appear at the bottom left in the nav bar and when viewing the queue to keep the queue updated.

A better solution would be to setup a websocket connection between the UI and the backend with which a constant connection can be kept to send live updates to the UI by the backend. Then no constant requests have to be made for anything.

@Casvt Casvt changed the title Library not updating after locating files until page refresh Add websocket connection to UI for live UI updates Jun 6, 2023
@Casvt Casvt added enhancement New feature or request and removed bug Something isn't working labels Jun 6, 2023
@Andrewpaps
Copy link
Author

Nice, sounds like a good implementation.

@Casvt Casvt linked a pull request Jan 17, 2024 that will close this issue
Casvt added a commit that referenced this issue Jan 17, 2024
* Added working base (#129)

* POC working with socket.io flask

* send to socket on task complete

* Fixed shutting down and converted tasks to websocket

* Made download queue use websocket

---------

Co-authored-by: Aaron Eikenberry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants