mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-18 23:42:18 -05:00
fix build
This commit is contained in:
@@ -3,13 +3,11 @@ import { ScrollView, View } from "tamagui";
|
||||
import { useHomeContext } from "../provider";
|
||||
import { H2 } from "../../Global/helpers/text";
|
||||
import { ItemCard } from "../../Global/helpers/item-card";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { usePlayerContext } from "../../../player/provider";
|
||||
|
||||
export default function RecentlyPlayed(): React.JSX.Element {
|
||||
|
||||
const { usePlayNewQueue } = usePlayerContext();
|
||||
const { apiClient, sessionId } = useApiClientContext();
|
||||
const { recentTracks } = useHomeContext();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useApiClientContext } from "@/components/jellyfin-api-provider";
|
||||
import { ProvidedHomeProps } from "@/components/types";
|
||||
import { ScrollView, RefreshControl } from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
@@ -9,11 +8,10 @@ import RecentlyPlayed from "../helpers/recently-played";
|
||||
import { useHomeContext } from "../provider";
|
||||
import { H3 } from "@/components/Global/helpers/text";
|
||||
import Avatar from "@/components/Global/helpers/avatar";
|
||||
import Client from "@/api/client";
|
||||
|
||||
export function ProvidedHome({ route, navigation }: ProvidedHomeProps): React.JSX.Element {
|
||||
|
||||
const { user } = useApiClientContext();
|
||||
|
||||
const { refreshing: refetching, onRefresh: onRefetch } = useHomeContext()
|
||||
|
||||
return (
|
||||
@@ -28,9 +26,9 @@ export function ProvidedHome({ route, navigation }: ProvidedHomeProps): React.JS
|
||||
}>
|
||||
<YStack alignContent='flex-start'>
|
||||
<XStack margin={"$2"}>
|
||||
<H3>{`Hi, ${user!.name}`}</H3>
|
||||
<H3>{`Hi, ${Client.user!.name}`}</H3>
|
||||
<YStack />
|
||||
<Avatar maxHeight={30} itemId={user!.id!} />
|
||||
<Avatar maxHeight={30} itemId={Client.user!.id!} />
|
||||
</XStack>
|
||||
|
||||
<Separator marginVertical={"$2"} />
|
||||
|
||||
@@ -11,17 +11,15 @@ import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { queryConfig } from "../../api/queries/query.config";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import TextTicker from 'react-native-text-ticker';
|
||||
import PlayPauseButton from "./helpers/buttons";
|
||||
import { useSafeAreaFrame } from "react-native-safe-area-context";
|
||||
import Client from "@/api/client";
|
||||
|
||||
export function Miniplayer({ navigation }: { navigation : NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> }) : React.JSX.Element {
|
||||
|
||||
const { nowPlaying, useSkip } = usePlayerContext();
|
||||
|
||||
const { apiClient } = useApiClientContext();
|
||||
|
||||
const { width } = useSafeAreaFrame();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { queryConfig } from "@/api/queries/query.config";
|
||||
import { HorizontalSlider } from "@/components/Global/helpers/slider";
|
||||
import { RunTimeSeconds } from "@/components/Global/helpers/time-codes";
|
||||
import { useApiClientContext } from "@/components/jellyfin-api-provider";
|
||||
import { StackParamList } from "@/components/types";
|
||||
import { usePlayerContext } from "@/player/provider";
|
||||
import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
@@ -17,12 +16,10 @@ import Icon from "@/components/Global/helpers/icon";
|
||||
import { Colors } from "@/enums/colors";
|
||||
import { State } from "react-native-track-player";
|
||||
import FavoriteHeaderButton from "@/components/Global/components/favorite-header-button";
|
||||
import Client from "@/api/client";
|
||||
|
||||
export default function PlayerScreen({ navigation }: { navigation: NativeStackNavigationProp<StackParamList>}): React.JSX.Element {
|
||||
|
||||
|
||||
const { apiClient } = useApiClientContext();
|
||||
|
||||
const {
|
||||
useTogglePlayback,
|
||||
playbackState,
|
||||
|
||||
@@ -2,7 +2,6 @@ import { BaseItemDto, ImageType } from "@jellyfin/sdk/lib/generated-client/model
|
||||
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
|
||||
import { StackParamList } from "../types";
|
||||
import { ScrollView, XStack, YStack } from "tamagui";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { usePlayerContext } from "@/player/provider";
|
||||
import { useItemTracks } from "@/api/queries/tracks";
|
||||
import { RunTimeTicks } from "../Global/helpers/time-codes";
|
||||
@@ -14,6 +13,7 @@ import { getImageApi } from "@jellyfin/sdk/lib/utils/api/image-api";
|
||||
import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { useEffect } from "react";
|
||||
import Client from "@/api/client";
|
||||
|
||||
interface PlaylistProps {
|
||||
playlist: BaseItemDto;
|
||||
@@ -22,8 +22,6 @@ interface PlaylistProps {
|
||||
|
||||
export default function Playlist(props: PlaylistProps): React.JSX.Element {
|
||||
|
||||
const { apiClient, sessionId } = useApiClientContext();
|
||||
|
||||
const { nowPlaying, nowPlayingIsFavorite } = usePlayerContext();
|
||||
|
||||
const { data: tracks, isLoading, refetch } = useItemTracks(props.playlist.Id!);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { XStack } from "@tamagui/stacks";
|
||||
import React from "react";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import Avatar from "@/components/Global/helpers/avatar";
|
||||
import { Text } from "@/components/Global/helpers/text";
|
||||
import Icon from "@/components/Global/helpers/icon";
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Text } from "@/components/Global/helpers/text";
|
||||
import { useApiClientContext } from "@/components/jellyfin-api-provider";
|
||||
import React from "react";
|
||||
import { View } from "tamagui";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from "react";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { XStack, YStack } from "tamagui";
|
||||
import Icon from "../../Global/helpers/icon";
|
||||
import { H5, Text } from "@/components/Global/helpers/text";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React from "react";
|
||||
import Button from "../../Global/helpers/button";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { stop } from "react-native-track-player/lib/src/trackPlayer";
|
||||
|
||||
export default function SignOut(): React.JSX.Element {
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { useFavoriteTracks } from "@/api/queries/favorites";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { StackParamList, TracksProps } from "../types";
|
||||
import { StackParamList } from "../types";
|
||||
import { SafeAreaView, useSafeAreaFrame } from "react-native-safe-area-context";
|
||||
import { FlatList, RefreshControl } from "react-native";
|
||||
import Track from "../Global/components/track";
|
||||
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
|
||||
|
||||
export default function Tracks({ navigation }: { navigation: NativeStackNavigationProp<StackParamList> }) : React.JSX.Element {
|
||||
const { apiClient, library } = useApiClientContext();
|
||||
|
||||
const { data: tracks, refetch, isPending } = useFavoriteTracks();
|
||||
|
||||
const { width } = useSafeAreaFrame();
|
||||
|
||||
@@ -5,7 +5,6 @@ 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 _, { isEqual, isUndefined } from "lodash";
|
||||
import { useApiClientContext } from "../components/jellyfin-api-provider";
|
||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { handlePlaybackProgressUpdated, handlePlaybackState } from "./handlers";
|
||||
import { useSetupPlayer } from "@/player/hooks";
|
||||
|
||||
Reference in New Issue
Block a user