mirror of
https://github.com/Jellify-Music/App.git
synced 2025-12-30 07:20:06 -06:00
wow that's a big change
This commit is contained in:
@@ -39,7 +39,7 @@ export default function Track({
|
||||
const { apiClient } = useApiClientContext();
|
||||
const { nowPlaying, usePlayNewQueue } = usePlayerContext();
|
||||
|
||||
const isPlaying = nowPlaying?.ItemId === track.Id
|
||||
const isPlaying = nowPlaying?.item.Id === track.Id;
|
||||
|
||||
return (
|
||||
<View>
|
||||
|
||||
@@ -15,8 +15,8 @@ export default function Queue(): React.JSX.Element {
|
||||
renderItem={({ item: queueItem, index }) => {
|
||||
return (
|
||||
<Track
|
||||
track={queueItem}
|
||||
tracklist={queue}
|
||||
track={queueItem.item}
|
||||
tracklist={queue.map((track) => track.item)}
|
||||
index={index}
|
||||
showArtwork
|
||||
onPress={() => {
|
||||
|
||||
@@ -36,12 +36,7 @@ export function mapDtoToTrack(api: Api, sessionId: string, item: BaseItemDto, qu
|
||||
duration: item.RunTimeTicks,
|
||||
artwork: getImageApi(api).getItemImageUrlById(item.Id!),
|
||||
|
||||
ItemId: item.Id!,
|
||||
ArtistId: item.AlbumArtists![0].Id!,
|
||||
AlbumId: item.AlbumId!,
|
||||
Name: item.Name,
|
||||
RunTimeTicks: item.RunTimeTicks,
|
||||
IndexNumber: item.IndexNumber,
|
||||
item,
|
||||
QueuingType: queuingType ?? QueuingType.DirectlyQueued
|
||||
} as JellifyTrack
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { PitchAlgorithm, RatingType, Track, TrackType } from "react-native-track-player"
|
||||
import { QueuingType } from "../enums/queuing-type";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
|
||||
export interface JellifyTrack extends Track {
|
||||
url: string;
|
||||
@@ -20,12 +21,7 @@ export interface JellifyTrack extends Track {
|
||||
rating?: RatingType | undefined;
|
||||
isLiveStream?: boolean | undefined;
|
||||
|
||||
ItemId: string;
|
||||
ArtistId: string;
|
||||
AlbumId: string;
|
||||
Year?: number | null | undefined;
|
||||
IndexNumber?: number | null | undefined;
|
||||
ParentIndexNumber?: number | null | undefined;
|
||||
item: BaseItemDto;
|
||||
|
||||
/**
|
||||
* Represents the type of queuing for this song, be it that it was
|
||||
|
||||
Reference in New Issue
Block a user