mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
91 KiB
91 KiB
GetSearchAllLibrariesMetadata
Unknown
Example Usage
import {
GetSearchAllLibrariesFlattenSeasons,
GetSearchAllLibrariesHasThumbnail,
GetSearchAllLibrariesLibraryType,
GetSearchAllLibrariesMetadata,
GetSearchAllLibrariesShowOrdering,
GetSearchAllLibrariesType,
} from "@lukehagar/plexjs/sdk/models/operations";
import { RFCDate } from "@lukehagar/plexjs/sdk/types";
let value: GetSearchAllLibrariesMetadata = {
ratingKey: "58683",
key: "/library/metadata/58683",
guid: "plex://movie/5d7768ba96b655001fdc0408",
slug: "4-for-texas",
studio: "20th Century Studios",
type: GetSearchAllLibrariesType.Movie,
title: "Avatar: The Way of Water",
banner: "/library/metadata/58683/banner/1703239236",
titleSort: "Whale",
contentRating: "PG-13",
summary:
"Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\n"
+ "Once a familiar threat returns to finish what was previously started, Jake must\n"
+ "work with Neytiri and the army of the Na'vi race to protect their home.\n"
+ "",
rating: 7.6,
audienceRating: 9.2,
year: 2022,
tagline: "Return to Pandora.",
thumb: "/library/metadata/58683/thumb/1703239236",
art: "/library/metadata/58683/art/1703239236",
theme: "/library/metadata/1/theme/1705636920",
index: 1,
leafCount: 14,
viewedLeafCount: 0,
childCount: 1,
seasonCount: 2022,
duration: 11558112,
originallyAvailableAt: new RFCDate("2022-12-14"),
addedAt: 1556281940,
updatedAt: 1556281940,
parentYear: 2010,
audienceRatingImage: "rottentomatoes://image.rating.upright",
chapterSource: "media",
primaryExtraKey: "/library/metadata/58684",
originalTitle: "映画 ブラッククローバー 魔法帝の剣",
parentRatingKey: "66",
grandparentRatingKey: "66",
parentGuid: "plex://show/5d9c081b170e24001f2a7be4",
grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4",
grandparentSlug: "alice-in-borderland-2020",
grandparentKey: "/library/metadata/66",
parentKey: "/library/metadata/66",
grandparentTitle: "Caprica",
grandparentThumb: "/library/metadata/66/thumb/1705716261",
grandparentTheme: "/library/metadata/66/theme/1705716261",
grandparentArt: "/library/metadata/66/art/1705716261",
parentTitle: "Caprica",
parentIndex: 1,
parentThumb: "/library/metadata/66/thumb/1705716261",
ratingImage: "rottentomatoes://image.rating.ripe",
viewCount: 1,
viewOffset: 5222500,
skipCount: 1,
subtype: "clip",
lastRatedAt: 1721813113,
createdAtAccuracy: "epoch,local",
createdAtTZOffset: "0",
lastViewedAt: 1682752242,
userRating: 10,
image: [
{
alt: "Episode 1",
type: GetSearchAllLibrariesLibraryType.Background,
url: "/library/metadata/45521/thumb/1644710589",
},
],
ultraBlurColors: {
topLeft: "11333b",
topRight: "0a232d",
bottomRight: "73958",
bottomLeft: "1f5066",
},
guids: [
{
id:
"{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}",
},
],
librarySectionID: 1,
librarySectionTitle: "Movies",
librarySectionKey: "/library/sections/1",
showOrdering: GetSearchAllLibrariesShowOrdering.TvdbAbsolute,
flattenSeasons: GetSearchAllLibrariesFlattenSeasons.Show,
skipChildren: false,
media: [
{
id: 387322,
duration: 9610350,
bitrate: 25512,
width: 3840,
height: 1602,
aspectRatio: 2.35,
audioChannels: 6,
displayOffset: 50,
audioCodec: "aac",
videoCodec: "hevc",
videoResolution: "4k",
container: "mp4",
videoFrameRate: "24p",
videoProfile: "main 10",
hasVoiceActivity: false,
audioProfile: "dts",
has64bitOffsets: false,
part: [
{
accessible: true,
exists: true,
id: 418385,
key: "/library/parts/418385/1735864239/file.mkv",
indexes: "sd",
duration: 9610350,
file: "/mnt/Movies_1/W/Wicked (2024).mkv",
size: 30649952104,
packetLength: 188,
container: "mkv",
videoProfile: "main 10",
audioProfile: "dts",
has64bitOffsets: false,
hasThumbnail: GetSearchAllLibrariesHasThumbnail.True,
},
],
},
],
genre: [
{
id: 259,
tag: "Crime",
},
],
country: [
{
id: 259,
tag: "United States of America",
},
],
director: [
{
id: 126522,
tag: "Danny Boyle",
thumb:
"https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
},
],
writer: [
{
id: 126522,
tag: "Jamie P. Hanson",
thumb:
"https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg",
},
],
role: [
{
id: 126522,
tag: "Teller",
role: "Self - Judge",
thumb:
"https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg",
},
],
location: [
{
path: "/TV Shows/Clarkson's Farm",
},
],
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ratingKey |
string | ✔️ | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 |
key |
string | ✔️ | The unique key for the media item. | /library/metadata/58683 |
guid |
string | ✔️ | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
slug |
string | ✔️ | A URL‐friendly version of the media title. | 4-for-texas |
studio |
string | ➖ | The studio that produced the media item. | 20th Century Studios |
type |
operations.GetSearchAllLibrariesType | ✔️ | N/A | movie |
title |
string | ✔️ | The title of the media item. | Avatar: The Way of Water |
banner |
string | ✔️ | The banner image URL for the media item. | /library/metadata/58683/banner/1703239236 |
titleSort |
string | ✔️ | The sort title used for ordering media items. | Whale |
contentRating |
string | ➖ | The content rating for the media item. | PG-13 |
summary |
string | ✔️ | A synopsis of the media item. | 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 | ✔️ | The critic rating for the media item. | 7.6 |
audienceRating |
number | ✔️ | The audience rating for the media item. | 9.2 |
year |
number | ➖ | The release year of the media item. | 2022 |
tagline |
string | ✔️ | A brief tagline for the media item. | Return to Pandora. |
thumb |
string | ✔️ | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 |
art |
string | ✔️ | The art image URL for the media item. | /library/metadata/58683/art/1703239236 |
theme |
string | ✔️ | The theme URL for the media item. | /library/metadata/1/theme/1705636920 |
index |
number | ✔️ | The index position of the media item. | 1 |
leafCount |
number | ➖ | The number of leaf items (end nodes) under this media item. | 14 |
viewedLeafCount |
number | ➖ | The number of leaf items that have been viewed. | 0 |
childCount |
number | ✔️ | The number of child items associated with this media item. | 1 |
seasonCount |
number | ✔️ | The total number of seasons (for TV shows). | 2022 |
duration |
number | ✔️ | The duration of the media item in milliseconds. | 11558112 |
originallyAvailableAt |
RFCDate | ➖ | The original release date of the media item. | 2022-12-14 |
addedAt |
number | ✔️ | N/A | 1556281940 |
updatedAt |
number | ➖ | Unix epoch datetime in seconds | 1556281940 |
parentYear |
number | ➖ | The release year of the parent media item. | 2010 |
audienceRatingImage |
string | ➖ | The URL for the audience rating image. | rottentomatoes://image.rating.upright |
chapterSource |
string | ➖ | The source from which chapter data is derived. | media |
primaryExtraKey |
string | ➖ | The primary extra key associated with this media item. | /library/metadata/58684 |
originalTitle |
string | ➖ | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 |
parentRatingKey |
string | ➖ | The rating key of the parent media item. | 66 |
grandparentRatingKey |
string | ➖ | The rating key of the grandparent media item. | 66 |
parentGuid |
string | ➖ | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
grandparentGuid |
string | ➖ | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
grandparentSlug |
string | ➖ | The slug for the grandparent media item. | alice-in-borderland-2020 |
grandparentKey |
string | ➖ | The key of the grandparent media item. | /library/metadata/66 |
parentKey |
string | ➖ | The key of the parent media item. | /library/metadata/66 |
grandparentTitle |
string | ➖ | The title of the grandparent media item. | Caprica |
grandparentThumb |
string | ➖ | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 |
grandparentTheme |
string | ➖ | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 |
grandparentArt |
string | ➖ | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 |
parentTitle |
string | ➖ | The title of the parent media item. | Caprica |
parentIndex |
number | ➖ | The index position of the parent media item. | 1 |
parentThumb |
string | ➖ | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 |
ratingImage |
string | ➖ | The URL for the rating image. | rottentomatoes://image.rating.ripe |
viewCount |
number | ➖ | The number of times this media item has been viewed. | 1 |
viewOffset |
number | ➖ | The current playback offset (in milliseconds). | 5222500 |
skipCount |
number | ➖ | The number of times this media item has been skipped. | 1 |
subtype |
string | ➖ | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip |
lastRatedAt |
number | ➖ | The Unix timestamp representing the last time the item was rated. | 1721813113 |
createdAtAccuracy |
string | ➖ | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local |
createdAtTZOffset |
string | ➖ | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 |
lastViewedAt |
number | ➖ | Unix timestamp for when the media item was last viewed. | 1682752242 |
userRating |
number | ➖ | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 |
image |
operations.GetSearchAllLibrariesImage[] | ➖ | N/A | |
ultraBlurColors |
operations.GetSearchAllLibrariesUltraBlurColors | ➖ | N/A | |
guids |
operations.GetSearchAllLibrariesGuids[] | ➖ | N/A | |
librarySectionID |
number | ➖ | The identifier for the library section. | 1 |
librarySectionTitle |
string | ➖ | The title of the library section. | Movies |
librarySectionKey |
string | ➖ | The key corresponding to the library section. | /library/sections/1 |
showOrdering |
operations.GetSearchAllLibrariesShowOrdering | ➖ | Setting that indicates the episode ordering for the show. Options: - None = Library default - tmdbAiring = The Movie Database (Aired) - aired = TheTVDB (Aired) - dvd = TheTVDB (DVD) - absolute = TheTVDB (Absolute) |
absolute |
flattenSeasons |
operations.GetSearchAllLibrariesFlattenSeasons | ➖ | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). |
1 |
skipChildren |
boolean | ➖ | Indicates whether child items should be skipped. | false |
media |
operations.GetSearchAllLibrariesMedia[] | ➖ | N/A | |
genre |
operations.GetSearchAllLibrariesGenre[] | ➖ | N/A | |
country |
operations.GetSearchAllLibrariesCountry[] | ➖ | N/A | |
director |
operations.GetSearchAllLibrariesDirector[] | ➖ | N/A | |
writer |
operations.GetSearchAllLibrariesWriter[] | ➖ | N/A | |
role |
operations.GetSearchAllLibrariesRole[] | ➖ | N/A | |
location |
operations.GetSearchAllLibrariesLocation[] | ➖ | N/A |