mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 03:58:36 +01:00
chore
This commit is contained in:
@@ -15,6 +15,12 @@ import { CurrentSeries } from "@/components/series/CurrentSeries";
|
|||||||
import { NextEpisodeButton } from "@/components/series/NextEpisodeButton";
|
import { NextEpisodeButton } from "@/components/series/NextEpisodeButton";
|
||||||
import { SeriesTitleHeader } from "@/components/series/SeriesTitleHeader";
|
import { SeriesTitleHeader } from "@/components/series/SeriesTitleHeader";
|
||||||
import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
|
import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
|
||||||
|
import {
|
||||||
|
currentlyPlayingItemAtom,
|
||||||
|
fullScreenAtom,
|
||||||
|
playingAtom,
|
||||||
|
showCurrentlyPlayingBarAtom,
|
||||||
|
} from "@/utils/atoms/playState";
|
||||||
import { useSettings } from "@/utils/atoms/settings";
|
import { useSettings } from "@/utils/atoms/settings";
|
||||||
import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl";
|
import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl";
|
||||||
import { getLogoImageUrlById } from "@/utils/jellyfin/image/getLogoImageUrlById";
|
import { getLogoImageUrlById } from "@/utils/jellyfin/image/getLogoImageUrlById";
|
||||||
@@ -37,12 +43,6 @@ import CastContext, {
|
|||||||
useRemoteMediaClient,
|
useRemoteMediaClient,
|
||||||
} from "react-native-google-cast";
|
} from "react-native-google-cast";
|
||||||
import { ParallaxScrollView } from "../../../components/ParallaxPage";
|
import { ParallaxScrollView } from "../../../components/ParallaxPage";
|
||||||
import {
|
|
||||||
currentlyPlayingItemAtom,
|
|
||||||
fullScreenAtom,
|
|
||||||
playingAtom,
|
|
||||||
showCurrentlyPlayingBarAtom,
|
|
||||||
} from "@/utils/atoms/playState";
|
|
||||||
|
|
||||||
const page: React.FC = () => {
|
const page: React.FC = () => {
|
||||||
const local = useLocalSearchParams();
|
const local = useLocalSearchParams();
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
import { usePlayback } from "@/providers/PlaybackProvider";
|
||||||
import { runtimeTicksToMinutes } from "@/utils/time";
|
import { runtimeTicksToMinutes } from "@/utils/time";
|
||||||
import { useActionSheet } from "@expo/react-native-action-sheet";
|
import { useActionSheet } from "@expo/react-native-action-sheet";
|
||||||
import { Feather, Ionicons } from "@expo/vector-icons";
|
import { Feather, Ionicons } from "@expo/vector-icons";
|
||||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import { Button } from "./Button";
|
|
||||||
import CastContext, {
|
import CastContext, {
|
||||||
PlayServicesState,
|
PlayServicesState,
|
||||||
useRemoteMediaClient,
|
useRemoteMediaClient,
|
||||||
} from "react-native-google-cast";
|
} from "react-native-google-cast";
|
||||||
import { usePlayback } from "@/providers/PlaybackProvider";
|
import { Button } from "./Button";
|
||||||
|
|
||||||
interface Props extends React.ComponentProps<typeof Button> {
|
interface Props extends React.ComponentProps<typeof Button> {
|
||||||
item?: BaseItemDto | null;
|
item?: BaseItemDto | null;
|
||||||
|
|||||||
@@ -56,13 +56,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
|||||||
const [jellyfin, setJellyfin] = useState<Jellyfin | undefined>(undefined);
|
const [jellyfin, setJellyfin] = useState<Jellyfin | undefined>(undefined);
|
||||||
const [deviceId, setDeviceId] = useState<string | undefined>(undefined);
|
const [deviceId, setDeviceId] = useState<string | undefined>(undefined);
|
||||||
const [isConnected, setIsConnected] = useState<boolean>(false);
|
const [isConnected, setIsConnected] = useState<boolean>(false);
|
||||||
const [playing, setPlaying] = useAtom(playingAtom);
|
|
||||||
const [currentlyPlaying, setCurrentlyPlaying] = useAtom(
|
|
||||||
currentlyPlayingItemAtom
|
|
||||||
);
|
|
||||||
const [showCurrentlyPlayingBar, setShowCurrentlyPlayingBar] = useAtom(
|
|
||||||
showCurrentlyPlayingBarAtom
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
@@ -115,11 +108,8 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
|||||||
// On PlayPause
|
// On PlayPause
|
||||||
if (command === "PlayPause") {
|
if (command === "PlayPause") {
|
||||||
console.log("Command ~ PlayPause");
|
console.log("Command ~ PlayPause");
|
||||||
setPlaying((state) => !state);
|
|
||||||
} else if (command === "Stop") {
|
} else if (command === "Stop") {
|
||||||
console.log("Command ~ Stop");
|
console.log("Command ~ Stop");
|
||||||
setPlaying(false);
|
|
||||||
setShowCurrentlyPlayingBar(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user