@ctrl/plex
    Preparing search index...

    Class Photo

    Hierarchy

    • Playable
      • Photo
    Index
    • Parameters

      • server: PlexServer
      • data: any
      • Optionalinitpath: string
      • Optionalparent: PlexObject

      Returns Photo

    _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;
    } = ...
    addedAt?: Date
    createdAtAccuracy?: string
    createdAtTZOffset?: number
    fields: Field[]
    guid?: string
    images: Image[]
    index?: number
    key: string

    plex relative url

    lastRatedAt?: Date
    librarySectionID?: number
    librarySectionKey?: string
    librarySectionTitle?: string
    listType: "photo" = ...
    media: PhotoMedia[]
    originallyAvailableAt?: Date
    parent?: WeakRef<any>

    WeakRef to the parent object that this object is built from.

    parentGuid?: string
    parentIndex?: number
    parentKey?: string
    parentRatingKey?: number
    parentThumb?: string
    parentTitle?: string
    players: any

    (:class:~plexapi.client.PlexClient): Client objects playing this item (for active sessions).

    playlistItemID?: number

    (int): Playlist item ID (only populated for :class:~plexapi.playlist.Playlist items).

    playQueueItemID?: number

    Queue-local item ID (only populated for PlayQueue items).

    ratingKey?: string
    server: PlexServer
    session: any

    (:class:~plexapi.media.Session): Session object, for a playing media file.

    sessionKey: any

    (int): Active session key.

    sourceURI?: string
    summary?: string
    tags: Tag[]
    thumb?: string
    title?: string
    titleSort?: string
    transcodeSessions: any

    (:class:~plexapi.media.TranscodeSession): Transcode Session object if item is being transcoded (None otherwise).

    type?: string
    updatedAt?: Date
    usernames: any

    (str): Username of the person playing this item (for active sessions).

    userRating?: number
    viewedAt: any

    (datetime): Datetime item was last viewed (history).

    year?: number
    METADATA_TYPE: "photo" = 'photo'
    TAG: string = 'Photo'

    xml element tag

    TYPE: string = 'photo'

    xml element type

    • get isFullObject(): boolean

      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.

      Returns boolean

    • Add a collection(s).

      Parameters

      • collections: string[]

      Returns Promise<void>

    • Add a genre(s).

      Parameters

      • genres: string[]

      Returns Promise<void>

    • Add a label(s).

      Parameters

      • labels: string[]

      Returns Promise<void>

    • 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.

      Returns Promise<void>

    • Returns a new PlayQueue from this media item.

      Parameters

      • options: CreatePlayQueueOptions = {}

        Options for creating the PlayQueue

      Returns Promise<PlayQueue>

      New PlayQueue instance

    • Delete a media element. This has to be enabled under settings > server > library in plex webui.

      Returns Promise<any>

    • Edit an object.

      Parameters

      • changeObj: Record<string, string | number>

        Obj of settings to edit. Example: {'type': 1, 'id': movie.ratingKey, 'title.value': 'New Title', 'collection[0].tag.tag': 'Super', 'collection.locked': 0}

      Returns Promise<void>

    • Set the content rating (e.g. PG-13, R, TV-MA).

      Parameters

      • contentRating: string

      Returns Promise<void>

    • Set the originally available at date (release date).

      Parameters

      • date: string

      Returns Promise<void>

    • Set the sort title.

      Parameters

      • sortTitle: string

      Returns Promise<void>

    • Set the studio.

      Parameters

      • studio: string

      Returns Promise<void>

    • Set the summary.

      Parameters

      • summary: string

      Returns Promise<void>

    • Set the title.

      Parameters

      • title: string

      Returns Promise<void>

    • Use match result to update show metadata.

      Parameters

      • options: { agent?: string; auto?: boolean; searchResult?: SearchResult } = {}

        Match options.

      Returns Promise<void>

    • Returns a stream URL that can be used for playback.

      Parameters

      • params: Record<string, string> = {}

        Additional URL parameters for transcoding options.

      Returns string

    • Parameters

      • __namedParameters: { base?: string } = {}

      Returns string

    • Get Play History for a media item.

      Parameters

      • options: Omit<HistoryOptions, "ratingKey"> = {}

        Filter and paging options.

      Returns Promise<HistoryResult[]>

    • Returns True if this object is a child of the given class.

      Parameters

      • cls: any

      Returns boolean

    • Parameters

      • options: { agent?: string; language?: string; title?: string; year?: string } = {}

        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: "" })

        8. The default behaviour in Plex Web = no params in plexapi

        9. Both title and year specified by user

        10. Year automatically filled in

        11. Title automatically filled in

        12. Explicitly searches for title with blank year

        13. Explicitly searches for blank title with year

        14. 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

      Returns Promise<SearchResult[]>

    • Returns the first authenticated original file URL, when Plex exposes one. This does not download files or write to disk.

      Returns string

    • Returns authenticated URLs for the original photo files exposed by Plex. This does not download files or write to disk.

      Returns string[]

    • Refreshing a Library or individual item causes the metadata for the item to be refreshed, even if it already has metadata. You can think of refreshing as "update metadata for the requested item even if it already has some". You should refresh a Library or individual item if:

      Returns Promise<void>

    • load full data / reload the data for this object from this.key.

      Parameters

      • Optionalekey: string
      • Optionalargs: any

      Returns Promise<void>

    • Remove a collection(s).

      Parameters

      • collections: string[]

      Returns Promise<void>

    • Remove a genre(s).

      Parameters

      • genres: string[]

      Returns Promise<void>

    • Remove a label(s).

      Parameters

      • labels: string[]

      Returns Promise<void>

    • Update the play progress for this media item.

      Parameters

      • time: number

        Current playback time in milliseconds.

      • state: "playing" | "paused" | "stopped" = 'stopped'

        Playback state ('playing', 'paused', 'stopped'). Default 'stopped'.

      Returns Promise<void>

    • Update the timeline for this media item.

      Parameters

      • time: number

        Current playback time in milliseconds.

      • state: "playing" | "paused" | "stopped"

        Playback state ('playing', 'paused', 'stopped').

      • duration: number

        Total duration in milliseconds.

      Returns Promise<void>