Class MovieSection

Base class for a single library section.

Hierarchy (view full)

Constructors

Properties

CONTENT_TYPE: string = 'video'
METADATA_TYPE: string = 'movie'
VIDEO_TYPE: typeof Movie = Movie
_fieldTypes?: FilteringFieldType[]
_filterTypes?: FilteringType[]
agent: string

Unknown (com.plexapp.agents.imdb, etc)

allowSync: boolean

l True if you allow syncing content from this section.

art: string

Wallpaper artwork used to respresent this section.

composite: string

Composit image used to represent this section.

createdAt: Date

Datetime this library section was created.

filters: boolean

Unknown

key: string

plex relative url

language: string

Language represented in this section (en, xn, etc).

locations: Location[]

Paths on disk where section content is stored.

parent?: WeakRef<any>

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

refreshing: boolean

True if this section is currently being refreshed.

scannedAt: Date
scanner: string

Internal scanner used to find media (Plex Movie Scanner, Plex Premium Music Scanner, etc.)

server: PlexServer
thumb: string

Thumbnail image used to represent this section.

title: string

Title of this section.

type: "movie" | "show"

Type of content section represents (movie, artist, photo, show).

updatedAt: Date

Datetime this library section was last updated.

uuid: string

Unique id for this section (32258d7c-3e6c-4ac5-98ad-bad7a3b78c63)

ALLOWED_FILTERS: string[] = ...
ALLOWED_SORT: string[] = ...
BOOLEAN_FILTERS: string[] = ...
TAG: string = 'Directory'

xml element tag

TYPE: string = 'movie'

xml element type

Methods

  • Parameters

    • sort: string = ''

    Returns Promise<Movie[]>

  • Run an analysis on all of the items in this library section. See :func:~plexapi.base.PlexPartialObject.analyze for more details.

    Returns Promise<void>

  • Cancel update of this Library Section.

    Returns Promise<void>

  • Delete a library section.

    Returns Promise<void>

  • Delete the preview thumbnails for items in this library. This cannot be undone. Recreating media preview files can take hours or even days.

    Returns Promise<void>

  • Edit a library

    Parameters

    • kwargs: Record<string, string>

      object of settings to edit

    Returns Promise<Section>

  • If a section has items in the Trash, use this option to empty the Trash

    Returns Promise<void>

  • Returns a list of available Folders for this library section.

    Returns Promise<Folder[]>

  • Parameters

    • title: string

      Title of the item to return.

    Returns Promise<Movie>

    the media item with the specified title.

  • Parameters

    • libtype:
          | "movie"
          | "show"
          | "season"
          | "episode"
          | "trailer"
          | "comic"
          | "person"
          | "artist"
          | "album"
          | "track"
          | "picture"
          | "clip"
          | "photo"
          | "photoalbum"
          | "playlist"
          | "playlistFolder"
          | "collection"
          | "optimizedVersion"
          | "userPlaylistItem" = ...

    Returns Promise<FilteringType>

  • Returns the media item with the specified external IMDB, TMDB, or TVDB ID. Note: This search uses a PlexAPI operator so performance may be slow. All items from the entire Plex library need to be retrieved for each guid search. It is recommended to create your own lookup dictionary if you are searching for a lot of external guids.

    Parameters

    • guid: string

      The external guid of the item to return. Examples: IMDB imdb://tt0944947, TMDB tmdb://1399, TVDB tvdb://121361.

      Example:

      	.. code-block:: python
      
      			# This will retrieve all items in the entire library 3 times
      			result1 = library.getGuid('imdb://tt0944947')
      			result2 = library.getGuid('tmdb://1399')
      			result3 = library.getGuid('tvdb://121361')
      
      			# This will only retrieve all items in the library once to create a lookup dictionary
      			guidLookup = {guid.id: item for item in library.all() for guid in item.guids}
      			result1 = guidLookup['imdb://tt0944947']
      			result2 = guidLookup['tmdb://1399']
      			result3 = guidLookup['tvdb://121361']
      

    Returns Promise<Movie>

  • Returns the Plex Web URL for the library.

    Parameters

    • Optionalbase: string

      The base URL before the fragment (#!). Default is https://app.plex.tv/desktop.

    • Optionaltab: string

      The library tab (recommended, library, collections, playlists, timeline).

    • Optionalkey: string

      A hub key.

    Returns string

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

    Parameters

    • cls: any

    Returns boolean

  • Returns a list of available FilteringFields for a specified libtype. This is the list of options in the custom filter dropdown menu

    Parameters

    • libtype:
          | "movie"
          | "show"
          | "season"
          | "episode"
          | "trailer"
          | "comic"
          | "person"
          | "artist"
          | "album"
          | "track"
          | "picture"
          | "clip"
          | "photo"
          | "photoalbum"
          | "playlist"
          | "playlistFolder"
          | "collection"
          | "optimizedVersion"
          | "userPlaylistItem" = ...

    Returns Promise<FilteringField[]>

  • Parameters

    • Optionallibtype:
          | "movie"
          | "show"
          | "season"
          | "episode"
          | "trailer"
          | "comic"
          | "person"
          | "artist"
          | "album"
          | "track"
          | "picture"
          | "clip"
          | "photo"
          | "photoalbum"
          | "playlist"
          | "playlistFolder"
          | "collection"
          | "optimizedVersion"
          | "userPlaylistItem"

      The library type to filter (movie, show, season, episode, artist, album, track, photoalbum, photo, collection).

    Returns Promise<FilteringFilter[]>

    const availableFilters = (await library.listFilters()).map(f => f.filter)
    
  • Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified.

    Returns Promise<void>

  • Reload the data for this object from this.key.

    Parameters

    • Optionalekey: string

    Returns Promise<void>

  • Search the library. The http requests will be batched in container_size. If you are only looking for the first results, it would be wise to set the maxresults option to that amount so the search doesn't iterate over all results on the server.

    Example: "studio=Comedy%20Central" or "year=1999" "title=Kung Fu" all work. Other items such as actor= seem to work, but require you already know the id of the actor. TLDR: This is untested but seems to work. Use library section search when you can.

    Type Parameters

    Parameters

    • args: Partial<SearchArgs> = {}

      Search using a number of different attributes

    • Cls: any = ...

    Returns Promise<T[]>

  • Scan this section for new media.

    Returns Promise<void>