feat(library): integrate SignalR for real-time sync and add in-library indicators#97
Open
feat(library): integrate SignalR for real-time sync and add in-library indicators#97
Conversation
…y indicators Add @microsoft/signalr dependency for real-time communication with Lidarr. Implement SignalR service to listen for artist/album updates and trigger local cache synchronization. Create new database tables (lidarr_artists, lidarr_albums, lidarr_tracks) to cache library data locally. Replace direct Lidarr API calls with libraryManager methods that use local cache, reducing external API load. Add 'inLibrary' field to search results and discovery endpoints by checking against local cache. Implement periodic full sync and start SignalR connection on server startup. Remove client-side batch lookup in favor of server-side checks.
…iciency - Add SignalR client dependency and integrate with Lidarr for real-time notifications - Replace API polling with WebSocket-driven updates for queue, library, and download status - Implement caching and signature-based change detection to reduce unnecessary updates - Extend library manager with command caching and SignalR event processing - Remove client-side polling in favor of server-pushed WebSocket events - Increase polling intervals for background tasks to reduce server load
Add a cache for library lookup results to avoid redundant network requests. The similar artists section now displays a checkmark icon for artists already in the user's library. This provides immediate visual feedback and improves the user experience by reducing perceived latency.
Add WebSocket integration to update library lookup cache when library changes occur. This ensures the UI reflects current library state without requiring page refresh. - Use WebSocket channel to listen for library_update events - Update cache and component state when artists are added/removed - Add override for yocto-queue dependency to resolve installation issues
Add a cache for library lookup results to avoid redundant network requests. The similar artists section now displays a checkmark icon for artists already in the user's library. This provides immediate visual feedback and improves the user experience by reducing perceived latency.
Prevent users from triggering duplicate searches when a download is already in progress by checking for active download status before showing the re-search button.
- Implement WebSocket notifications for library changes (add/update/delete/refresh) on backend - Integrate WebSocket client in frontend library pages to refresh data on updates - Replace direct Lidarr API calls with library manager for consistency - Consolidate server startup logic into single entry point
- Deduplicate artists by foreignArtistId, mbid, or id in both frontend and backend - Prefer artists with later added date, monitored status, higher stats, or larger id - Remove artists without foreignArtistId from API response - Handle 404 errors by attempting to resolve artist via MBID and update cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add @microsoft/signalr dependency for real-time communication with Lidarr. Implement SignalR service to listen for artist/album updates and trigger local cache synchronization. Create new database tables (lidarr_artists, lidarr_albums, lidarr_tracks) to cache library data locally. Replace direct Lidarr API calls with libraryManager methods that use local cache, reducing external API load. Add 'inLibrary' field to search results and discovery endpoints by checking against local cache. Implement periodic full sync and start SignalR connection on server startup. Remove client-side batch lookup in favor of server-side checks.