API & Navigation Updates

Add discover API endpoint, update command palette, and fix Plex auth

- Add getTmdbMovieDiscoverByName() function to api.ts for discover categories
- Add discover route to command palette with IconBinoculars and description
- Replace IconBinoculars with IconSearch for torrent search input in SeasonedInput
- Fix Plex auth cookie to include domain attribute for cross-subdomain support
This commit is contained in:
2026-03-11 00:04:24 +01:00
parent 1e9077a819
commit 604cada126
4 changed files with 21 additions and 3 deletions

View File

@@ -135,6 +135,17 @@ const getTmdbMovieListByName = async (
// .catch(error => { console.error(`api error getting list: ${name}, page: ${page}`); throw error }) // eslint-disable-line no-console
};
const getTmdbMovieDiscoverByName = async (
name: string,
page = 1
): Promise<IList> => {
const url = new URL(`/api/v2/movie/discover/${name}`, API_HOSTNAME);
url.searchParams.append("page", page.toString());
return fetch(url.href).then(resp => resp.json());
// .catch(error => { console.error(`api error getting list: ${name}, page: ${page}`); throw error }) // eslint-disable-line no-console
};
// Fetches requested items.
const getRequests = async (page = 1) => {
const url = new URL("/api/v2/request", API_HOSTNAME);
@@ -565,6 +576,7 @@ export {
getShowCredits,
getPersonCredits,
getTmdbMovieListByName,
getTmdbMovieDiscoverByName,
searchTmdb,
getUserRequests,
getRequests,