Implement transformItems to ommit unnecessary props from items

This commit is contained in:
Nikhil Nawgiri 2024-10-26 17:47:09 +02:00
parent ea78b4a6b5
commit ce604b3626

View file

@ -1,4 +1,5 @@
import { fetchFromApi } from "./fetchItemsFromJellyfin.ts";
import { transformItems } from "./itemHelper.ts";
interface JellyfinApiResponse {
Items?: [],
@ -12,8 +13,13 @@ const run = async () => {
TotalRecordCount: totalItemCount
}: JellyfinApiResponse = await fetchFromApi();
console.log("items:", items);
const transformedItems = transformItems(items);
console.log("transformedItems:", transformedItems);
console.log("totalItemCount:", totalItemCount);
// write to db file
// update db file
}
run();