@@ -234,15 +204,11 @@
{/each}
-
+ downloadTorrent(torrent.id!)}
+ />
{/each}
diff --git a/web/src/lib/components/download-season-dialog.svelte b/web/src/lib/components/download-season-dialog.svelte
index 888e823..7d21bf7 100644
--- a/web/src/lib/components/download-season-dialog.svelte
+++ b/web/src/lib/components/download-season-dialog.svelte
@@ -3,19 +3,15 @@
import { Input } from '$lib/components/ui/input/index.js';
import { Label } from '$lib/components/ui/label/index.js';
import { toast } from 'svelte-sonner';
- import {
- convertTorrentSeasonRangeToIntegerRange,
- formatSecondsToOptimalUnit,
- getFullyQualifiedMediaName
- } from '$lib/utils';
+ import { convertTorrentSeasonRangeToIntegerRange, formatSecondsToOptimalUnit } from '$lib/utils';
import { LoaderCircle } from 'lucide-svelte';
import * as Dialog from '$lib/components/ui/dialog/index.js';
import * as Tabs from '$lib/components/ui/tabs/index.js';
- import * as Select from '$lib/components/ui/select/index.js';
import * as Table from '$lib/components/ui/table/index.js';
import { Badge } from '$lib/components/ui/badge/index.js';
import client from '$lib/api';
import type { components } from '$lib/api/api';
+ import SelectFilePathSuffixDialog from '$lib/components/select-file-path-suffix-dialog.svelte';
let { show }: { show: components['schemas']['Show'] } = $props();
let dialogueState = $state(false);
@@ -90,13 +86,19 @@
}
return data;
}
+ $effect(() => {
+ if (show?.id) {
+ getTorrents(selectedSeasonNumber).then((fetchedTorrents) => {
+ if (!isLoadingTorrents) {
+ torrents = fetchedTorrents;
+ } else if (fetchedTorrents.length > 0 || torrentsError) {
+ torrents = fetchedTorrents;
+ }
+ });
+ }
+ });
-{#snippet saveDirectoryPreview(show: components['schemas']['Show'], filePathSuffix: string)}
- /{getFullyQualifiedMediaName(show)} [{show.metadata_provider}id-{show.external_id}]/ Season XX/{show.name}
- SXXEXX {filePathSuffix === '' ? '' : ' - ' + filePathSuffix}.mkv
-{/snippet}
-
Download Seasons
@@ -113,122 +115,68 @@
- {#if show?.seasons?.length > 0}
-
+ Enter a season number from 1 to {show.seasons.at(-1)?.number}
+
+
+
+
+
+
+ Enter the season's number you want to search for. The first, usually 1, or the last
+ season number usually yield the most season packs. Note that only Seasons which are
+ listed in the "Seasons" cell will be imported!
+
- The custom query will override the default search string like "The Simpsons Season 3".
- Note that only Seasons which are listed in the "Seasons" cell will be imported!
-
-
-
-
- This is necessary to differentiate between versions of the same season/show, for
- example a 1080p and a 4K version of a season.
-
- No season information available for this show.
-
- {/if}
+ Search
+
+
+
+ The custom query will override the default search string like "The Simpsons Season 3".
+ Note that only Seasons which are listed in the "Seasons" cell will be imported!
+