jellyfin-discord-bot/server/jellyfin/models/LibraryOptions.ts

294 lines
11 KiB
TypeScript
Raw Normal View History

2023-05-04 23:34:53 +02:00
/* tslint:disable */
/* eslint-disable */
/**
* Jellyfin API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 10.8.9
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import type { EmbeddedSubtitleOptions } from './EmbeddedSubtitleOptions';
import {
EmbeddedSubtitleOptionsFromJSON,
EmbeddedSubtitleOptionsFromJSONTyped,
EmbeddedSubtitleOptionsToJSON,
} from './EmbeddedSubtitleOptions';
import type { MediaPathInfo } from './MediaPathInfo';
import {
MediaPathInfoFromJSON,
MediaPathInfoFromJSONTyped,
MediaPathInfoToJSON,
} from './MediaPathInfo';
import type { TypeOptions } from './TypeOptions';
import {
TypeOptionsFromJSON,
TypeOptionsFromJSONTyped,
TypeOptionsToJSON,
} from './TypeOptions';
/**
*
* @export
* @interface LibraryOptions
*/
export interface LibraryOptions {
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enablePhotos?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enableRealtimeMonitor?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enableChapterImageExtraction?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
extractChapterImagesDuringLibraryScan?: boolean;
/**
*
* @type {Array<MediaPathInfo>}
* @memberof LibraryOptions
*/
pathInfos?: Array<MediaPathInfo>;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
saveLocalMetadata?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
* @deprecated
*/
enableInternetProviders?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enableAutomaticSeriesGrouping?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enableEmbeddedTitles?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
enableEmbeddedEpisodeInfos?: boolean;
/**
*
* @type {number}
* @memberof LibraryOptions
*/
automaticRefreshIntervalDays?: number;
/**
* Gets or sets the preferred metadata language.
* @type {string}
* @memberof LibraryOptions
*/
preferredMetadataLanguage?: string | null;
/**
* Gets or sets the metadata country code.
* @type {string}
* @memberof LibraryOptions
*/
metadataCountryCode?: string | null;
/**
*
* @type {string}
* @memberof LibraryOptions
*/
seasonZeroDisplayName?: string;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
metadataSavers?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
disabledLocalMetadataReaders?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
localMetadataReaderOrder?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
disabledSubtitleFetchers?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
subtitleFetcherOrder?: Array<string>;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
skipSubtitlesIfEmbeddedSubtitlesPresent?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
skipSubtitlesIfAudioTrackMatches?: boolean;
/**
*
* @type {Array<string>}
* @memberof LibraryOptions
*/
subtitleDownloadLanguages?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
requirePerfectSubtitleMatch?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
saveSubtitlesWithMedia?: boolean;
/**
*
* @type {boolean}
* @memberof LibraryOptions
*/
automaticallyAddToCollection?: boolean;
/**
*
* @type {EmbeddedSubtitleOptions}
* @memberof LibraryOptions
*/
allowEmbeddedSubtitles?: EmbeddedSubtitleOptions;
/**
*
* @type {Array<TypeOptions>}
* @memberof LibraryOptions
*/
typeOptions?: Array<TypeOptions>;
}
/**
* Check if a given object implements the LibraryOptions interface.
*/
export function instanceOfLibraryOptions(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function LibraryOptionsFromJSON(json: any): LibraryOptions {
return LibraryOptionsFromJSONTyped(json, false);
}
export function LibraryOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LibraryOptions {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'enablePhotos': !exists(json, 'EnablePhotos') ? undefined : json['EnablePhotos'],
'enableRealtimeMonitor': !exists(json, 'EnableRealtimeMonitor') ? undefined : json['EnableRealtimeMonitor'],
'enableChapterImageExtraction': !exists(json, 'EnableChapterImageExtraction') ? undefined : json['EnableChapterImageExtraction'],
'extractChapterImagesDuringLibraryScan': !exists(json, 'ExtractChapterImagesDuringLibraryScan') ? undefined : json['ExtractChapterImagesDuringLibraryScan'],
'pathInfos': !exists(json, 'PathInfos') ? undefined : ((json['PathInfos'] as Array<any>).map(MediaPathInfoFromJSON)),
'saveLocalMetadata': !exists(json, 'SaveLocalMetadata') ? undefined : json['SaveLocalMetadata'],
'enableInternetProviders': !exists(json, 'EnableInternetProviders') ? undefined : json['EnableInternetProviders'],
'enableAutomaticSeriesGrouping': !exists(json, 'EnableAutomaticSeriesGrouping') ? undefined : json['EnableAutomaticSeriesGrouping'],
'enableEmbeddedTitles': !exists(json, 'EnableEmbeddedTitles') ? undefined : json['EnableEmbeddedTitles'],
'enableEmbeddedEpisodeInfos': !exists(json, 'EnableEmbeddedEpisodeInfos') ? undefined : json['EnableEmbeddedEpisodeInfos'],
'automaticRefreshIntervalDays': !exists(json, 'AutomaticRefreshIntervalDays') ? undefined : json['AutomaticRefreshIntervalDays'],
'preferredMetadataLanguage': !exists(json, 'PreferredMetadataLanguage') ? undefined : json['PreferredMetadataLanguage'],
'metadataCountryCode': !exists(json, 'MetadataCountryCode') ? undefined : json['MetadataCountryCode'],
'seasonZeroDisplayName': !exists(json, 'SeasonZeroDisplayName') ? undefined : json['SeasonZeroDisplayName'],
'metadataSavers': !exists(json, 'MetadataSavers') ? undefined : json['MetadataSavers'],
'disabledLocalMetadataReaders': !exists(json, 'DisabledLocalMetadataReaders') ? undefined : json['DisabledLocalMetadataReaders'],
'localMetadataReaderOrder': !exists(json, 'LocalMetadataReaderOrder') ? undefined : json['LocalMetadataReaderOrder'],
'disabledSubtitleFetchers': !exists(json, 'DisabledSubtitleFetchers') ? undefined : json['DisabledSubtitleFetchers'],
'subtitleFetcherOrder': !exists(json, 'SubtitleFetcherOrder') ? undefined : json['SubtitleFetcherOrder'],
'skipSubtitlesIfEmbeddedSubtitlesPresent': !exists(json, 'SkipSubtitlesIfEmbeddedSubtitlesPresent') ? undefined : json['SkipSubtitlesIfEmbeddedSubtitlesPresent'],
'skipSubtitlesIfAudioTrackMatches': !exists(json, 'SkipSubtitlesIfAudioTrackMatches') ? undefined : json['SkipSubtitlesIfAudioTrackMatches'],
'subtitleDownloadLanguages': !exists(json, 'SubtitleDownloadLanguages') ? undefined : json['SubtitleDownloadLanguages'],
'requirePerfectSubtitleMatch': !exists(json, 'RequirePerfectSubtitleMatch') ? undefined : json['RequirePerfectSubtitleMatch'],
'saveSubtitlesWithMedia': !exists(json, 'SaveSubtitlesWithMedia') ? undefined : json['SaveSubtitlesWithMedia'],
'automaticallyAddToCollection': !exists(json, 'AutomaticallyAddToCollection') ? undefined : json['AutomaticallyAddToCollection'],
'allowEmbeddedSubtitles': !exists(json, 'AllowEmbeddedSubtitles') ? undefined : EmbeddedSubtitleOptionsFromJSON(json['AllowEmbeddedSubtitles']),
'typeOptions': !exists(json, 'TypeOptions') ? undefined : ((json['TypeOptions'] as Array<any>).map(TypeOptionsFromJSON)),
};
}
export function LibraryOptionsToJSON(value?: LibraryOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'EnablePhotos': value.enablePhotos,
'EnableRealtimeMonitor': value.enableRealtimeMonitor,
'EnableChapterImageExtraction': value.enableChapterImageExtraction,
'ExtractChapterImagesDuringLibraryScan': value.extractChapterImagesDuringLibraryScan,
'PathInfos': value.pathInfos === undefined ? undefined : ((value.pathInfos as Array<any>).map(MediaPathInfoToJSON)),
'SaveLocalMetadata': value.saveLocalMetadata,
'EnableInternetProviders': value.enableInternetProviders,
'EnableAutomaticSeriesGrouping': value.enableAutomaticSeriesGrouping,
'EnableEmbeddedTitles': value.enableEmbeddedTitles,
'EnableEmbeddedEpisodeInfos': value.enableEmbeddedEpisodeInfos,
'AutomaticRefreshIntervalDays': value.automaticRefreshIntervalDays,
'PreferredMetadataLanguage': value.preferredMetadataLanguage,
'MetadataCountryCode': value.metadataCountryCode,
'SeasonZeroDisplayName': value.seasonZeroDisplayName,
'MetadataSavers': value.metadataSavers,
'DisabledLocalMetadataReaders': value.disabledLocalMetadataReaders,
'LocalMetadataReaderOrder': value.localMetadataReaderOrder,
'DisabledSubtitleFetchers': value.disabledSubtitleFetchers,
'SubtitleFetcherOrder': value.subtitleFetcherOrder,
'SkipSubtitlesIfEmbeddedSubtitlesPresent': value.skipSubtitlesIfEmbeddedSubtitlesPresent,
'SkipSubtitlesIfAudioTrackMatches': value.skipSubtitlesIfAudioTrackMatches,
'SubtitleDownloadLanguages': value.subtitleDownloadLanguages,
'RequirePerfectSubtitleMatch': value.requirePerfectSubtitleMatch,
'SaveSubtitlesWithMedia': value.saveSubtitlesWithMedia,
'AutomaticallyAddToCollection': value.automaticallyAddToCollection,
'AllowEmbeddedSubtitles': EmbeddedSubtitleOptionsToJSON(value.allowEmbeddedSubtitles),
'TypeOptions': value.typeOptions === undefined ? undefined : ((value.typeOptions as Array<any>).map(TypeOptionsToJSON)),
};
}