import type { URL } from 'node:url'; import { Playable } from './base/playable.ts'; import type { ExtrasData, FullShowData, MovieData, ShowData } from './library.types.ts'; import { Chapter, Collection, CommonSenseMedia, Country, Director, Genre, Guid, Image, Marker, Media, Poster, Producer, Rating, Role, Similar, Writer } from './media.ts'; import type { ChapterSource, EpisodeMetadata, FullMovieResponse } from './video.types.ts'; declare abstract class Video extends Playable { /** Datetime this item was added to the library. */ addedAt: Date; /** Datetime item was last accessed. */ lastViewedAt?: Date; /** Hardcoded as 'video' (useful for search filters). */ listType: "video"; /** Summary of the artist, track, or album. */ summary: string; /** URL to thumbnail image. */ thumb: string; /** Title to use when sorting (defaults to title). */ titleSort?: string; /** Datetime this item was updated. */ updatedAt?: Date; /** Count of times this item was accessed. */ viewCount?: number; art?: string; grandparentArt?: string; /** Common Sense Media rating and advisory data, when returned by Plex. */ commonSenseMedia?: CommonSenseMedia; /** External GUID objects for this video item. */ guids: Guid[]; /** Image tags for this video item. */ images: Image[]; /** * BlurHash string for artwork image. */ artBlurHash?: string; /** * BlurHash string for thumbnail image. */ thumbBlurHash?: string; /** * Returns True if this video is watched. */ get isWatched(): boolean; /** * Return the first first thumbnail url starting on * the most specific thumbnail for that item. */ get thumbUrl(): URL; get artUrl(): URL; /** * Mark video as watched. */ markWatched(): Promise; /** * Mark video as unwatched. */ markUnwatched(): Promise; rate(rate: number): Promise; extras(): Promise; /** * Returns list of available Poster objects. */ posters(): Promise; /** * Set the poster for a Plex object. * @param poster The poster object to select. */ setPoster(poster: Poster): Promise; /** * I haven't tested this yet. It may not work. */ uploadPoster({ url, file, }?: { url?: string; file?: Uint8Array; }): Promise; protected _loadData(data: MovieData | ShowData | EpisodeMetadata): void; } /** * Represents a single Movie. */ export declare class Movie extends Video { TAG: string; TYPE: string; METADATA_TYPE: string; /** Audience rating (usually from Rotten Tomatoes). */ audienceRating?: number; /** Key to audience rating image (rottentomatoes://image.rating.spilled) */ audienceRatingImage?: string; /** Chapter source (agent; media; mixed). */ chapterSource?: ChapterSource; /** Content rating (PG-13; NR; TV-G). */ contentRating: string; /** Duration of movie in milliseconds. */ duration: number; /** Original title, often the foreign title (転々; 엽기적인 그녀). */ originalTitle?: string; /** YYYY-MM-DD movie was released. */ originallyAvailableAt: string; /** Primary extra key (/library/metadata/66351). */ primaryExtraKey: string; /** Movie rating (7.9; 9.8; 8.1). */ rating: number; /** Key to rating image (rottentomatoes://image.rating.rotten). */ ratingImage: string; /** Studio that created movie (Di Bonaventura Pictures; 21 Laps Entertainment). */ studio: string; /** Movie tag line (Back 2 Work; Who says men can't change?). */ tagline?: string; /** User rating (2.0; 8.0). */ userRating?: number; /** View offset in milliseconds. */ viewOffset: number; /** Plex GUID (com.plexapp.agents.imdb://tt4302938?lang=en) */ guid: string; directors: Director[]; countries: Country[]; writers: Writer[]; chapters?: Chapter[]; collections: Collection[]; genres: Genre[]; producers: Producer[]; roles: Role[]; similar: Similar[]; media: Media[]; guids: Guid[]; markers: Marker[]; ratings?: Rating[]; get actors(): Role[]; locations(): Promise; /** * Returns True if this movie has an intro marker */ hasIntroMarker(): Promise; /** * Returns True if this movie has a credits marker */ hasCreditsMarker(): Promise; protected _loadData(data: MovieData): void; protected _loadFullData(data: FullMovieResponse): void; } /** * Represents a single Show (including all seasons and episodes). */ export declare class Show extends Video { TAG: string; TYPE: string; METADATA_TYPE: string; /** Key to banner artwork (/library/metadata//art/) */ banner: string; /** Unknown. */ childCount: number; /** Content rating (PG-13; NR; TV-G). */ contentRating: string; /** <:class:`~plexapi.media.Collection`>): List of collections this media belongs. */ /** Duration of show in milliseconds. */ duration: number; /** Plex GUID (com.plexapp.agents.imdb://tt4302938?lang=en). */ guid: string; /** Plex index (?) */ index: number; /** Unknown. */ leafCount: number; /** Datetime show was released. */ originallyAvailableAt: Date; /** Show rating (7.9; 9.8; 8.1). */ rating: number; /** Studio that created show (Di Bonaventura Pictures; 21 Laps Entertainment). */ studio: string; /** Key to theme resource (/library/metadata//theme/) */ theme: string; /** Unknown. */ viewedLeafCount: number; /** List of genre objects. */ genres: Genre[]; /** List of role objects. */ roles: Role[]; /** <:class:`~plexapi.media.Similar`>): List of Similar objects. */ /** * Alias of {@link Show.roles} */ get actors(): Role[]; /** @returns True if this show is fully watched. */ get isWatched(): boolean; season(titleOrIndex: string | number): Promise; seasons(query?: Record): Promise; episode(args: { title: string; } | { season: number; episode: number; }): Promise; episodes(query?: Record): Promise; protected _loadData(data: ShowData): void; protected _loadFullData(data: FullShowData): void; } /** * Represents a single Show Season (including all episodes). */ export declare class Season extends Video { TAG: string; TYPE: string; METADATA_TYPE: string; /** Season number */ index: number; /** Number of episodes in season. */ leafCount: number; /** Key to this season */ parentKey: string; /** Rating key of the show this season belongs to */ parentRatingKey: string; /** Show title */ parentTitle: string; /** Number of watched episodes in season */ viewedLeafCount: number; /** Returns season number */ get seasonNumber(): number; /** Returns season number */ get isWatched(): boolean; /** * @returns a list of :class:`~plexapi.video.Episode` objects. */ episode(titleOrIndex: string | number): Promise; episodes(query?: Record): Promise; protected _loadData(data: ShowData): void; protected _loadFullData(data: ShowData): void; } export declare class Episode extends Video { static TAG: string; TYPE: string; METADATA_TYPE: string; /** Unknown (media). */ chapterSource?: string; /** Content rating (PG-13; NR; TV-G). */ contentRating: string; /** Duration of episode in milliseconds. */ duration: number; /** Key to this episodes :class:`~plexapi.video.Show`. */ grandparentKey: string; /** Unique key for this episodes :class:`~plexapi.video.Show`. */ grandparentRatingKey: string; /** Key to this episodes :class:`~plexapi.video.Show` theme. */ grandparentTheme: string; /** Key to this episodes :class:`~plexapi.video.Show` thumb. */ grandparentThumb: string; /** Title of this episodes :class:`~plexapi.video.Show`. */ grandparentTitle: string; /** Plex GUID (com.plexapp.agents.imdb://tt4302938?lang=en). */ guid: string; /** Episode number. */ index: number; /** Datetime episode was released. */ originallyAvailableAt: Date; /** Season number of episode. */ parentIndex: number; /** Key to this episodes :class:`~plexapi.video.Season`. */ parentKey: string; /** Unique key for this episodes :class:`~plexapi.video.Season`. */ parentRatingKey: string; /** Key to this episodes thumbnail. */ parentThumb: string; /** Name of this episode's season */ parentTitle: string; /** Movie rating (7.9; 9.8; 8.1). */ rating: number; /** View offset in milliseconds. */ viewOffset?: number; writers: Writer[]; directors: Director[]; media: Media[]; collections: Collection[]; chapters: Chapter[]; markers: Marker[]; /** * Returns this episodes season number. */ seasonNumber(): Promise; seasonEpisode(): Promise; season(): Promise; show(): Promise; locations(): string[]; /** * Returns True if this episode has an intro marker */ hasIntroMarker(): Promise; /** * Returns True if this episode has a credits marker */ hasCreditsMarker(): Promise; protected _loadData(data: EpisodeMetadata): void; protected _loadFullData(data: { Metadata: EpisodeMetadata[]; }): void; } export declare class Clip extends Video { static TAG: string; TYPE: string; METADATA_TYPE: string; protected _loadData(data: any): void; protected _loadFullData(data: any): void; } /** * Represents a single Extra (trailer, behindTheScenes, etc). */ export declare class Extra extends Clip { protected _loadData(data: ExtrasData): void; protected _loadFullData(data: any): void; } export {};