🍿 @lorenzopant/tmdb

Item Status

Check whether a specific movie or TV show is already in a v4 list.

Checks whether a specific movie or TV show is already present in the list. Useful before adding an item to avoid duplicates.

async item_status(params: V4ListItemStatusParams): Promise<V4ListItemStatusResponse>

TMDB Reference: Item Status

Parameters

NameTypeRequiredDescription
list_idnumberThe TMDB list ID.
media_type"movie" | "tv"The media type to check.
media_idnumberThe TMDB media ID to check.

Returns

V4ListItemStatusResponse

An object is returned if the item is in the list. TMDB returns a 404 if the item is not present — wrap the call in a try/catch to handle that case.

Errors

HTTPTMDB codeCause
4013Invalid or missing access token.
40434Item not found in the list.

Example

import { TMDB } from "@lorenzopant/tmdb";

const tmdb = new TMDB("your-access-token");

try {
	const status = await tmdb.v4.lists.item_status({
		list_id: 8700,
		media_type: "movie",
		media_id: 550,
	});
	console.log("In list:", status.media_id); // 550
} catch {
	console.log("Not in list");
}

On this page