Skip to content

feat(library): integrate SignalR for real-time sync and add in-library indicators#97

Open
lklynet wants to merge 12 commits intomainfrom
cache-lidarr-performance-improvements
Open

feat(library): integrate SignalR for real-time sync and add in-library indicators#97
lklynet wants to merge 12 commits intomainfrom
cache-lidarr-performance-improvements

Conversation

@lklynet
Copy link
Owner

@lklynet lklynet commented Feb 24, 2026

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.

…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.
@lklynet lklynet linked an issue Feb 24, 2026 that may be closed by this pull request
lklynet and others added 10 commits February 25, 2026 13:16
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Large library slowing down Aurral? Try PR-97

2 participants