# GetLibraryItemsMetadata ## Example Usage ```typescript import { EnableCreditsMarkerGeneration, EpisodeSort, FlattenSeasons, GetLibraryItemsLibraryResponse200Type, GetLibraryItemsLibraryType, GetLibraryItemsMetadata, ShowOrdering, } from "@lukehagar/plexjs/sdk/models/operations"; import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryItemsMetadata = { ratingKey: "58683", key: "/library/metadata/58683", guid: "plex://movie/5d7768ba96b655001fdc0408", studio: "20th Century Studios", skipChildren: false, librarySectionID: 1, librarySectionTitle: "Movies", librarySectionKey: "/library/sections/1", type: GetLibraryItemsLibraryType.Movie, title: "Avatar: The Way of Water", slug: "4-for-texas", contentRating: "PG-13", summary: "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", rating: 7.6, audienceRating: 9.2, year: 2022, seasonCount: 2022, tagline: "Return to Pandora.", flattenSeasons: FlattenSeasons.Show, episodeSort: EpisodeSort.OldestFirst, enableCreditsMarkerGeneration: EnableCreditsMarkerGeneration.LibraryDefault, showOrdering: ShowOrdering.TvdbAbsolute, thumb: "/library/metadata/58683/thumb/1703239236", art: "/library/metadata/58683/art/1703239236", banner: "/library/metadata/58683/banner/1703239236", duration: 11558112, originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), addedAt: 1556281940, updatedAt: 1556281940, audienceRatingImage: "rottentomatoes://image.rating.upright", chapterSource: "media", primaryExtraKey: "/library/metadata/58684", ratingImage: "rottentomatoes://image.rating.ripe", grandparentRatingKey: "66", grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", grandparentKey: "/library/metadata/66", grandparentTitle: "Caprica", grandparentThumb: "/library/metadata/66/thumb/1705716261", parentSlug: "alice-in-borderland-2020", grandparentSlug: "alice-in-borderland-2020", grandparentArt: "/library/metadata/66/art/1705716261", grandparentTheme: "/library/metadata/66/theme/1705716261", media: [ { id: 119534, duration: 11558112, bitrate: 25025, width: 3840, height: 2072, aspectRatio: 1.85, audioProfile: "dts", audioChannels: 6, audioCodec: "eac3", videoCodec: "hevc", videoResolution: "4k", container: "mkv", videoFrameRate: "24p", videoProfile: "main 10", hasVoiceActivity: false, has64bitOffsets: false, part: [ { id: 119542, key: "/library/parts/119542/1680457526/file.mkv", duration: 11558112, file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", size: 36158371307, container: "mkv", audioProfile: "dts", has64bitOffsets: false, optimizedForStreaming: false, videoProfile: "main 10", indexes: "sd", stream: [ { id: 272796, streamType: 1, default: true, selected: true, codec: "h264", index: 0, bitrate: 6273, colorPrimaries: "bt709", colorRange: "tv", colorSpace: "bt709", colorTrc: "bt709", bitDepth: 8, chromaLocation: "left", streamIdentifier: "2", chromaSubsampling: "4:2:0", codedHeight: 1088, codedWidth: 1920, frameRate: 29.97, hasScalingMatrix: false, hearingImpaired: false, closedCaptions: false, embeddedInVideo: "1", height: 1080, level: 40, profile: "main", refFrames: 4, scanType: "progressive", width: 1920, displayTitle: "1080p (H.264)", extendedDisplayTitle: "1080p (H.264)", channels: 2, language: "English", languageTag: "en", languageCode: "eng", audioChannelLayout: "stereo", samplingRate: 48000, title: "English", canAutoSync: false, }, ], }, ], }, ], genre: [ { tag: "Adventure", }, ], country: [ { tag: "United States of America", }, ], director: [ { tag: "James Cameron", }, ], writer: [ { tag: "James Cameron", }, ], collection: [ { tag: "Working NL Subs", }, ], role: [ { id: 294129, filter: "actor=294129", thumb: "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", tag: "Mike Smith", tagKey: "668e7e7b22bcad9064350c91", role: "Self", }, ], location: [ { path: "/TV Shows/House", }, ], mediaGuid: [ { id: "imdb://tt13015952", }, ], ultraBlurColors: { topLeft: "11333b", topRight: "0a232d", bottomRight: "73958", bottomLeft: "1f5066", }, metaDataRating: [ { image: "themoviedb://image.rating", value: 3, type: "audience", }, ], image: [ { alt: "Episode 1", type: GetLibraryItemsLibraryResponse200Type.Background, url: "/library/metadata/45521/thumb/1644710589", }, ], titleSort: "Whale", viewCount: 1, lastViewedAt: 1682752242, originalTitle: "映画 ブラッククローバー 魔法帝の剣", viewOffset: 5222500, skipCount: 1, index: 1, theme: "/library/metadata/1/theme/1705636920", leafCount: 14, viewedLeafCount: 0, childCount: 1, hasPremiumExtras: "1", hasPremiumPrimaryExtra: "1", parentRatingKey: "66", parentGuid: "plex://show/5d9c081b170e24001f2a7be4", parentStudio: "UCP", parentKey: "/library/metadata/66", parentTitle: "Caprica", parentIndex: 1, parentYear: 2010, parentThumb: "/library/metadata/66/thumb/1705716261", parentTheme: "/library/metadata/66/theme/1705716261", }; ``` ## Fields | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ratingKey` | *string* | :heavy_check_mark: | The rating key (Media ID) of this media item.
Note: This is always an integer, but is represented as a string in the API.
| 58683 | | `key` | *string* | :heavy_check_mark: | N/A | /library/metadata/58683 | | `guid` | *string* | :heavy_check_mark: | N/A | plex://movie/5d7768ba96b655001fdc0408 | | `studio` | *string* | :heavy_minus_sign: | N/A | 20th Century Studios | | `skipChildren` | *boolean* | :heavy_minus_sign: | N/A | false | | `librarySectionID` | *number* | :heavy_minus_sign: | N/A | 1 | | `librarySectionTitle` | *string* | :heavy_minus_sign: | N/A | Movies | | `librarySectionKey` | *string* | :heavy_minus_sign: | N/A | /library/sections/1 | | `type` | [operations.GetLibraryItemsLibraryType](../../../sdk/models/operations/getlibraryitemslibrarytype.md) | :heavy_check_mark: | The type of media content
| movie | | `title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water | | `slug` | *string* | :heavy_minus_sign: | N/A | 4-for-texas | | `contentRating` | *string* | :heavy_minus_sign: | N/A | PG-13 | | `summary` | *string* | :heavy_check_mark: | N/A | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home. | | `rating` | *number* | :heavy_minus_sign: | N/A | 7.6 | | `audienceRating` | *number* | :heavy_minus_sign: | N/A | 9.2 | | `year` | *number* | :heavy_minus_sign: | N/A | 2022 | | `seasonCount` | *number* | :heavy_minus_sign: | N/A | 2022 | | `tagline` | *string* | :heavy_minus_sign: | N/A | Return to Pandora. | | `flattenSeasons` | [operations.FlattenSeasons](../../../sdk/models/operations/flattenseasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 | | `episodeSort` | [operations.EpisodeSort](../../../sdk/models/operations/episodesort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 | | `enableCreditsMarkerGeneration` | [operations.EnableCreditsMarkerGeneration](../../../sdk/models/operations/enablecreditsmarkergeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 | | `showOrdering` | [operations.ShowOrdering](../../../sdk/models/operations/showordering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
| absolute | | `thumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 | | `art` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 | | `banner` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 | | `duration` | *number* | :heavy_minus_sign: | N/A | 11558112 | | `originallyAvailableAt` | [RFCDate](../../../types/rfcdate.md) | :heavy_minus_sign: | N/A | 2022-12-14 00:00:00 +0000 UTC | | `addedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 | | `updatedAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 | | `audienceRatingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.upright | | `chapterSource` | *string* | :heavy_minus_sign: | N/A | media | | `primaryExtraKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/58684 | | `ratingImage` | *string* | :heavy_minus_sign: | N/A | rottentomatoes://image.rating.ripe | | `grandparentRatingKey` | *string* | :heavy_minus_sign: | N/A | 66 | | `grandparentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | | `grandparentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | | `grandparentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | | `grandparentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | | `parentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | | `grandparentSlug` | *string* | :heavy_minus_sign: | N/A | alice-in-borderland-2020 | | `grandparentArt` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/art/1705716261 | | `grandparentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 | | `media` | [operations.GetLibraryItemsMedia](../../../sdk/models/operations/getlibraryitemsmedia.md)[] | :heavy_minus_sign: | The Media object is only included when type query is `4` or higher.
| | | `genre` | [operations.GetLibraryItemsGenre](../../../sdk/models/operations/getlibraryitemsgenre.md)[] | :heavy_minus_sign: | N/A | | | `country` | [operations.GetLibraryItemsCountry](../../../sdk/models/operations/getlibraryitemscountry.md)[] | :heavy_minus_sign: | N/A | | | `director` | [operations.GetLibraryItemsDirector](../../../sdk/models/operations/getlibraryitemsdirector.md)[] | :heavy_minus_sign: | N/A | | | `writer` | [operations.GetLibraryItemsWriter](../../../sdk/models/operations/getlibraryitemswriter.md)[] | :heavy_minus_sign: | N/A | | | `collection` | [operations.GetLibraryItemsCollection](../../../sdk/models/operations/getlibraryitemscollection.md)[] | :heavy_minus_sign: | N/A | | | `role` | [operations.GetLibraryItemsRole](../../../sdk/models/operations/getlibraryitemsrole.md)[] | :heavy_minus_sign: | N/A | | | `location` | [operations.GetLibraryItemsLocation](../../../sdk/models/operations/getlibraryitemslocation.md)[] | :heavy_minus_sign: | N/A | | | `mediaGuid` | [operations.MediaGuid](../../../sdk/models/operations/mediaguid.md)[] | :heavy_minus_sign: | The Guid object is only included in the response if the `includeGuids` parameter is set to `1`.
| | | `ultraBlurColors` | [operations.GetLibraryItemsUltraBlurColors](../../../sdk/models/operations/getlibraryitemsultrablurcolors.md) | :heavy_minus_sign: | N/A | | | `metaDataRating` | [operations.MetaDataRating](../../../sdk/models/operations/metadatarating.md)[] | :heavy_minus_sign: | N/A | | | `image` | [operations.GetLibraryItemsImage](../../../sdk/models/operations/getlibraryitemsimage.md)[] | :heavy_minus_sign: | N/A | | | `titleSort` | *string* | :heavy_minus_sign: | N/A | Whale | | `viewCount` | *number* | :heavy_minus_sign: | N/A | 1 | | `lastViewedAt` | *number* | :heavy_minus_sign: | N/A | 1682752242 | | `originalTitle` | *string* | :heavy_minus_sign: | N/A | 映画 ブラッククローバー 魔法帝の剣 | | `viewOffset` | *number* | :heavy_minus_sign: | N/A | 5222500 | | `skipCount` | *number* | :heavy_minus_sign: | N/A | 1 | | `index` | *number* | :heavy_minus_sign: | N/A | 1 | | `theme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 | | `leafCount` | *number* | :heavy_minus_sign: | N/A | 14 | | `viewedLeafCount` | *number* | :heavy_minus_sign: | N/A | 0 | | `childCount` | *number* | :heavy_minus_sign: | N/A | 1 | | `hasPremiumExtras` | *string* | :heavy_minus_sign: | N/A | 1 | | `hasPremiumPrimaryExtra` | *string* | :heavy_minus_sign: | N/A | 1 | | `parentRatingKey` | *string* | :heavy_minus_sign: | The rating key of the parent item.
| 66 | | `parentGuid` | *string* | :heavy_minus_sign: | N/A | plex://show/5d9c081b170e24001f2a7be4 | | `parentStudio` | *string* | :heavy_minus_sign: | N/A | UCP | | `parentKey` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66 | | `parentTitle` | *string* | :heavy_minus_sign: | N/A | Caprica | | `parentIndex` | *number* | :heavy_minus_sign: | N/A | 1 | | `parentYear` | *number* | :heavy_minus_sign: | N/A | 2010 | | `parentThumb` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/thumb/1705716261 | | `parentTheme` | *string* | :heavy_minus_sign: | N/A | /library/metadata/66/theme/1705716261 |