mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-12 14:28:46 -05:00
fix crash on item details opening from player?
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import Client from "../../../api/client";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { isEmpty } from "lodash";
|
||||
|
||||
export async function fetchItem(itemId: string) : Promise<BaseItemDto> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
if (isEmpty(itemId))
|
||||
reject("No item ID proviced")
|
||||
|
||||
getItemsApi(Client.api!)
|
||||
.getItems({
|
||||
ids: [
|
||||
|
||||
Reference in New Issue
Block a user