Refactor
This commit is contained in:
parent
b7255bd6c5
commit
a3646e51d5
|
@ -5,7 +5,7 @@ import { API_BASE, API_TOKEN } from "../config.ts";
|
|||
const API_ENDPOINT_WITH_PARAMS = "/Items?isMovie=true&isSeries=true&recursive=true&fields=ProviderIds&filters=&mediaTypes=Video&enableTotalRecordCount=true&enableImages=false";
|
||||
const API_URL = API_BASE + API_ENDPOINT_WITH_PARAMS;
|
||||
|
||||
export const fetchFromApi = async () => {
|
||||
export const fetchFromJellyfinApi = async () => {
|
||||
const init = {
|
||||
method: "GET",
|
||||
headers: {
|
|
@ -1,4 +1,4 @@
|
|||
import { fetchFromApi } from "./fetchItemsFromJellyfin.ts";
|
||||
import { fetchFromJellyfinApi } from "./jellyfinApiHelper.ts";
|
||||
import { saveJsonToDisk } from "./fsHelper.ts";
|
||||
import { transformItems } from "./itemHelper.ts";
|
||||
|
||||
|
@ -12,7 +12,7 @@ const run = async () => {
|
|||
const {
|
||||
Items: items,
|
||||
TotalRecordCount: totalItemCount
|
||||
}: JellyfinApiResponse = await fetchFromApi();
|
||||
}: JellyfinApiResponse = await fetchFromJellyfinApi();
|
||||
|
||||
|
||||
const transformedItems = transformItems(items);
|
||||
|
|
Loading…
Reference in a new issue