Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JorrinKievit committed Aug 13, 2024
1 parent a40c5f9 commit 9bc7dd8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 1 addition & 4 deletions apps/expo/src/components/player/CaptionsSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { LanguageCode } from "iso-639-1";
import type { ContentCaption } from "subsrt-ts/dist/types/handler";
import { useState } from "react";
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
import { useMutation } from "@tanstack/react-query";
Expand Down Expand Up @@ -28,9 +27,7 @@ const parseCaption = async (
const data = await response.text();
return {
...caption,
data: parse(data).filter(
(cue) => cue.type === "caption",
) as ContentCaption[],
data: parse(data).filter((cue) => cue.type === "caption"),
};
};

Expand Down
12 changes: 6 additions & 6 deletions apps/expo/src/components/player/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export const VideoPlayer = () => {
const setMeta = usePlayerStore((state) => state.setMeta);
const isLocalFile = usePlayerStore((state) => state.isLocalFile);

const { gestureControls, autoPlay } = usePlayerSettingsStore();
const { updateWatchHistory, removeFromWatchHistory, getWatchHistoryItem } =
useWatchHistoryStore();
const { wifiDefaultQuality, mobileDataDefaultQuality } =
useNetworkSettingsStore();

const player = useVideoPlayer(videoSrc, (player) => {
if (state === "playing") {
player.play();
Expand All @@ -95,12 +101,6 @@ export const VideoPlayer = () => {
}
}, [player, setVideoPlayer]);

const { gestureControls, autoPlay } = usePlayerSettingsStore();
const { updateWatchHistory, removeFromWatchHistory, getWatchHistoryItem } =
useWatchHistoryStore();
const { wifiDefaultQuality, mobileDataDefaultQuality } =
useNetworkSettingsStore();

const updateResizeMode = (newMode: ResizeMode) => {
setResizeMode(newMode);
void Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
Expand Down
6 changes: 3 additions & 3 deletions apps/expo/src/hooks/player/useSourceScrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export const useBaseScrape = () => {
const startEvent = useCallback((id: ScraperEvent<"start">) => {
const lastIdTmp = lastId.current;
setSources((s) => {
if (s[id]) s[id]!.status = "pending";
if (lastIdTmp && s[lastIdTmp] && s[lastIdTmp]!.status === "pending")
s[lastIdTmp]!.status = "success";
if (s[id]) s[id].status = "pending";
if (lastIdTmp && s[lastIdTmp] && s[lastIdTmp].status === "pending")
s[lastIdTmp].status = "success";
return { ...s };
});
setCurrentSource(id);
Expand Down

0 comments on commit 9bc7dd8

Please sign in to comment.