diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx index ea9636e7..33d36760 100644 --- a/components/Global/components/track.tsx +++ b/components/Global/components/track.tsx @@ -14,7 +14,7 @@ import { useSafeAreaFrame } from "react-native-safe-area-context"; interface TrackProps { track: BaseItemDto; tracklist: BaseItemDto[]; - index: number; + index: number | undefined; showArtwork?: boolean | undefined; onPress?: () => void | undefined } @@ -29,7 +29,7 @@ export default function Track({ } : { track: BaseItemDto, tracklist: BaseItemDto[], - index: number, + index?: number | undefined, queueName?: string | undefined, showArtwork?: boolean | undefined, onPress?: () => void | undefined diff --git a/components/Tracks/component.tsx b/components/Tracks/component.tsx index 03d969d1..6447d815 100644 --- a/components/Tracks/component.tsx +++ b/components/Tracks/component.tsx @@ -29,7 +29,6 @@ export default function Tracks({ navigation }: TracksProps) : React.JSX.Element showArtwork track={track} tracklist={tracks?.slice(index, index + 50) ?? []} - index={index} queueName="Favorite Tracks" /> diff --git a/player/interfaces.ts b/player/interfaces.ts index 8890fbc9..a05c4ba2 100644 --- a/player/interfaces.ts +++ b/player/interfaces.ts @@ -2,7 +2,7 @@ import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models"; export interface QueueMutation { track: BaseItemDto; - index: number; + index?: number | undefined; tracklist: BaseItemDto[]; queueName: string; } \ No newline at end of file diff --git a/player/provider.tsx b/player/provider.tsx index 9985354d..8f87c044 100644 --- a/player/provider.tsx +++ b/player/provider.tsx @@ -4,8 +4,7 @@ import { storage } from "../constants/storage"; import { MMKVStorageKeys } from "../enums/mmkv-storage-keys"; import { findPlayQueueIndexStart } from "./helpers/index"; import TrackPlayer, { Event, Progress, State, usePlaybackState, useProgress, useTrackPlayerEvents } from "react-native-track-player"; -import _, { isNumber, isUndefined } from "lodash"; -import { buildNewQueue } from "./helpers/queue"; +import _, { isUndefined } from "lodash"; import { useApiClientContext } from "../components/jellyfin-api-provider"; import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api"; import { handlePlaybackProgressUpdated, handlePlaybackState } from "./handlers";