mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:43:28 +02:00
remove everything related to requests (#455)
This PR removes the requests feature. The functionality will be replaced either by Seerr or by reimplementing it in a better way.
This commit is contained in:
committed by
GitHub
parent
c2645000e5
commit
a643c9426d
1094
web/package-lock.json
generated
1094
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
518
web/src/lib/api/api.d.ts
vendored
518
web/src/lib/api/api.d.ts
vendored
@@ -530,74 +530,6 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/tv/seasons/requests': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Get Season Requests
|
||||
* @description Get all season requests.
|
||||
*/
|
||||
get: operations['get_season_requests_api_v1_tv_seasons_requests_get'];
|
||||
/**
|
||||
* Update Request
|
||||
* @description Update an existing season request.
|
||||
*/
|
||||
put: operations['update_request_api_v1_tv_seasons_requests_put'];
|
||||
/**
|
||||
* Request A Season
|
||||
* @description Create a new season request.
|
||||
*/
|
||||
post: operations['request_a_season_api_v1_tv_seasons_requests_post'];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/tv/seasons/requests/{season_request_id}': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
/**
|
||||
* Authorize Request
|
||||
* @description Authorize or de-authorize a season request.
|
||||
*/
|
||||
patch: operations['authorize_request_api_v1_tv_seasons_requests__season_request_id__patch'];
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/tv/seasons/requests/{request_id}': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
/**
|
||||
* Delete Season Request
|
||||
* @description Delete a season request.
|
||||
*/
|
||||
delete: operations['delete_season_request_api_v1_tv_seasons_requests__request_id__delete'];
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/tv/seasons/{season_id}': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -896,58 +828,6 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/movies/requests': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Get All Movie Requests
|
||||
* @description Get all movie requests.
|
||||
*/
|
||||
get: operations['get_all_movie_requests_api_v1_movies_requests_get'];
|
||||
put?: never;
|
||||
/**
|
||||
* Create Movie Request
|
||||
* @description Create a new movie request.
|
||||
*/
|
||||
post: operations['create_movie_request_api_v1_movies_requests_post'];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/movies/requests/{movie_request_id}': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
/**
|
||||
* Update Movie Request
|
||||
* @description Update an existing movie request.
|
||||
*/
|
||||
put: operations['update_movie_request_api_v1_movies_requests__movie_request_id__put'];
|
||||
post?: never;
|
||||
/**
|
||||
* Delete Movie Request
|
||||
* @description Delete a movie request.
|
||||
*/
|
||||
delete: operations['delete_movie_request_api_v1_movies_requests__movie_request_id__delete'];
|
||||
options?: never;
|
||||
head?: never;
|
||||
/**
|
||||
* Authorize Request
|
||||
* @description Authorize or de-authorize a movie request.
|
||||
*/
|
||||
patch: operations['authorize_request_api_v1_movies_requests__movie_request_id__patch'];
|
||||
trace?: never;
|
||||
};
|
||||
'/api/v1/movies/{movie_id}': {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -1283,26 +1163,6 @@ export interface components {
|
||||
/** Token */
|
||||
token: string;
|
||||
};
|
||||
/** CreateMovieRequest */
|
||||
CreateMovieRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Movie Id
|
||||
* Format: uuid
|
||||
*/
|
||||
movie_id: string;
|
||||
};
|
||||
/** CreateSeasonRequest */
|
||||
CreateSeasonRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Season Id
|
||||
* Format: uuid
|
||||
*/
|
||||
season_id: string;
|
||||
};
|
||||
/** Episode */
|
||||
Episode: {
|
||||
/**
|
||||
@@ -1432,33 +1292,6 @@ export interface components {
|
||||
/** Imdb Id */
|
||||
imdb_id?: string | null;
|
||||
};
|
||||
/** MovieRequest */
|
||||
MovieRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Id
|
||||
* Format: uuid
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Movie Id
|
||||
* Format: uuid
|
||||
*/
|
||||
movie_id: string;
|
||||
requested_by?: components['schemas']['UserRead'] | null;
|
||||
/**
|
||||
* Authorized
|
||||
* @default false
|
||||
*/
|
||||
authorized: boolean;
|
||||
authorized_by?: components['schemas']['UserRead'] | null;
|
||||
};
|
||||
/** MovieRequestBase */
|
||||
MovieRequestBase: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
};
|
||||
/** MovieTorrent */
|
||||
MovieTorrent: {
|
||||
/**
|
||||
@@ -1662,29 +1495,6 @@ export interface components {
|
||||
* @enum {integer}
|
||||
*/
|
||||
Quality: 1 | 2 | 3 | 4 | 5;
|
||||
/** RichMovieRequest */
|
||||
RichMovieRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Id
|
||||
* Format: uuid
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Movie Id
|
||||
* Format: uuid
|
||||
*/
|
||||
movie_id: string;
|
||||
requested_by?: components['schemas']['UserRead'] | null;
|
||||
/**
|
||||
* Authorized
|
||||
* @default false
|
||||
*/
|
||||
authorized: boolean;
|
||||
authorized_by?: components['schemas']['UserRead'] | null;
|
||||
movie: components['schemas']['Movie'];
|
||||
};
|
||||
/** RichMovieTorrent */
|
||||
RichMovieTorrent: {
|
||||
/**
|
||||
@@ -1701,30 +1511,6 @@ export interface components {
|
||||
/** Torrents */
|
||||
torrents: components['schemas']['MovieTorrent'][];
|
||||
};
|
||||
/** RichSeasonRequest */
|
||||
RichSeasonRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Id
|
||||
* Format: uuid
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Season Id
|
||||
* Format: uuid
|
||||
*/
|
||||
season_id: string;
|
||||
requested_by?: components['schemas']['UserRead'] | null;
|
||||
/**
|
||||
* Authorized
|
||||
* @default false
|
||||
*/
|
||||
authorized: boolean;
|
||||
authorized_by?: components['schemas']['UserRead'] | null;
|
||||
show: components['schemas']['Show'];
|
||||
season: components['schemas']['Season'];
|
||||
};
|
||||
/** RichSeasonTorrent */
|
||||
RichSeasonTorrent: {
|
||||
/**
|
||||
@@ -1846,16 +1632,6 @@ export interface components {
|
||||
* @enum {integer}
|
||||
*/
|
||||
TorrentStatus: 1 | 2 | 3 | 4;
|
||||
/** UpdateSeasonRequest */
|
||||
UpdateSeasonRequest: {
|
||||
min_quality: components['schemas']['Quality'];
|
||||
wanted_quality: components['schemas']['Quality'];
|
||||
/**
|
||||
* Id
|
||||
* Format: uuid
|
||||
*/
|
||||
id: string;
|
||||
};
|
||||
/** UserCreate */
|
||||
UserCreate: {
|
||||
/**
|
||||
@@ -1930,6 +1706,10 @@ export interface components {
|
||||
msg: string;
|
||||
/** Error Type */
|
||||
type: string;
|
||||
/** Input */
|
||||
input?: unknown;
|
||||
/** Context */
|
||||
ctx?: Record<string, never>;
|
||||
};
|
||||
};
|
||||
responses: never;
|
||||
@@ -3085,148 +2865,6 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
get_season_requests_api_v1_tv_seasons_requests_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['RichSeasonRequest'][];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
update_request_api_v1_tv_seasons_requests_put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': components['schemas']['UpdateSeasonRequest'];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
request_a_season_api_v1_tv_seasons_requests_post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': components['schemas']['CreateSeasonRequest'];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
authorize_request_api_v1_tv_seasons_requests__season_request_id__patch: {
|
||||
parameters: {
|
||||
query?: {
|
||||
authorized_status?: boolean;
|
||||
};
|
||||
header?: never;
|
||||
path: {
|
||||
season_request_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete_season_request_api_v1_tv_seasons_requests__request_id__delete: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
request_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_season_api_v1_tv_seasons__season_id__get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -3741,154 +3379,6 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
get_all_movie_requests_api_v1_movies_requests_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['RichMovieRequest'][];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
create_movie_request_api_v1_movies_requests_post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': components['schemas']['CreateMovieRequest'];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
201: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['MovieRequest'];
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
update_movie_request_api_v1_movies_requests__movie_request_id__put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
movie_request_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': components['schemas']['MovieRequestBase'];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['MovieRequest'];
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete_movie_request_api_v1_movies_requests__movie_request_id__delete: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
movie_request_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
authorize_request_api_v1_movies_requests__movie_request_id__patch: {
|
||||
parameters: {
|
||||
query?: {
|
||||
authorized_status?: boolean;
|
||||
};
|
||||
header?: never;
|
||||
path: {
|
||||
movie_request_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
204: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content?: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
'application/json': components['schemas']['HTTPValidationError'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_movie_by_id_api_v1_movies__movie_id__get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
{
|
||||
title: 'Torrents',
|
||||
url: resolve('/dashboard/tv/torrents', {})
|
||||
},
|
||||
{
|
||||
title: 'Requests',
|
||||
url: resolve('/dashboard/tv/requests', {})
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -54,10 +50,6 @@
|
||||
{
|
||||
title: 'Torrents',
|
||||
url: resolve('/dashboard/movies/torrents', {})
|
||||
},
|
||||
{
|
||||
title: 'Requests',
|
||||
url: resolve('/dashboard/movies/requests', {})
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { Button, buttonVariants } from '$lib/components/ui/button';
|
||||
import * as Dialog from '$lib/components/ui/dialog';
|
||||
import { Label } from '$lib/components/ui/label';
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import LoaderCircle from '@lucide/svelte/icons/loader-circle';
|
||||
import { getFullyQualifiedMediaName, getTorrentQualityString } from '$lib/utils.js';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import client from '$lib/api';
|
||||
import type { components } from '$lib/api/api';
|
||||
import { invalidateAll } from '$app/navigation';
|
||||
|
||||
let { movie }: { movie: components['schemas']['PublicMovie'] } = $props();
|
||||
let dialogOpen = $state(false);
|
||||
let minQuality = $state<string | undefined>(undefined);
|
||||
let wantedQuality = $state<string | undefined>(undefined);
|
||||
let isSubmittingRequest = $state(false);
|
||||
let submitRequestError = $state<string | null>(null);
|
||||
|
||||
const qualityValues: components['schemas']['Quality'][] = [1, 2, 3, 4];
|
||||
let qualityOptions = $derived(
|
||||
qualityValues.map((q) => ({ value: q.toString(), label: getTorrentQualityString(q) }))
|
||||
);
|
||||
let isFormInvalid = $derived(
|
||||
!minQuality || !wantedQuality || parseInt(wantedQuality) > parseInt(minQuality)
|
||||
);
|
||||
|
||||
async function handleRequestMovie() {
|
||||
isSubmittingRequest = true;
|
||||
submitRequestError = null;
|
||||
const { response } = await client.POST('/api/v1/movies/requests', {
|
||||
body: {
|
||||
movie_id: movie.id!,
|
||||
min_quality: parseInt(minQuality!) as components['schemas']['Quality'],
|
||||
wanted_quality: parseInt(wantedQuality!) as components['schemas']['Quality']
|
||||
}
|
||||
});
|
||||
isSubmittingRequest = false;
|
||||
|
||||
if (response.ok) {
|
||||
dialogOpen = false;
|
||||
minQuality = undefined;
|
||||
wantedQuality = undefined;
|
||||
toast.success('Movie request submitted successfully!');
|
||||
} else {
|
||||
toast.error('Failed to submit request');
|
||||
}
|
||||
await invalidateAll();
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open={dialogOpen}>
|
||||
<Dialog.Trigger
|
||||
class={buttonVariants({ variant: 'default' })}
|
||||
onclick={() => {
|
||||
dialogOpen = true;
|
||||
}}
|
||||
>
|
||||
Request Movie
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Content class="max-h-[90vh] w-fit min-w-[clamp(300px,50vw,600px)] overflow-y-auto">
|
||||
<Dialog.Header>
|
||||
<Dialog.Title>Request {getFullyQualifiedMediaName(movie)}</Dialog.Title>
|
||||
<Dialog.Description>Select desired qualities to submit a request.</Dialog.Description>
|
||||
</Dialog.Header>
|
||||
<div class="grid gap-4 py-4">
|
||||
<!-- Min Quality Select -->
|
||||
<div class="grid grid-cols-[1fr_3fr] items-center gap-4 md:grid-cols-[100px_1fr]">
|
||||
<Label class="text-right" for="min-quality">Min Quality</Label>
|
||||
<Select.Root bind:value={minQuality} type="single">
|
||||
<Select.Trigger class="w-full" id="min-quality">
|
||||
{minQuality ? getTorrentQualityString(parseInt(minQuality)) : 'Select Minimum Quality'}
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{#each qualityOptions as option (option.value)}
|
||||
<Select.Item value={option.value}>{option.label}</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
|
||||
<!-- Wanted Quality Select -->
|
||||
<div class="grid grid-cols-[1fr_3fr] items-center gap-4 md:grid-cols-[100px_1fr]">
|
||||
<Label class="text-right" for="wanted-quality">Wanted Quality</Label>
|
||||
<Select.Root bind:value={wantedQuality} type="single">
|
||||
<Select.Trigger class="w-full" id="wanted-quality">
|
||||
{wantedQuality
|
||||
? getTorrentQualityString(parseInt(wantedQuality))
|
||||
: 'Select Wanted Quality'}
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{#each qualityOptions as option (option.value)}
|
||||
<Select.Item value={option.value}>{option.label}</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
|
||||
{#if submitRequestError}
|
||||
<p class="col-span-full text-center text-sm text-red-500">{submitRequestError}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<Dialog.Footer>
|
||||
<Button disabled={isSubmittingRequest} onclick={() => (dialogOpen = false)} variant="outline"
|
||||
>Cancel
|
||||
</Button>
|
||||
<Button disabled={isFormInvalid || isSubmittingRequest} onclick={handleRequestMovie}>
|
||||
{#if isSubmittingRequest}
|
||||
<LoaderCircle class="mr-2 h-4 w-4 animate-spin" />
|
||||
Submitting...
|
||||
{:else}
|
||||
Submit Request
|
||||
{/if}
|
||||
</Button>
|
||||
</Dialog.Footer>
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
@@ -1,155 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { Button, buttonVariants } from '$lib/components/ui/button';
|
||||
import * as Dialog from '$lib/components/ui/dialog';
|
||||
import { Label } from '$lib/components/ui/label';
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import LoaderCircle from '@lucide/svelte/icons/loader-circle';
|
||||
import { getFullyQualifiedMediaName, getTorrentQualityString } from '$lib/utils.js';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import client from '$lib/api';
|
||||
import type { components } from '$lib/api/api';
|
||||
|
||||
let { show }: { show: components['schemas']['PublicShow'] } = $props();
|
||||
|
||||
let dialogOpen = $state(false);
|
||||
let selectedSeasonsIds = $state<string[]>([]);
|
||||
let minQuality = $state<string | undefined>(undefined);
|
||||
let wantedQuality = $state<string | undefined>(undefined);
|
||||
let isSubmittingRequest = $state(false);
|
||||
let submitRequestError = $state<string | null>(null);
|
||||
|
||||
const qualityValues: components['schemas']['Quality'][] = [1, 2, 3, 4];
|
||||
let qualityOptions = $derived(
|
||||
qualityValues.map((q) => ({ value: q.toString(), label: getTorrentQualityString(q) }))
|
||||
);
|
||||
let isFormInvalid = $derived(
|
||||
!selectedSeasonsIds ||
|
||||
selectedSeasonsIds.length === 0 ||
|
||||
!minQuality ||
|
||||
!wantedQuality ||
|
||||
parseInt(wantedQuality) > parseInt(minQuality)
|
||||
);
|
||||
|
||||
async function handleRequestSeason() {
|
||||
isSubmittingRequest = true;
|
||||
submitRequestError = null;
|
||||
|
||||
for (const id of selectedSeasonsIds) {
|
||||
const { response, error } = await client.POST('/api/v1/tv/seasons/requests', {
|
||||
body: {
|
||||
season_id: id,
|
||||
min_quality: parseInt(minQuality!) as components['schemas']['Quality'],
|
||||
wanted_quality: parseInt(wantedQuality!) as components['schemas']['Quality']
|
||||
}
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
toast.error('Failed to submit request: ' + error);
|
||||
submitRequestError = `Failed to submit request for season ID ${id}: ${error}`;
|
||||
}
|
||||
}
|
||||
|
||||
if (!submitRequestError) {
|
||||
dialogOpen = false;
|
||||
// Reset form fields
|
||||
selectedSeasonsIds = [];
|
||||
minQuality = undefined;
|
||||
wantedQuality = undefined;
|
||||
toast.success('Season request(s) submitted successfully!');
|
||||
}
|
||||
|
||||
isSubmittingRequest = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open={dialogOpen}>
|
||||
<Dialog.Trigger
|
||||
class={buttonVariants({ variant: 'default' })}
|
||||
onclick={() => {
|
||||
dialogOpen = true;
|
||||
}}
|
||||
>
|
||||
Request Season
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Content class="max-h-[90vh] w-fit min-w-[clamp(300px,50vw,600px)] overflow-y-auto">
|
||||
<Dialog.Header>
|
||||
<Dialog.Title>Request a Season for {getFullyQualifiedMediaName(show)}</Dialog.Title>
|
||||
<Dialog.Description>
|
||||
Select a season and desired qualities to submit a request.
|
||||
</Dialog.Description>
|
||||
</Dialog.Header>
|
||||
<div class="grid gap-4 py-4">
|
||||
<!-- Season Select -->
|
||||
<div class="grid grid-cols-[1fr_3fr] items-center gap-4 md:grid-cols-[100px_1fr]">
|
||||
<Label class="text-right" for="season">Season</Label>
|
||||
<Select.Root bind:value={selectedSeasonsIds} type="multiple">
|
||||
<Select.Trigger class="w-full" id="season">
|
||||
{#each selectedSeasonsIds as seasonId (seasonId)}
|
||||
{#if show.seasons.find((season) => season.id === seasonId)}
|
||||
Season {show.seasons.find((season) => season.id === seasonId)?.number},
|
||||
{/if}
|
||||
{:else}
|
||||
Select one or more seasons
|
||||
{/each}
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{#each show.seasons as season (season.id)}
|
||||
<Select.Item value={season.id || ''}>
|
||||
Season {season.number}{season.name ? `: ${season.name}` : ''}
|
||||
</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
|
||||
<!-- Min Quality Select -->
|
||||
<div class="grid grid-cols-[1fr_3fr] items-center gap-4 md:grid-cols-[100px_1fr]">
|
||||
<Label class="text-right" for="min-quality">Min Quality</Label>
|
||||
<Select.Root bind:value={minQuality} type="single">
|
||||
<Select.Trigger class="w-full" id="min-quality">
|
||||
{minQuality ? getTorrentQualityString(parseInt(minQuality)) : 'Select Minimum Quality'}
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{#each qualityOptions as option (option.value)}
|
||||
<Select.Item value={option.value}>{option.label}</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
|
||||
<!-- Wanted Quality Select -->
|
||||
<div class="grid grid-cols-[1fr_3fr] items-center gap-4 md:grid-cols-[100px_1fr]">
|
||||
<Label class="text-right" for="wanted-quality">Wanted Quality</Label>
|
||||
<Select.Root bind:value={wantedQuality} type="single">
|
||||
<Select.Trigger class="w-full" id="wanted-quality">
|
||||
{wantedQuality
|
||||
? getTorrentQualityString(parseInt(wantedQuality))
|
||||
: 'Select Wanted Quality'}
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{#each qualityOptions as option (option.value)}
|
||||
<Select.Item value={option.value}>{option.label}</Select.Item>
|
||||
{/each}
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
|
||||
{#if submitRequestError}
|
||||
<p class="col-span-full text-center text-sm text-red-500">{submitRequestError}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<Dialog.Footer>
|
||||
<Button disabled={isSubmittingRequest} onclick={() => (dialogOpen = false)} variant="outline"
|
||||
>Cancel
|
||||
</Button>
|
||||
<Button disabled={isFormInvalid || isSubmittingRequest} onclick={handleRequestSeason}>
|
||||
{#if isSubmittingRequest}
|
||||
<LoaderCircle class="mr-2 h-4 w-4 animate-spin" />
|
||||
Submitting...
|
||||
{:else}
|
||||
Submit Request
|
||||
{/if}
|
||||
</Button>
|
||||
</Dialog.Footer>
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
@@ -1,227 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { getFullyQualifiedMediaName, getTorrentQualityString } from '$lib/utils.js';
|
||||
import CheckmarkX from '$lib/components/checkmark-x.svelte';
|
||||
import type { components } from '$lib/api/api';
|
||||
|
||||
import * as Table from '$lib/components/ui/table';
|
||||
import { getContext } from 'svelte';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { goto, invalidateAll } from '$app/navigation';
|
||||
import { resolve } from '$app/paths';
|
||||
import client from '$lib/api';
|
||||
|
||||
let {
|
||||
requests,
|
||||
filter = () => true,
|
||||
isShow = true
|
||||
}: {
|
||||
requests: (
|
||||
| components['schemas']['RichSeasonRequest']
|
||||
| components['schemas']['RichMovieRequest']
|
||||
)[];
|
||||
filter?: (
|
||||
request:
|
||||
| components['schemas']['RichSeasonRequest']
|
||||
| components['schemas']['RichMovieRequest']
|
||||
) => boolean;
|
||||
isShow: boolean;
|
||||
} = $props();
|
||||
const user: () => components['schemas']['UserRead'] = getContext('user');
|
||||
async function approveRequest(requestId: string, currentAuthorizedStatus: boolean) {
|
||||
let response;
|
||||
if (isShow) {
|
||||
const data = await client.PATCH('/api/v1/tv/seasons/requests/{season_request_id}', {
|
||||
params: {
|
||||
path: {
|
||||
season_request_id: requestId
|
||||
},
|
||||
query: {
|
||||
authorized_status: !currentAuthorizedStatus
|
||||
}
|
||||
}
|
||||
});
|
||||
response = data.response;
|
||||
} else {
|
||||
const data = await client.PATCH('/api/v1/movies/requests/{movie_request_id}', {
|
||||
params: {
|
||||
path: {
|
||||
movie_request_id: requestId
|
||||
},
|
||||
query: {
|
||||
authorized_status: !currentAuthorizedStatus
|
||||
}
|
||||
}
|
||||
});
|
||||
response = data.response;
|
||||
}
|
||||
if (response.ok) {
|
||||
toast.success(
|
||||
`Request ${!currentAuthorizedStatus ? 'approved' : 'unapproved'} successfully.`
|
||||
);
|
||||
} else {
|
||||
const errorText = await response.text();
|
||||
console.error(`Failed to update request status ${response.statusText}`, errorText);
|
||||
toast.error(`Failed to update request status: ${response.statusText}`);
|
||||
}
|
||||
await invalidateAll();
|
||||
}
|
||||
|
||||
async function deleteRequest(requestId: string) {
|
||||
if (
|
||||
!window.confirm(
|
||||
'Are you sure you want to delete this season request? This action cannot be undone.'
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
let response;
|
||||
if (isShow) {
|
||||
const data = await client.DELETE('/api/v1/tv/seasons/requests/{request_id}', {
|
||||
params: {
|
||||
path: {
|
||||
request_id: requestId
|
||||
}
|
||||
}
|
||||
});
|
||||
response = data.response;
|
||||
} else {
|
||||
const data = await client.DELETE('/api/v1/movies/requests/{movie_request_id}', {
|
||||
params: {
|
||||
path: {
|
||||
movie_request_id: requestId
|
||||
}
|
||||
}
|
||||
});
|
||||
response = data.response;
|
||||
}
|
||||
if (response.ok) {
|
||||
toast.success('Request deleted successfully');
|
||||
} else {
|
||||
console.error(`Failed to delete request ${response.statusText}`, await response.text());
|
||||
toast.error('Failed to delete request');
|
||||
}
|
||||
await invalidateAll();
|
||||
}
|
||||
</script>
|
||||
|
||||
<Table.Root>
|
||||
<Table.Caption>A list of all requests.</Table.Caption>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.Head>{isShow ? 'Show' : 'Movie'}</Table.Head>
|
||||
{#if isShow}
|
||||
<Table.Head>Season</Table.Head>
|
||||
{/if}
|
||||
<Table.Head>Minimum Quality</Table.Head>
|
||||
<Table.Head>Wanted Quality</Table.Head>
|
||||
<Table.Head>Requested by</Table.Head>
|
||||
<Table.Head>Approved</Table.Head>
|
||||
<Table.Head>Approved by</Table.Head>
|
||||
<Table.Head>Actions</Table.Head>
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
<Table.Body>
|
||||
{#each requests as request (request.id)}
|
||||
{#if filter(request)}
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
{#if isShow}
|
||||
<a
|
||||
href={resolve('/dashboard/tv/[showId]', {
|
||||
showId: (request as components['schemas']['RichSeasonRequest']).show.id!
|
||||
})}
|
||||
class="text-primary hover:underline"
|
||||
>
|
||||
{getFullyQualifiedMediaName(
|
||||
(request as components['schemas']['RichSeasonRequest']).show
|
||||
)}
|
||||
</a>
|
||||
{:else}
|
||||
<a
|
||||
href={resolve('/dashboard/movies/[movieId]', {
|
||||
movieId: (request as components['schemas']['RichMovieRequest']).movie.id!
|
||||
})}
|
||||
class="text-primary hover:underline"
|
||||
>
|
||||
{getFullyQualifiedMediaName(
|
||||
(request as components['schemas']['RichMovieRequest']).movie
|
||||
)}
|
||||
</a>
|
||||
{/if}
|
||||
</Table.Cell>
|
||||
{#if isShow}
|
||||
<Table.Cell>
|
||||
{(request as components['schemas']['RichSeasonRequest']).season.number}
|
||||
</Table.Cell>
|
||||
{/if}
|
||||
<Table.Cell>
|
||||
{getTorrentQualityString(request.min_quality)}
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
{getTorrentQualityString(request.wanted_quality)}
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
{request.requested_by?.email ?? 'N/A'}
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<CheckmarkX state={request.authorized} />
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
{request.authorized_by?.email ?? 'N/A'}
|
||||
</Table.Cell>
|
||||
<!-- TODO: ADD DIALOGUE TO MODIFY REQUEST -->
|
||||
<Table.Cell class="flex max-w-[150px] flex-col gap-1">
|
||||
{#if user().is_superuser}
|
||||
<Button
|
||||
class=""
|
||||
size="sm"
|
||||
onclick={() => approveRequest(request.id!, request.authorized)}
|
||||
>
|
||||
{request.authorized ? 'Unapprove' : 'Approve'}
|
||||
</Button>
|
||||
{#if isShow}
|
||||
<Button
|
||||
class=""
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onclick={() =>
|
||||
goto(
|
||||
resolve('/dashboard/tv/[showId]', {
|
||||
showId: (request as components['schemas']['RichSeasonRequest']).show.id!
|
||||
})
|
||||
)}
|
||||
>
|
||||
Download manually
|
||||
</Button>
|
||||
{:else}
|
||||
<Button
|
||||
class=""
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onclick={() =>
|
||||
goto(
|
||||
resolve('/dashboard/movies/[movieId]', {
|
||||
movieId: (request as components['schemas']['RichMovieRequest']).movie.id!
|
||||
})
|
||||
)}
|
||||
>
|
||||
Download manually
|
||||
</Button>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if user().is_superuser || user().id === request.requested_by?.id}
|
||||
<Button variant="destructive" size="sm" onclick={() => deleteRequest(request.id!)}
|
||||
>Delete
|
||||
</Button>
|
||||
{/if}
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
{/if}
|
||||
{:else}
|
||||
<Table.Row>
|
||||
<Table.Cell colspan={8} class="text-center">There are currently no requests.</Table.Cell>
|
||||
</Table.Row>
|
||||
{/each}
|
||||
</Table.Body>
|
||||
</Table.Root>
|
||||
@@ -11,7 +11,6 @@
|
||||
import TorrentTable from '$lib/components/torrents/torrent-table.svelte';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import DownloadMovieDialog from '$lib/components/download-dialogs/download-movie-dialog.svelte';
|
||||
import RequestMovieDialog from '$lib/components/requests/request-movie-dialog.svelte';
|
||||
import LibraryCombobox from '$lib/components/library-combobox.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
@@ -108,7 +107,6 @@
|
||||
{#if user().is_superuser}
|
||||
<DownloadMovieDialog {movie} />
|
||||
{/if}
|
||||
<RequestMovieDialog {movie} />
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
</div>
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { Separator } from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import RequestsTable from '$lib/components/requests/requests-table.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
|
||||
let requests = $derived(page.data.requestsData);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Movie Requests - MediaManager</title>
|
||||
<meta content="View and manage movie download requests in MediaManager" name="description" />
|
||||
</svelte:head>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1" />
|
||||
<Separator class="mr-2 h-4" orientation="vertical" />
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href={resolve('/dashboard', {})}>MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href={resolve('/dashboard', {})}>Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href={resolve('/dashboard/movies', {})}>Movies</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Movie Requests</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="mx-auto flex w-full flex-1 flex-col gap-4 p-4 md:max-w-[80em]">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Movie Requests
|
||||
</h1>
|
||||
<RequestsTable {requests} isShow={false} />
|
||||
</main>
|
||||
@@ -1,10 +0,0 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import client from '$lib/api';
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const { data } = await client.GET('/api/v1/movies/requests', { fetch: fetch });
|
||||
|
||||
return {
|
||||
requestsData: data
|
||||
};
|
||||
};
|
||||
@@ -15,7 +15,6 @@
|
||||
import CheckmarkX from '$lib/components/checkmark-x.svelte';
|
||||
import { page } from '$app/state';
|
||||
import TorrentTable from '$lib/components/torrents/torrent-table.svelte';
|
||||
import RequestSeasonDialog from '$lib/components/requests/request-season-dialog.svelte';
|
||||
import MediaPicture from '$lib/components/media-picture.svelte';
|
||||
import { Switch } from '$lib/components/ui/switch/index.js';
|
||||
import { toast } from 'svelte-sonner';
|
||||
@@ -241,7 +240,6 @@
|
||||
<DownloadCustomDialog {show} />
|
||||
{/if}
|
||||
{/if}
|
||||
<RequestSeasonDialog {show} />
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
</div>
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { Separator } from '$lib/components/ui/separator/index.js';
|
||||
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
|
||||
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
|
||||
import RequestsTable from '$lib/components/requests/requests-table.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
import type { components } from '$lib/api/api';
|
||||
|
||||
let requests: components['schemas']['RichSeasonRequest'][] = $derived(page.data.requestsData);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>TV Show Requests - MediaManager</title>
|
||||
<meta content="View and manage TV show download requests in MediaManager" name="description" />
|
||||
</svelte:head>
|
||||
|
||||
<header class="flex h-16 shrink-0 items-center gap-2">
|
||||
<div class="flex items-center gap-2 px-4">
|
||||
<Sidebar.Trigger class="-ml-1" />
|
||||
<Separator class="mr-2 h-4" orientation="vertical" />
|
||||
<Breadcrumb.Root>
|
||||
<Breadcrumb.List>
|
||||
<Breadcrumb.Item class="hidden md:block">
|
||||
<Breadcrumb.Link href={resolve('/dashboard', {})}>MediaManager</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href={resolve('/dashboard', {})}>Home</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Link href={resolve('/dashboard/tv', {})}>Shows</Breadcrumb.Link>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Separator class="hidden md:block" />
|
||||
<Breadcrumb.Item>
|
||||
<Breadcrumb.Page>Season Requests</Breadcrumb.Page>
|
||||
</Breadcrumb.Item>
|
||||
</Breadcrumb.List>
|
||||
</Breadcrumb.Root>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="mx-auto flex w-full flex-1 flex-col gap-4 p-4 md:max-w-[80em]">
|
||||
<h1 class="scroll-m-20 text-center text-4xl font-extrabold tracking-tight lg:text-5xl">
|
||||
Season Requests
|
||||
</h1>
|
||||
<RequestsTable {requests} isShow={true} />
|
||||
</main>
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import client from '$lib/api';
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const { data } = await client.GET('/api/v1/tv/seasons/requests', { fetch: fetch });
|
||||
return {
|
||||
requestsData: data
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user