From 1cb4b53b7835efa2e85e19e9f8687c13ffeb83f7 Mon Sep 17 00:00:00 2001 From: WonderAliceUwU Date: Mon, 7 Sep 2026 20:07:30 +0200 Subject: [PATCH] feat: improve download requests and mobile UI --- server/index.ts | 8 +- server/lib/services.ts | 126 +++++++++++++++++++-- shared/contracts.ts | 9 +- src/App.tsx | 247 +++++++++++++++++++++++++++++++++-------- src/api.ts | 8 +- src/index.css | 224 ++++++++++++++++++++++++++++++++++++- 6 files changed, 555 insertions(+), 67 deletions(-) diff --git a/server/index.ts b/server/index.ts index 7dd9af3..6935606 100644 --- a/server/index.ts +++ b/server/index.ts @@ -390,16 +390,16 @@ async function routeRequest(request: IncomingMessage, response: ServerResponse): if (url.pathname === '/api/requests/movie' && method === 'POST') { const config = await readConfig(session!.encryptionKey); - const body = await readJson<{ tmdbId: number; user: string | null }>(request); - await requestMovie(config, Number(body.tmdbId), body.user); + const body = await readJson<{ tmdbId: number; user: string | null; qualityProfileId?: number }>(request); + await requestMovie(config, Number(body.tmdbId), body.user, Number(body.qualityProfileId) || undefined); sendJson(response, 200, { ok: true }); return; } if (url.pathname === '/api/requests/series' && method === 'POST') { const config = await readConfig(session!.encryptionKey); - const body = await readJson<{ tmdbId: number; user: string | null }>(request); - await requestSeries(config, Number(body.tmdbId), body.user); + const body = await readJson<{ tmdbId: number; user: string | null; qualityProfileId?: number }>(request); + await requestSeries(config, Number(body.tmdbId), body.user, Number(body.qualityProfileId) || undefined); sendJson(response, 200, { ok: true }); return; } diff --git a/server/lib/services.ts b/server/lib/services.ts index cad2371..67db7d3 100644 --- a/server/lib/services.ts +++ b/server/lib/services.ts @@ -37,6 +37,7 @@ const PROCESSING_TTL_MS = 60 * 60 * 1000; // 1 hour max const processingQueue: ProcessingItem[] = []; const completedDownloads: CompletedDownloadItem[] = []; let previousDownloadIds = new Set(); +const cancelledDownloadIds = new Set(); export function addProcessingItem(item: Omit): void { const id = `proc-${item.source}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; @@ -73,6 +74,7 @@ function detectCompletedDownloads(currentDownloads: DownloadItem[]): void { // Items that were downloading before but are no longer in the queue = completed for (const prevId of previousDownloadIds) { if (!currentIds.has(prevId)) { + const wasCancelled = cancelledDownloadIds.delete(prevId); // Find the item info from the last known state — we stored it below const cached = lastKnownDownloads.get(prevId); if (cached) { @@ -85,6 +87,7 @@ function detectCompletedDownloads(currentDownloads: DownloadItem[]): void { backdropUrl: cached.backdropUrl, tmdbId: cached.tmdbId, mediaType: cached.mediaType, + status: wasCancelled ? 'cancelled' : 'completed', completedAt: new Date().toISOString(), }); } @@ -371,7 +374,13 @@ export function sanitizeConfig(input: AppConfig): AppConfig { language: input.preferences.language.trim() || 'en-US', region: input.preferences.region.trim().toUpperCase(), excludeLibraryItems: Boolean(input.preferences.excludeLibraryItems), - animationLevel: input.preferences.animationLevel === 'reduced' ? 'reduced' : 'smooth' + animationLevel: input.preferences.animationLevel === 'reduced' ? 'reduced' : 'smooth', + sonarrDownloadQualityProfileIds: Array.isArray(input.preferences.sonarrDownloadQualityProfileIds) + ? input.preferences.sonarrDownloadQualityProfileIds.map(String) + : [], + radarrDownloadQualityProfileIds: Array.isArray(input.preferences.radarrDownloadQualityProfileIds) + ? input.preferences.radarrDownloadQualityProfileIds.map(String) + : [] }, jellyfin: { baseUrl: normalizeBaseUrl(input.jellyfin.baseUrl), @@ -844,6 +853,9 @@ export async function removeDownload(config: AppConfig, id: string): Promise String(item.id) === rawId); + const response = await fetch( `${baseUrl}/api/v3/queue/${encodeURIComponent(rawId)}?removeFromClient=true&blocklist=false&skipRedownload=false`, { @@ -857,6 +869,86 @@ export async function removeDownload(config: AppConfig, id: string): Promise= 0; index--) { + if (processingQueue[index].source === source && processingQueue[index].title.toLowerCase() === title.toLowerCase()) { + processingQueue.splice(index, 1); + } + } +} + +async function removeRadarrMovieIfEmpty( + config: AppConfig, + movieId: number, + queue: RadarrQueueRecord[], + cancelledQueueId: string +): Promise { + if (queue.some((item) => String(item.id) !== cancelledQueueId && item.movie?.id === movieId)) { + return; + } + + const movie = await getRadarrMovieById(config, movieId); + if (!movie || movie.hasFile) { + return; + } + + const response = await fetch( + `${config.radarr.baseUrl}/api/v3/movie/${encodeURIComponent(String(movieId))}?deleteFiles=false&addImportExclusion=false`, + { method: 'DELETE', headers: { 'X-Api-Key': config.radarr.apiKey } } + ); + if (!response.ok) { + throw new Error(`Radarr ${response.status} ${response.statusText}`); + } +} + +async function removeSonarrSeriesIfEmpty( + config: AppConfig, + seriesId: number, + queue: SonarrQueueRecord[], + cancelledQueueId: string +): Promise { + if (queue.some((item) => String(item.id) !== cancelledQueueId && item.seriesId === seriesId)) { + return; + } + + const files = await getSonarrEpisodeFilesBySeriesId(config, seriesId); + if (files.length) { + return; + } + + const response = await fetch( + `${config.sonarr.baseUrl}/api/v3/series/${encodeURIComponent(String(seriesId))}?deleteFiles=false`, + { method: 'DELETE', headers: { 'X-Api-Key': config.sonarr.apiKey } } + ); + if (!response.ok) { + throw new Error(`Sonarr ${response.status} ${response.statusText}`); + } } export async function getTitleDetails( @@ -1883,6 +1975,21 @@ async function getRadarrMovieRecord(config: AppConfig, tmdbId: number): Promise< } } +async function getRadarrMovieById(config: AppConfig, movieId: number): Promise { + if (!config.radarr.baseUrl || !config.radarr.apiKey || !movieId) { + return null; + } + + try { + return await fetchJson( + `${config.radarr.baseUrl}/api/v3/movie/${encodeURIComponent(String(movieId))}`, + { headers: { 'X-Api-Key': config.radarr.apiKey } } + ); + } catch { + return null; + } +} + async function resolveSonarrRequestConfig(config: AppConfig): Promise<{ rootFolderPath: string; qualityProfileId: number; @@ -2459,7 +2566,7 @@ function mapJellyfinEpisode(episode: JellyfinItem): TitleDetailsEpisode { }; } -export async function requestMovie(config: AppConfig, tmdbId: number, user: string | null): Promise { +export async function requestMovie(config: AppConfig, tmdbId: number, user: string | null, qualityProfileId?: number): Promise { if (!config.radarr.baseUrl || !config.radarr.apiKey) { throw new Error('Radarr is not configured.'); } @@ -2487,7 +2594,7 @@ export async function requestMovie(config: AppConfig, tmdbId: number, user: stri }, body: JSON.stringify({ title: details.title || details.original_title || 'Movie', - qualityProfileId: radarrRequestConfig.qualityProfileId, + qualityProfileId: qualityProfileId || radarrRequestConfig.qualityProfileId, rootFolderPath: radarrRequestConfig.rootFolderPath, tmdbId: details.id, year: Number(String(details.release_date || '').slice(0, 4)) || 0, @@ -2530,7 +2637,8 @@ export async function requestMovie(config: AppConfig, tmdbId: number, user: stri }, body: JSON.stringify({ name: 'MoviesSearch', - movieIds: [movie.id] + movieIds: [movie.id], + qualityProfileId }) }); @@ -2545,7 +2653,7 @@ export async function requestMovie(config: AppConfig, tmdbId: number, user: stri }); } -export async function requestSeries(config: AppConfig, tmdbId: number, user: string | null): Promise { +export async function requestSeries(config: AppConfig, tmdbId: number, user: string | null, qualityProfileId?: number): Promise { if (!config.sonarr.baseUrl || !config.sonarr.apiKey) { throw new Error('Sonarr is not configured.'); } @@ -2582,7 +2690,7 @@ export async function requestSeries(config: AppConfig, tmdbId: number, user: str body: JSON.stringify({ title: details.name || details.original_name || 'Series', tvdbId, - qualityProfileId: sonarrRequestConfig.qualityProfileId, + qualityProfileId: qualityProfileId || sonarrRequestConfig.qualityProfileId, languageProfileId: sonarrRequestConfig.languageProfileId, rootFolderPath: sonarrRequestConfig.rootFolderPath, seasonFolder: true, @@ -2642,7 +2750,8 @@ export async function requestSeason(config: AppConfig, payload: SeasonRequestPay body: JSON.stringify({ name: 'SeasonSearch', seriesId: payload.seriesId, - seasonNumber: payload.seasonNumber + seasonNumber: payload.seasonNumber, + qualityProfileId: payload.qualityProfileId }) }); @@ -2673,7 +2782,8 @@ export async function requestEpisode(config: AppConfig, payload: EpisodeRequestP }, body: JSON.stringify({ name: 'EpisodeSearch', - episodeIds: [payload.episodeId] + episodeIds: [payload.episodeId], + qualityProfileId: payload.qualityProfileId }) }); diff --git a/shared/contracts.ts b/shared/contracts.ts index 8d80ee2..0a482e9 100644 --- a/shared/contracts.ts +++ b/shared/contracts.ts @@ -53,6 +53,8 @@ export interface AppPreferences { region: string; excludeLibraryItems: boolean; animationLevel: 'smooth' | 'reduced'; + sonarrDownloadQualityProfileIds: string[]; + radarrDownloadQualityProfileIds: string[]; } export interface AppConfig { @@ -230,6 +232,7 @@ export interface CompletedDownloadItem { backdropUrl?: string; tmdbId?: number; mediaType?: 'movie' | 'tv' | 'series'; + status: 'completed' | 'cancelled'; completedAt: string; } @@ -286,10 +289,12 @@ export interface EpisodeWatchStateRequest { export interface SeasonRequestPayload { seriesId: number; seasonNumber: number; + qualityProfileId?: number; } export interface EpisodeRequestPayload { episodeId: number; + qualityProfileId?: number; } export interface SeasonDeletePayload { @@ -345,7 +350,9 @@ export const defaultConfig: AppConfig = { language: 'en-US', region: 'US', excludeLibraryItems: true, - animationLevel: 'smooth' + animationLevel: 'smooth', + sonarrDownloadQualityProfileIds: [], + radarrDownloadQualityProfileIds: [] }, jellyfin: { baseUrl: '', diff --git a/src/App.tsx b/src/App.tsx index d92b0c0..c8a2288 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -140,6 +140,13 @@ function App() { setEntryStage(resolveEntryStage(settings, serviceOptions)) } + async function refreshDownloads() { + const response = await api.getDownloads() + setDownloads(response.downloading) + setProcessingItems(response.processing) + setCompletedDownloads(response.completed) + } + async function loadHub(page: HubPageResponse['page'], options?: { silent?: boolean }) { if (!options?.silent) { setHubLoading(true) @@ -207,8 +214,11 @@ function App() { } if (route === 'downloads') { - void refreshBaseData() - return + void refreshDownloads() + const interval = window.setInterval(() => { + void refreshDownloads() + }, 2500) + return () => window.clearInterval(interval) } const page = route as HubPageResponse['page'] @@ -330,7 +340,7 @@ function App() { } } - async function handleRequest(card: MediaCard) { + async function handleRequest(card: MediaCard, qualityProfileId?: number) { if (!card.tmdbId) return setBusy(true) @@ -338,9 +348,9 @@ function App() { setNotice('') try { if (card.mediaType === 'movie') { - await api.requestMovie(card.tmdbId, currentJellyfinUser) + await api.requestMovie(card.tmdbId, currentJellyfinUser, qualityProfileId) } else { - await api.requestSeries(card.tmdbId, currentJellyfinUser) + await api.requestSeries(card.tmdbId, currentJellyfinUser, qualityProfileId) } if (route !== 'downloads' && route !== 'settings' && route !== 'search' && route !== 'calendar') { await loadHub(route as HubPageResponse['page'], { silent: true }) @@ -359,11 +369,7 @@ function App() { setNotice('') try { await api.deleteDownload({ id }) - const resp = await api.getDownloads() - setDownloads(resp.downloading) - setProcessingItems(resp.processing) - setCompletedDownloads(resp.completed) - setNotice('Download removed from the queue.') + await refreshDownloads() } catch (deleteError) { setError(deleteError instanceof Error ? deleteError.message : 'Failed to remove the download.') } finally { @@ -587,6 +593,10 @@ function App() { config.preferences.sonarrDownloadQualityProfileIds.includes(profile.id)), + radarr: options.radarrQualityProfiles.filter((profile) => config.preferences.radarrDownloadQualityProfileIds.includes(profile.id)), + }} onClose={() => setSelectedCard(null)} originRect={selectedCard.originRect} onRequest={handleRequest} @@ -1561,8 +1571,9 @@ function TitleDetailsModal(props: { config: AppConfig onClose: () => void originRect: ModalOriginRect | null - onRequest: (card: MediaCard) => Promise + onRequest: (card: MediaCard, qualityProfileId?: number) => Promise currentUser: string | null + qualityProfiles: { sonarr: SelectOption[]; radarr: SelectOption[] } }) { const [details, setDetails] = useState(null) const [detailsLoading, setDetailsLoading] = useState(true) @@ -1576,6 +1587,12 @@ function TitleDetailsModal(props: { const [seasonMenuOpen, setSeasonMenuOpen] = useState(false) const [movieRequestPending, setMovieRequestPending] = useState(false) const [movieDeleteBusy, setMovieDeleteBusy] = useState(false) + const [qualityPicker, setQualityPicker] = useState<{ + title: string + logoUrl?: string + profiles: SelectOption[] + onConfirm: (qualityProfileId?: number) => void + } | null>(null) const [playerTarget, setPlayerTarget] = useState<{ id: string; title: string } | null>(null) const [isOverviewExpanded, setIsOverviewExpanded] = useState(false) const [episodeScrollState, setEpisodeScrollState] = useState({ canScrollLeft: false, canScrollRight: false }) @@ -2025,7 +2042,7 @@ function TitleDetailsModal(props: { return } - if (movieRequestPending && (details.requestStatus === 'processing' || details.requestStatus === 'downloading')) { + if (movieRequestPending && details.requestStatus === 'downloading') { setMovieRequestPending(false) } }, [details, movieRequestPending]) @@ -2037,7 +2054,7 @@ function TitleDetailsModal(props: { const timeoutId = window.setTimeout(() => { setMovieRequestPending(false) - }, 15000) + }, 5 * 60 * 1000) return () => { window.clearTimeout(timeoutId) @@ -2137,7 +2154,15 @@ function TitleDetailsModal(props: { }) } - async function handleSeasonDownload() { + function openQualityPicker( + title: string, + profiles: SelectOption[], + onConfirm: (qualityProfileId?: number) => void + ) { + setQualityPicker({ title, logoUrl, profiles, onConfirm }) + } + + async function handleSeasonDownload(qualityProfileId?: number) { if (typeof activeSeasonNumber !== 'number') { return } @@ -2156,9 +2181,10 @@ function TitleDetailsModal(props: { await api.requestSeason({ seriesId: details.sonarrSeriesId, seasonNumber: activeSeasonNumber, + qualityProfileId, }, props.currentUser) } else { - await props.onRequest(props.card) + await props.onRequest(props.card, qualityProfileId) } await refreshSeasonState(seasonValue || undefined) } catch (error) { @@ -2233,7 +2259,7 @@ function TitleDetailsModal(props: { } } - async function handleMovieRequest() { + async function handleMovieRequest(qualityProfileId?: number) { if (details?.mediaType !== 'movie' || movieRequestStatus === 'processing' || movieRequestStatus === 'downloading') { return } @@ -2249,7 +2275,7 @@ function TitleDetailsModal(props: { : current) try { - await props.onRequest(props.card) + await props.onRequest(props.card, qualityProfileId) await refreshSeasonState() } catch (error) { setMovieRequestPending(false) @@ -2308,6 +2334,19 @@ function TitleDetailsModal(props: { return } + openQualityPicker( + `Download ${details?.episodes.find((episode) => episode.id === episodeId)?.title || 'episode'}`, + props.qualityProfiles.sonarr, + (qualityProfileId) => queueEpisodeDownload(episodeId, sonarrEpisodeId, availability, qualityProfileId) + ) + } + + function queueEpisodeDownload( + episodeId: string, + sonarrEpisodeId: number, + availability: TitleDetailsResponse['episodes'][number]['availability'], + qualityProfileId?: number + ) { setEpisodeDownloadBusyId(episodeId) setPendingEpisodeRequestIds((current) => current.includes(episodeId) ? current : [...current, episodeId]) updateEpisodeInCaches(episodeId, (episode) => ({ @@ -2317,7 +2356,7 @@ function TitleDetailsModal(props: { canDownload: false, })) - void api.requestEpisode({ episodeId: sonarrEpisodeId }, props.currentUser) + void api.requestEpisode({ episodeId: sonarrEpisodeId, qualityProfileId }, props.currentUser) .catch(() => { setPendingEpisodeRequestIds((current) => current.filter((id) => id !== episodeId)) updateEpisodeInCaches(episodeId, (episode) => ({ @@ -2475,7 +2514,11 @@ function TitleDetailsModal(props: { ) ) : ( - @@ -2577,7 +2620,11 @@ function TitleDetailsModal(props: { aria-label="Download season" className="title-season-action" disabled={seasonActionBusy === 'download'} - onClick={() => void handleSeasonDownload()} + onClick={() => openQualityPicker( + `${displayTitle} · ${activeSeasonMeta?.title || 'Season'}`, + props.qualityProfiles.sonarr, + (qualityProfileId) => void handleSeasonDownload(qualityProfileId) + )} type="button" > @@ -2795,12 +2842,61 @@ function TitleDetailsModal(props: { ) : null} + {qualityPicker ? ( + setQualityPicker(null)} + onSelect={(qualityProfileId) => { + const request = qualityPicker + setQualityPicker(null) + request.onConfirm(qualityProfileId) + }} + profiles={qualityPicker.profiles} + logoUrl={qualityPicker.logoUrl} + title={qualityPicker.title} + /> + ) : null} ) } +function QualityPicker(props: { + title: string + logoUrl?: string + profiles: SelectOption[] + onCancel: () => void + onSelect: (qualityProfileId?: number) => void +}) { + return ( +
{ + event.stopPropagation() + props.onCancel() + }} + role="presentation" + > +
event.stopPropagation()} + role="dialog" + > + {props.logoUrl ? {props.title} :

{props.title}

} +

