BUG: Missing Ombi link for TV requests and missing *Arr links for all requests #56
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Summary
There are two distinct visual bugs preventing external service navigation links from appearing on request cards in the dashboard requests tab:
ombi-link) does not appear on any TV show request cards, although it shows up correctly on movie request cards.sonarr-link/radarr-link) do not appear on any TV show or movie request cards, even for authenticated administrator users who should have access.These links are crucial for quickly jumping to the respective Ombi/Sonarr/Radarr pages for item management.
Steps to Reproduce
GET /api/dashboard/stream) to verify missing field properties.Root Cause Analysis
1. Ombi Link Button for TV Shows (Frontend Issue)
theMovieDbId(which is a Movie DB ID). Instead, they populate the TVDB ID (theTvDbIdor other variations liketheTvdbId,TvDbId,TheTvDbId). Sincerequest.theMovieDbIdis undefined for TV shows, the condition fails and no button is rendered.Additionally, the URL itself is currently hardcoded to use
request.theMovieDbId:${ombiBaseUrl}/details/tv/${tvdbId}.2. *Arr Direct Link Buttons for Request Cards (Backend/SSE Issue)
The frontend checks
state.isAdmin && request.arrLinkto determine if a Sonarr/Radarr link button should be rendered:arrLinkandarrTypeis implemented only in the standalone API routeGET /api/ombi/requestsinserver/routes/ombi.js.However, the frontend dashboard actually gets all its real-time requests data from the Server-Sent Events (SSE) stream (
GET /api/dashboard/stream) managed inserver/routes/dashboard.js. In the SSE stream handler, the requests are simply read from the poll cache and filtered by user, without ever executing the matching logic to attacharrLinkandarrType.As a result,
request.arrLinkis always undefined when pushed via SSE, so the buttons are never drawn.Expected Behavior
${ombiBaseUrl}/details/tv/${tvdbId}.Proposed Solution
1. Fix the Frontend Ombi Link Checks
Modify requests.js to resolve the correct identifier based on media type:
2. Refactor and Share the *Arr Matching Logic
Extract the Sonarr/Radarr series and movie lookup/matching block from
server/routes/ombi.jsinto a shared utility function or helper inserver/utils/ombiHelpers.jsorserver/services/DownloadAssembler.js(e.g.,decorateRequestsWithArrLinks(movieRequests, tvRequests, isAdmin)).3. Integrate *Arr Decoration into SSE Stream
Call this shared decorator function in the SSE handler inside
server/routes/dashboard.jsbefore writing the SSE payload to the socket, so that admins receive the matchedarrLinkandarrTypefields in real-time.Additional Context
requests.test.js) should be updated to verify the corrected rendering behavior.Resolved in commit
0eaa54cf4a.