From a4d7cdc2389e0f4d83d81094507c9b2b97b19a55 Mon Sep 17 00:00:00 2001 From: Martin Reitschmied Date: Sat, 11 Apr 2026 13:10:03 +0200 Subject: [PATCH] fix: remove duplicate searchReleases and grabRelease function declarations The movie detail page had duplicate declarations of searchReleases and grabRelease functions, causing esbuild transform failures in Docker CI. Co-Authored-By: Paperclip --- inertia/pages/library/movie/[id].tsx | 48 ---------------------------- 1 file changed, 48 deletions(-) diff --git a/inertia/pages/library/movie/[id].tsx b/inertia/pages/library/movie/[id].tsx index 530a13f..6b0647b 100644 --- a/inertia/pages/library/movie/[id].tsx +++ b/inertia/pages/library/movie/[id].tsx @@ -379,54 +379,6 @@ export default function MovieDetail() { } } - const searchReleases = async () => { - setSearchResults([]) - setSearching(true) - try { - const response = await fetch(`/api/v1/movies/${movieId}/releases`) - if (response.ok) { - const data = await response.json() - setSearchResults(data) - } - } catch (error) { - console.error('Failed to search releases:', error) - toast.error('Failed to search releases') - } finally { - setSearching(false) - } - } - - const grabRelease = async (result: SearchResult) => { - setGrabbing(result.id) - try { - const response = await fetch('/api/v1/queue/grab', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ - title: result.title, - downloadUrl: result.downloadUrl, - size: result.size, - movieId: movie?.id, - indexerId: result.indexerId, - indexerName: result.indexer, - guid: result.id, - ...(selectedClientId && { downloadClientId: selectedClientId }), - }), - }) - if (response.ok) { - toast.success('Download started') - } else { - const error = await response.json() - toast.error(error.error || 'Failed to grab release') - } - } catch (error) { - console.error('Failed to grab release:', error) - toast.error('Failed to grab release') - } finally { - setGrabbing(null) - } - } - const formatSize = (bytes: number) => { if (bytes >= 1073741824) return `${(bytes / 1073741824).toFixed(1)} GB` if (bytes >= 1048576) return `${(bytes / 1048576).toFixed(0)} MB`