From 7639de153bcddfea66cc107fcab885854951c970 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 3 Jan 2025 10:12:43 +0100 Subject: [PATCH] chore --- app/(auth)/(tabs)/(search)/index.tsx | 3 --- app/(auth)/player/direct-player.tsx | 7 ------- app/(auth)/player/music-player.tsx | 3 --- app/(auth)/player/transcoding-player.tsx | 15 +-------------- app/(auth)/trailer/page.tsx | 1 - components/common/TouchableItemRouter.tsx | 2 +- 6 files changed, 2 insertions(+), 29 deletions(-) diff --git a/app/(auth)/(tabs)/(search)/index.tsx b/app/(auth)/(tabs)/(search)/index.tsx index 9f4ed6be..7d9ecebe 100644 --- a/app/(auth)/(tabs)/(search)/index.tsx +++ b/app/(auth)/(tabs)/(search)/index.tsx @@ -96,7 +96,6 @@ export default function search() { } else { if (!settings?.marlinServerUrl) return []; - console.log(settings.marlinServerUrl); const url = `${ settings.marlinServerUrl }/search?q=${encodeURIComponent(query)}&includeItemTypes=${types @@ -105,8 +104,6 @@ export default function search() { const response1 = await axios.get(url); - console.log(response1.statusText); - const ids = response1.data.ids; if (!ids || !ids.length) return []; diff --git a/app/(auth)/player/direct-player.tsx b/app/(auth)/player/direct-player.tsx index e4b49320..5b6d086d 100644 --- a/app/(auth)/player/direct-player.tsx +++ b/app/(auth)/player/direct-player.tsx @@ -104,7 +104,6 @@ export default function page() { } = useQuery({ queryKey: ["item", itemId], queryFn: async () => { - console.log("Offline:", offline); if (offline) { const item = await getDownloadedItem(itemId); if (item) return item.item; @@ -128,7 +127,6 @@ export default function page() { } = useQuery({ queryKey: ["stream-url", itemId, mediaSourceId, bitrateValue], queryFn: async () => { - console.log("Offline:", offline); if (offline) { const data = await getDownloadedItem(itemId); if (!data?.mediaSource) return null; @@ -195,8 +193,6 @@ export default function page() { playSessionId: stream.sessionId, }); } - - console.log("Actually marked as paused"); } else { videoRef.current?.play(); if (!offline && stream) { @@ -339,7 +335,6 @@ export default function page() { React.useCallback(() => { return async () => { stop(); - console.log("Unmounted"); }; }, []) ); @@ -349,10 +344,8 @@ export default function page() { useEffect(() => { const handleAppStateChange = (nextAppState: AppStateStatus) => { if (appState.match(/inactive|background/) && nextAppState === "active") { - console.log("App has come to the foreground!"); // Handle app coming to the foreground } else if (nextAppState.match(/inactive|background/)) { - console.log("App has gone to the background!"); // Handle app going to the background if (videoRef.current && videoRef.current.pause) { videoRef.current.pause(); diff --git a/app/(auth)/player/music-player.tsx b/app/(auth)/player/music-player.tsx index 13aa4ecc..eca16b4c 100644 --- a/app/(auth)/player/music-player.tsx +++ b/app/(auth)/player/music-player.tsx @@ -169,18 +169,15 @@ export default function page() { ); const play = useCallback(() => { - console.log("play"); videoRef.current?.resume(); reportPlaybackStart(); }, [videoRef]); const pause = useCallback(() => { - console.log("play"); videoRef.current?.pause(); }, [videoRef]); const stop = useCallback(() => { - console.log("stop"); setIsPlaybackStopped(true); videoRef.current?.pause(); reportPlaybackStopped(); diff --git a/app/(auth)/player/transcoding-player.tsx b/app/(auth)/player/transcoding-player.tsx index f382411b..8a8b4a9f 100644 --- a/app/(auth)/player/transcoding-player.tsx +++ b/app/(auth)/player/transcoding-player.tsx @@ -260,13 +260,6 @@ const Player = () => { progress.value = ticks; cacheProgress.value = secondsToTicks(data.playableDuration); - console.log( - "onProgress ~", - ticks, - isPlaying, - `AUDIO index: ${audioIndex} SUB index" ${subtitleIndex}` - ); - // TODO: Use this when streaming with HLS url, but NOT when direct playing // TODO: since playable duration is always 0 then. setIsBuffering(data.playableDuration === 0); @@ -339,11 +332,7 @@ const Player = () => { // Most likely the subtitle is burned in. if (embeddedTrackIndex === -1) return; - console.log( - "Setting selected text track", - subtitleIndex, - embeddedTrackIndex - ); + setSelectedTextTrack({ type: SelectedTrackType.INDEX, value: embeddedTrackIndex, @@ -439,7 +428,6 @@ const Player = () => { setIsBuffering(e.isBuffering); }} onAudioTracks={(e) => { - console.log("onAudioTracks: ", e.audioTracks); setAudioTracks( e.audioTracks.map((t) => ({ index: t.index, @@ -493,7 +481,6 @@ const Player = () => { }} getAudioTracks={getAudioTracks} setAudioTrack={(i) => { - console.log("setAudioTrack ~", i); setSelectedAudioTrack({ type: SelectedTrackType.INDEX, value: i, diff --git a/app/(auth)/trailer/page.tsx b/app/(auth)/trailer/page.tsx index abcf6352..9f331795 100644 --- a/app/(auth)/trailer/page.tsx +++ b/app/(auth)/trailer/page.tsx @@ -5,7 +5,6 @@ import YoutubePlayer, { PLAYER_STATES } from "react-native-youtube-iframe"; export default function page() { const searchParams = useGlobalSearchParams(); - console.log(searchParams); const { url } = searchParams as { url: string }; diff --git a/components/common/TouchableItemRouter.tsx b/components/common/TouchableItemRouter.tsx index f57a3277..c13e9821 100644 --- a/components/common/TouchableItemRouter.tsx +++ b/components/common/TouchableItemRouter.tsx @@ -16,7 +16,7 @@ export const itemRouter = ( item: BaseItemDto | BaseItemPerson, from: string ) => { - console.log(item.Type); + console.log(item.Type, item?.CollectionType); if ("CollectionType" in item && item.CollectionType === "livetv") { return `/(auth)/(tabs)/${from}/livetv`;