Select quality:

+
+ + {props.profiles.map((profile) => ( + + ))} +
+
+
+ ) +} + function buildJellyfinPlayerUrl(baseUrl: string, itemId: string) { return `${baseUrl.replace(/\/$/, '')}/web/#/details?id=${encodeURIComponent(itemId)}&autoplay=true` } @@ -3017,6 +3113,14 @@ function DownloadsPage(props: {
+
Processing
@@ -3047,47 +3151,54 @@ function DownloadsPage(props: { {props.completedDownloads.length > 0 ? (
-

Completed

-
{props.completedDownloads.map((item) => ( -
+
+
{item.posterUrl || item.backdropUrl - ? {item.title} + ? ( + + {item.posterUrl ? : null} + {item.title} + + ) :
{item.title.slice(0, 1).toUpperCase()}
}

{item.title}

{item.subtitle ?

{item.subtitle}

: null} -

Download completed

+

{item.status === 'cancelled' ? 'Download cancelled' : 'Download completed'}

-
-
-
- 100% - Completed -
-
-
-
+ {item.status === 'completed' ? ( +
+
+
+ 100% + Completed +
+
+
+
+
-
-
+ ) : null}
))}
@@ -3469,6 +3580,14 @@ function SettingsView(props: { onApiKeyChange={(apiKey) => props.updateConfig('sonarr', { ...props.config.sonarr, apiKey })} onBaseUrlChange={(baseUrl) => props.updateConfig('sonarr', { ...props.config.sonarr, baseUrl })} /> + props.updateConfig('preferences', { + ...props.config.preferences, + sonarrDownloadQualityProfileIds, + })} + /> @@ -3478,6 +3597,14 @@ function SettingsView(props: { onApiKeyChange={(apiKey) => props.updateConfig('radarr', { ...props.config.radarr, apiKey })} onBaseUrlChange={(baseUrl) => props.updateConfig('radarr', { ...props.config.radarr, baseUrl })} /> + props.updateConfig('preferences', { + ...props.config.preferences, + radarrDownloadQualityProfileIds, + })} + /> @@ -3532,6 +3659,38 @@ function ServiceFields(props: { ) } +function QualityProfileVisibility(props: { + profiles: SelectOption[] + selectedProfileIds: string[] + onChange: (profileIds: string[]) => void +}) { + return ( +
+ Profiles shown when downloading +

Auto is always available. Select the quality profiles users can choose.

+ {props.profiles.length ? ( +
+ {props.profiles.map((profile) => { + const checked = props.selectedProfileIds.includes(profile.id) + return ( + + ) + })} +
+ ) :

Save the service connection first to load its quality profiles.

} +
+ ) +} + function EmptyState({ title, copy, className }: { title: string; copy: string; className?: string }) { return (
diff --git a/src/api.ts b/src/api.ts index 9b99937..de7fa3d 100644 --- a/src/api.ts +++ b/src/api.ts @@ -122,15 +122,15 @@ export const api = { request<{ ok: boolean }>('/api/downloads/dismiss-all', { method: 'POST', }), - requestMovie: (tmdbId: number, user: string | null) => + requestMovie: (tmdbId: number, user: string | null, qualityProfileId?: number) => request<{ ok: boolean }>('/api/requests/movie', { method: 'POST', - body: JSON.stringify({ tmdbId, user }), + body: JSON.stringify({ tmdbId, user, qualityProfileId }), }), - requestSeries: (tmdbId: number, user: string | null) => + requestSeries: (tmdbId: number, user: string | null, qualityProfileId?: number) => request<{ ok: boolean }>('/api/requests/series', { method: 'POST', -body: JSON.stringify({ tmdbId, user }), + body: JSON.stringify({ tmdbId, user, qualityProfileId }), }), requestSeason: (payload: SeasonRequestPayload, user: string | null) => request<{ ok: boolean }>('/api/requests/season', { diff --git a/src/index.css b/src/index.css index e0a503e..c35985e 100644 --- a/src/index.css +++ b/src/index.css @@ -1932,6 +1932,124 @@ img { border-color: rgba(255, 255, 255, 0.12); } +.quality-picker-backdrop { + position: fixed; + z-index: 30; + inset: 0; + display: grid; + place-items: center; + padding: 1.25rem; + background: rgba(0, 0, 0, 0.54); + backdrop-filter: blur(6px); +} + +.quality-picker { + width: min(100%, 26rem); + padding: 1.35rem; + border: 1px solid rgba(255, 255, 255, 0.14); + border-radius: 1.1rem; + background: #171a20; + box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.45); +} + +.quality-picker-logo { + display: block; + width: min(100%, 14rem); + max-height: 4.5rem; + margin: 0 auto 1.5rem; + object-fit: contain; +} + +.quality-picker h3 { + margin: 0 0 1.5rem; + text-align: center; +} + +.quality-picker-label { + margin: 0 0 0.75rem; + color: #dfe7f7; + font-size: 0.9rem; + font-weight: 700; +} + +.quality-picker-options { + display: grid; + gap: 0.65rem; +} + +.quality-picker-options button { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + min-height: 2.9rem; + padding: 0.65rem 0.85rem; + border: 1px solid rgba(255, 255, 255, 0.14); + border-radius: 0.7rem; + background: rgba(255, 255, 255, 0.06); + color: #f2f6ff; + font: inherit; + font-weight: 650; + text-align: left; + transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease; +} + +.quality-picker-options button:hover, +.quality-picker-options button:focus-visible { + border-color: rgba(255, 255, 255, 0.28); + background: rgba(255, 255, 255, 0.12); + transform: translateY(-1px); +} + +.quality-picker-options button span { + color: #aeb9cd; + font-size: 0.78rem; + font-weight: 500; +} + +.quality-profile-visibility { + display: grid; + gap: 0.65rem; + margin: 0; + padding: 1rem; + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 0.8rem; +} + +.quality-profile-visibility legend { + padding: 0 0.35rem; + color: #e8efff; + font-size: 0.9rem; + font-weight: 700; +} + +.quality-profile-visibility > p { + margin: 0; + color: #9ba9c2; + font-size: 0.82rem; +} + +.quality-profile-visibility-list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); + gap: 0.55rem; +} + +.quality-profile-visibility-list label { + display: flex; + align-items: center; + gap: 0.55rem; + min-width: 0; + color: #dfe7f7; + font-size: 0.86rem; +} + +.quality-profile-visibility-list input { + width: 1rem; + height: 1rem; + accent-color: #dfe7f7; +} + .title-seasons-panel { display: grid; gap: 1.3rem; @@ -3112,11 +3230,11 @@ img { } .downloads-section { - padding-bottom: 1.4rem; + padding: 0 1.25rem 1.4rem; } .downloads-header { - padding: calc(env(safe-area-inset-top, 0px) + 1.1rem) 2.35rem 0; + padding: calc(env(safe-area-inset-top, 0px) + 1.1rem) 1.25rem 0; } .downloads-grid { @@ -3163,6 +3281,12 @@ img { object-fit: cover; } +.download-artwork picture { + display: block; + width: 100%; + height: 100%; +} + .download-poster-fallback { display: grid; place-items: center; @@ -3251,6 +3375,21 @@ img { gap: 0.8rem; } +.download-history-dismiss-button { + position: absolute; + top: 0.7rem; + right: 0.7rem; +} + +.download-row-completed, +.download-row-cancelled { + position: relative; +} + +.download-row-completed .download-progress-header { + padding-right: 2.5rem; +} + .download-action-button { width: 1.9rem; height: 1.9rem; @@ -3283,22 +3422,32 @@ img { } .downloads-section-header { + position: relative; display: flex; align-items: center; justify-content: space-between; + min-height: 1.9rem; margin-bottom: 0.6rem; } .downloads-section-header .downloads-section-title { + display: flex; + align-items: center; + min-height: 1.9rem; margin-bottom: 0; } .downloads-dismiss-all-button { + display: inline-grid; + width: 1.9rem; + height: 1.9rem; + place-items: center; + padding: 0 0 0.04rem; border: 0; background: rgba(255, 255, 255, 0.07); color: #98a8c4; - font-size: 0.82rem; - padding: 0.35rem 0.85rem; + font-size: 1.1rem; + line-height: 1; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; @@ -3309,6 +3458,13 @@ img { color: #dbe2ee; } +.downloads-section-header .downloads-dismiss-all-button { + position: absolute; + top: 50%; + right: 0; + transform: translateY(-50%); +} + .download-processing-label { display: flex; align-items: center; @@ -3347,6 +3503,15 @@ img { opacity: 0.85; } +.download-row-cancelled { + opacity: 0.72; +} + +.download-row-cancelled .download-completed-label, +.download-row-cancelled .download-completed-badge { + color: #ff9b9b; +} + .settings-page { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -4195,6 +4360,13 @@ img { padding: 0.8rem; } + .omniarr-sidebar:hover .sidebar-profile, + .omniarr-sidebar:hover .sidebar-link, + .omniarr-sidebar:hover .sidebar-settings { + justify-content: flex-start; + overflow: visible; + } + .sidebar-profile-copy, .sidebar-link > span:last-child, .sidebar-settings > span:last-child, @@ -4230,6 +4402,25 @@ img { transform: none; } + .omniarr-sidebar:hover .sidebar-footer > .sidebar-disk { + gap: 0.8rem; + justify-content: flex-start; + width: 100%; + min-width: 0; + max-width: none; + padding: 0.8rem; + overflow: visible; + } + + .omniarr-sidebar:hover .sidebar-disk-copy { + position: static; + width: auto; + max-width: none; + overflow: visible; + opacity: 1; + transform: none; + } + .omniarr-sidebar.is-open:not(:hover) .sidebar-profile-copy, .omniarr-sidebar.is-open:not(:hover) .sidebar-link > span:last-child, .omniarr-sidebar.is-open:not(:hover) .sidebar-settings > span:last-child, @@ -4343,6 +4534,7 @@ img { } .title-summary-header-play, + .title-summary-header-delete, .title-season-play-button { display: none; } @@ -4606,7 +4798,7 @@ img { } .download-row { - grid-template-columns: 4.75rem minmax(0, 1fr); + grid-template-columns: 5rem minmax(0, 1fr); column-gap: 0.7rem; row-gap: 0.35rem; align-items: start; @@ -4620,11 +4812,31 @@ img { .download-artwork { grid-row: 1 / span 2; - width: 4.75rem; + width: 5rem; border-radius: 0.65rem; aspect-ratio: 2 / 3; } + .download-row-cancelled { + grid-template-columns: 5rem minmax(0, 1fr); + min-height: 0; + } + + .download-row-cancelled .download-artwork { + grid-row: 1; + width: 5rem; + aspect-ratio: 2 / 3; + } + + .download-row-cancelled .download-copy { + padding-right: 1.7rem; + } + + .download-history-dismiss-button { + top: 0.55rem; + right: 0.55rem; + } + .download-copy { grid-column: 2; align-content: start;