import type { Section } from '../library.ts'; import { SearchResult } from '../search.ts'; import type { HistoryOptions } from '../server.types.ts'; import { PlexObject } from './plexObject.ts'; export declare abstract class PartialPlexObject extends PlexObject { _INCLUDES: { checkFiles: number; includeAllConcerts: number; includeBandwidths: number; includeChapters: number; includeChildren: number; includeConcerts: number; includeExternalMedia: number; includeExtras: number; includeFields: string; includeGeolocation: number; includeLoudnessRamps: number; includeMarkers: number; includeOnDeck: number; includePopularLeaves: number; includePreferences: number; includeRelated: number; includeRelatedCount: number; includeReviews: number; includeStations: number; }; ratingKey?: string; title?: string; type?: string; year?: number; librarySectionID?: number; protected _detailsKey: string; /** * Tell Plex Media Server to performs analysis on it this item to gather * information. Analysis includes: * * Gather Media Properties: All of the media you add to a Library has * properties that are useful to know–whether it's a video file, a * music track, or one of your photos (container, codec, resolution, etc). * * Generate Default Artwork: Artwork will automatically be grabbed from a * video file. A background image will be pulled out as well as a * smaller image to be used for poster/thumbnail type purposes. * * Generate Video Preview Thumbnails: Video preview thumbnails are created, * if you have that feature enabled. Video preview thumbnails allow * graphical seeking in some Apps. It's also used in the Plex Web App Now * Playing screen to show a graphical representation of where playback * is. Video preview thumbnails creation is a CPU-intensive process akin * to transcoding the file. * * Generate intro video markers: Detects show intros, exposing the * 'Skip Intro' button in clients. */ analyze(): Promise; /** * load full data / reload the data for this object from this.key. */ reload(ekey?: string, args?: any): Promise; /** * Retruns True if this is already a full object. A full object means all attributes * were populated from the api path representing only this item. For example, the * search result for a movie often only contain a portion of the attributes a full * object (main url) for that movie would contain. */ get isFullObject(): boolean; /** * Use match result to update show metadata. * @param options Match options. */ fixMatch({ searchResult, auto, agent, }?: { searchResult?: SearchResult; auto?: boolean; agent?: string; }): Promise; /** * @param options Match options. * * Examples: * 1. video.matches() * 2. video.matches({ title: "something", year: "2020" }) * 3. video.matches({ title: "something" }) * 4. video.matches({ year: "2020" }) * 5. video.matches({ title: "something", year: "" }) * 6. video.matches({ title: "", year: "2020" }) * 7. video.matches({ title: "", year: "" }) * * 1. The default behaviour in Plex Web = no params in plexapi * 2. Both title and year specified by user * 3. Year automatically filled in * 4. Title automatically filled in * 5. Explicitly searches for title with blank year * 6. Explicitly searches for blank title with year * 7. I don't know what the user is thinking... return the same result as 1 * * For 2 to 7, the agent and language is automatically filled in */ matches({ agent, title, year, language, }?: { agent?: string; title?: string; year?: string; language?: string; }): Promise; /** Unmatches metadata match from object. */ unmatch(): Promise; /** * Get Play History for a media item. * @param options Filter and paging options. */ history(options?: Omit): Promise; section(): Promise
; /** * Delete a media element. This has to be enabled under settings > server > library in plex webui. */ delete(): Promise; /** Add a collection(s). */ addCollection(collections: string[]): Promise; /** Remove a collection(s). */ removeCollection(collections: string[]): Promise; /** Add a label(s). */ addLabel(labels: string[]): Promise; /** Remove a label(s). */ removeLabel(labels: string[]): Promise; /** Add a genre(s). */ addGenre(genres: string[]): Promise; /** Remove a genre(s). */ removeGenre(genres: string[]): Promise; getWebURL({ base }?: { base?: string; }): string; /** * Edit an object. * @param changeObj Obj of settings to edit. * Example: * {'type': 1, * 'id': movie.ratingKey, * 'title.value': 'New Title', * 'collection[0].tag.tag': 'Super', * 'collection.locked': 0} */ edit(changeObj: Record): Promise; /** Set the title. */ editTitle(title: string): Promise; /** Set the sort title. */ editSortTitle(sortTitle: string): Promise; /** Set the summary. */ editSummary(summary: string): Promise; /** Set the content rating (e.g. PG-13, R, TV-MA). */ editContentRating(contentRating: string): Promise; /** Set the studio. */ editStudio(studio: string): Promise; /** Set the originally available at date (release date). */ editOriginallyAvailableAt(date: string): Promise; protected abstract _loadFullData(data: any): void; /** * Get the Plex Web URL with the correct parameters. * Private method to allow overriding parameters from subclasses. */ private _getWebURL; /** * Helper to edit and refresh a tags. * @param tag tag name * @param items list of tags to add * @param options */ private _editTags; }