did a lot of syle work and started search and detail pages

This commit is contained in:
Chris Kruining 2025-05-19 17:00:18 +02:00
parent 7c5d2a25ff
commit 275fb87eeb
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
23 changed files with 301155 additions and 243 deletions

View file

@ -2,12 +2,12 @@
import type { Category, Entry } from "./types";
import { query } from "@solidjs/router";
import { entries } from "./data";
import { getContinueWatching, getItem, getRandomItems } from "./apis/jellyfin";
import { getContinueWatching, getRandomItems } from "./apis/jellyfin";
import {
getDiscovery,
getRecommendations,
getEntry as getTmdbEntry,
searchMulti,
} from "./apis/tmdb";
const jellyfinUserId = "a9c51af84bf54578a99ab4dd0ebf0763";
@ -19,20 +19,25 @@ export const listCategories = query(async (): Promise<Category[]> => {
return [
// { label: "Continue", entries: await getContinueWatching(jellyfinUserId) },
{
label: "Recommendations (For you?)",
label: "For you",
entries: await getRecommendations(),
},
{ label: "Discover", entries: await getDiscovery() },
{ label: "Random", entries: await getRandomItems(jellyfinUserId) },
];
}, "series.categories.list");
}, "content.categories.list");
export const getEntry = query(
async (id: Entry["id"]): Promise<Entry | undefined> => {
return getTmdbEntry(id);
// return getItem(jellyfinUserId, id);
},
"series.get",
"content.get",
);
export const search = query(async (query: string, page: number = 1) => {
"use server";
return searchMulti(query, page);
}, 'content.search');
export { listUsers, getContinueWatching, listItems } from "./apis/jellyfin";