mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-25 02:05:11 +02:00
Fixed sonarr downloads not starting
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { fetchRadarrReleases } from '$lib/apis/radarr/radarrApi';
|
import { downloadRadarrMovie, fetchRadarrReleases } from '$lib/apis/radarr/radarrApi';
|
||||||
import { fetchSonarrReleases, fetchSonarrSeasonReleases } from '$lib/apis/sonarr/sonarrApi';
|
import {
|
||||||
|
downloadSonarrEpisode,
|
||||||
|
fetchSonarrReleases,
|
||||||
|
fetchSonarrSeasonReleases
|
||||||
|
} from '$lib/apis/sonarr/sonarrApi';
|
||||||
import { formatMinutesToTime, formatSize } from '$lib/utils';
|
import { formatMinutesToTime, formatSize } from '$lib/utils';
|
||||||
import { DotFilled, Download, Plus } from 'radix-icons-svelte';
|
import { DotFilled, Download, Plus } from 'radix-icons-svelte';
|
||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
@@ -64,16 +68,23 @@
|
|||||||
|
|
||||||
function handleDownload(guid: string) {
|
function handleDownload(guid: string) {
|
||||||
downloadFetchingGuid = guid;
|
downloadFetchingGuid = guid;
|
||||||
fetch('/movie/0/releases', {
|
if (radarrId) {
|
||||||
method: 'POST',
|
downloadRadarrMovie(guid).then((res) => {
|
||||||
body: JSON.stringify({ guid })
|
dispatch('download');
|
||||||
}).then((res) => {
|
downloadFetchingGuid = undefined;
|
||||||
dispatch('download');
|
if (res.response?.ok) {
|
||||||
downloadFetchingGuid = undefined;
|
downloadingGuid = guid;
|
||||||
if (res.ok) {
|
}
|
||||||
downloadingGuid = guid;
|
});
|
||||||
}
|
} else {
|
||||||
});
|
downloadSonarrEpisode(guid).then((res) => {
|
||||||
|
dispatch('download');
|
||||||
|
downloadFetchingGuid = undefined;
|
||||||
|
if (res.response?.ok) {
|
||||||
|
downloadingGuid = guid;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleShowAll() {
|
function toggleShowAll() {
|
||||||
|
|||||||
Reference in New Issue
Block a user