feat: link series/movie titles to Sonarr/Radarr for admin users

- Series title links to Sonarr series page (/series/{titleSlug})
- Movie title links to Radarr movie page (/movie/{titleSlug})
- Links open in new tab, only shown for admin users
- Instance URL preserved through data aggregation for multi-instance support
This commit is contained in:
2026-05-15 21:34:01 +01:00
parent d09b0ab40a
commit 59b096a60a
3 changed files with 50 additions and 4 deletions

View File

@@ -351,14 +351,22 @@ function createDownloadCard(download) {
if (download.seriesName) {
const series = document.createElement('p');
series.className = 'download-series';
series.textContent = `Series: ${download.seriesName}`;
if (isAdmin && download.arrLink) {
series.innerHTML = 'Series: <a href="' + escapeHtml(download.arrLink) + '" target="_blank" class="arr-link">' + escapeHtml(download.seriesName) + '</a>';
} else {
series.textContent = `Series: ${download.seriesName}`;
}
infoDiv.appendChild(series);
}
if (download.movieName) {
const movie = document.createElement('p');
movie.className = 'download-movie';
movie.textContent = `Movie: ${download.movieName}`;
if (isAdmin && download.arrLink) {
movie.innerHTML = 'Movie: <a href="' + escapeHtml(download.arrLink) + '" target="_blank" class="arr-link">' + escapeHtml(download.movieName) + '</a>';
} else {
movie.textContent = `Movie: ${download.movieName}`;
}
infoDiv.appendChild(movie);
}

View File

@@ -602,6 +602,18 @@ body {
accent-color: var(--accent);
}
/* ===== Arr Links (Admin) ===== */
.arr-link {
color: var(--accent);
text-decoration: none;
border-bottom: 1px dotted var(--accent);
}
.arr-link:hover {
opacity: 0.8;
border-bottom-style: solid;
}
/* ===== Download Paths (Admin) ===== */
.download-paths {
flex-basis: 100%;