Skip to content

Commit

Permalink
Remove unnecessary branch
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Nov 10, 2024
1 parent 38068f3 commit 81463a8
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,27 +572,15 @@ export async function getItemsForPlayback(
userId: string,
query: ItemsApiGetItemsRequest
): Promise<BaseItemDtoQueryResult> {
const params: ItemsApiGetItemsRequest = {
const response = await getItemsApi(JellyfinApi.jellyfinApi).getItems({
...query,
excludeLocationTypes: ['Virtual'],
fields: requiredItemFields,
limit: query.limit ?? 100,
userId
};

if (query.ids?.length == 1) {
const response = await getItemsApi(JellyfinApi.jellyfinApi).getItems({
...query,
...params
});

return response.data;
} else {
const response = await getItemsApi(JellyfinApi.jellyfinApi).getItems(
query
);
});

return response.data;
}
return response.data;
}

/**
Expand Down

0 comments on commit 81463a8

Please sign in to comment.