fix: Episode page file requesting

This commit is contained in:
Aleksi Lassila
2024-06-08 16:56:09 +03:00
parent 88f1be68d5
commit 711fcd5e7f
8 changed files with 50 additions and 118 deletions

View File

@@ -28,7 +28,7 @@
export let title: string;
export let modalId: symbol;
export let onComplete: () => void = () => {};
export let onComplete: (() => void) | (() => Promise<any>) = () => Promise.resolve();
$: backgroundUrl = TMDB_BACKDROP_SMALL + backdropUri;
let tab: 'add-to-sonarr' | 'root-folders' | 'quality-profiles' | 'monitor-settings' =
@@ -63,7 +63,7 @@
});
addOptionsStore.subscribe(() => (tab = 'add-to-sonarr'));
function handleAddToSonarr() {
async function handleAddToSonarr() {
return sonarrApi
.addToSonarr(tmdbId as number, {
rootFolderPath: $addOptionsStore.rootFolderPath || undefined,
@@ -73,7 +73,7 @@
.then((success) => {
if (success) {
modalStack.close(modalId);
onComplete();
return onComplete();
}
});
}