feat: show quality profile on request (#847)

* feat: backend fetch and return quality profile

* feat: show request profile name

* fix: wrong backend types

* feat: i18n keys

* fix: don't display quality profile if not set

* fix: remove development artifact

* fix: reduce parent div padding
This commit is contained in:
Oliver Laing
2024-08-01 14:59:45 +02:00
committed by GitHub
parent 36d98a2681
commit 64453320d3
9 changed files with 127 additions and 35 deletions

View File

@@ -8,3 +8,16 @@ interface PageInfo {
export interface PaginatedResponse {
pageInfo: PageInfo;
}
/**
* Get the keys of an object that are not functions
*/
type NonFunctionPropertyNames<T> = {
// eslint-disable-next-line @typescript-eslint/ban-types
[K in keyof T]: T[K] extends Function ? never : K;
}[keyof T];
/**
* Get the properties of an object that are not functions
*/
export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;

View File

@@ -1,9 +1,9 @@
import type { MediaType } from '@server/constants/media';
import type { MediaRequest } from '@server/entity/MediaRequest';
import type { PaginatedResponse } from './common';
import type { NonFunctionProperties, PaginatedResponse } from './common';
export interface RequestResultsResponse extends PaginatedResponse {
results: MediaRequest[];
results: NonFunctionProperties<MediaRequest>[];
}
export type MediaRequestBody = {
@@ -14,6 +14,7 @@ export type MediaRequestBody = {
is4k?: boolean;
serverId?: number;
profileId?: number;
profileName?: string;
rootFolder?: string;
languageProfileId?: number;
userId?: number;