This commit is contained in:
Fredrik Burmester
2025-01-03 10:12:43 +01:00
parent ea3cc18b3c
commit 7639de153b
6 changed files with 2 additions and 29 deletions

View File

@@ -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 [];

View File

@@ -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();

View File

@@ -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();

View File

@@ -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,

View File

@@ -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 };

View File

@@ -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`;