mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
chore: remove console.log
This commit is contained in:
@@ -76,9 +76,6 @@ function Layout() {
|
||||
|
||||
if (url) {
|
||||
const { hostname, path, queryParams } = Linking.parse(url);
|
||||
console.log("Linking ~ ", hostname, path, queryParams);
|
||||
// @ts-ignore
|
||||
// router.push("/(auth)/(home)/");
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -195,7 +195,6 @@ export const CurrentlyPlayingBar: React.FC = () => {
|
||||
onFullscreenPlayerDidDismiss={() => {}}
|
||||
onFullscreenPlayerDidPresent={() => {}}
|
||||
onPlaybackStateChanged={(e) => {
|
||||
console.log("onPlaybackStateChanged ~", e.isPlaying);
|
||||
if (e.isPlaying === true) {
|
||||
playVideo(false);
|
||||
} else if (e.isPlaying === false) {
|
||||
|
||||
@@ -51,11 +51,9 @@ export const ItemImage: React.FC<Props> = ({
|
||||
};
|
||||
break;
|
||||
case "Primary":
|
||||
console.log("case Primary");
|
||||
tag = item.ImageTags?.["Primary"];
|
||||
if (!tag) break;
|
||||
blurhash = item.ImageBlurHashes?.Primary?.[tag];
|
||||
console.log("bh: ", blurhash);
|
||||
|
||||
src = {
|
||||
uri: `${api.basePath}/Items/${item.Id}/Images/Primary?quality=${quality}&tag=${tag}`,
|
||||
@@ -63,11 +61,9 @@ export const ItemImage: React.FC<Props> = ({
|
||||
};
|
||||
break;
|
||||
case "Thumb":
|
||||
console.log("case Thumb");
|
||||
tag = item.ImageTags?.["Thumb"];
|
||||
if (!tag) break;
|
||||
blurhash = item.ImageBlurHashes?.Thumb?.[tag];
|
||||
console.log("bh: ", blurhash);
|
||||
|
||||
src = {
|
||||
uri: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=${quality}&tag=${tag}`,
|
||||
@@ -75,7 +71,6 @@ export const ItemImage: React.FC<Props> = ({
|
||||
};
|
||||
break;
|
||||
default:
|
||||
console.log("case default");
|
||||
tag = item.ImageTags?.["Primary"];
|
||||
src = {
|
||||
uri: `${api.basePath}/Items/${item.Id}/Images/Primary?quality=${quality}&tag=${tag}`,
|
||||
|
||||
@@ -22,8 +22,6 @@ export const TouchableItemRouter: React.FC<PropsWithChildren<Props>> = ({
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
console.log("[0]", item.Type);
|
||||
|
||||
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
||||
|
||||
if (item.Type === "Series") {
|
||||
|
||||
@@ -107,7 +107,7 @@ export const LibraryItemCard: React.FC<Props> = ({ library, ...props }) => {
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting colors", error);
|
||||
console.error("Error getting colors", error);
|
||||
});
|
||||
}
|
||||
}, [url]);
|
||||
|
||||
@@ -110,12 +110,11 @@ export const SeasonEpisodesCarousel: React.FC<Props> = ({
|
||||
if (item?.Type === "Episode") {
|
||||
const index = episodes?.findIndex((ep) => ep.Id === item.Id);
|
||||
if (index !== undefined && index !== -1) {
|
||||
console.log("Scrolling to index:", index);
|
||||
setTimeout(() => {
|
||||
scrollToIndex(index);
|
||||
}, 400);
|
||||
} else {
|
||||
console.log("Episode not found in the list:", item.Id);
|
||||
console.warn("Episode not found in the list:", item.Id);
|
||||
}
|
||||
}
|
||||
}, [episodes, item]);
|
||||
|
||||
@@ -60,7 +60,6 @@ export const SeasonPicker: React.FC<Props> = ({ item, initialSeasonIndex }) => {
|
||||
if (seasons && seasons.length > 0 && seasonIndex === undefined) {
|
||||
let initialIndex: number | undefined;
|
||||
|
||||
console.log("initialSeasonIndex", initialSeasonIndex);
|
||||
if (initialSeasonIndex !== undefined) {
|
||||
// Use the provided initialSeasonIndex if it exists in the seasons
|
||||
const seasonExists = seasons.some(
|
||||
|
||||
@@ -97,7 +97,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
if (response?.status === 200) {
|
||||
setSecret(response?.data?.Secret);
|
||||
setIsPolling(true);
|
||||
console.log("Initiating quick connect");
|
||||
return response.data?.Code;
|
||||
} else {
|
||||
throw new Error("Failed to initiate quick connect");
|
||||
@@ -116,7 +115,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
`${api.basePath}/QuickConnect/Connect?Secret=${secret}`
|
||||
);
|
||||
|
||||
console.log("Polling quick connect");
|
||||
if (response.status === 200) {
|
||||
if (response.data.Authenticated) {
|
||||
setIsPolling(false);
|
||||
@@ -133,7 +131,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
|
||||
const { AccessToken, User } = authResponse.data;
|
||||
api.accessToken = AccessToken;
|
||||
console.log("Quick connect authenticated", AccessToken, User.Id);
|
||||
setUser(User);
|
||||
await AsyncStorage.setItem("token", AccessToken);
|
||||
await AsyncStorage.setItem("user", JSON.stringify(User));
|
||||
@@ -207,7 +204,6 @@ export const JellyfinProvider: React.FC<{ children: ReactNode }> = ({
|
||||
}
|
||||
} catch (error) {
|
||||
if (axios.isAxiosError(error)) {
|
||||
console.log("Axios error", error.response?.status);
|
||||
switch (error.response?.status) {
|
||||
case 401:
|
||||
throw new Error("Invalid username or password");
|
||||
|
||||
@@ -99,7 +99,6 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
if (state && state.item.Id && user?.Id) {
|
||||
const vlcLink = "vlc://" + state?.url;
|
||||
if (vlcLink && settings?.openInVLC) {
|
||||
console.log(vlcLink, settings?.openInVLC, Platform.OS === "ios");
|
||||
Linking.openURL("vlc://" + state?.url || "");
|
||||
return;
|
||||
}
|
||||
@@ -231,8 +230,6 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
api?.accessToken
|
||||
}&deviceId=${deviceId}`;
|
||||
|
||||
console.log("WS", url);
|
||||
|
||||
const newWebSocket = new WebSocket(url);
|
||||
|
||||
let keepAliveInterval: NodeJS.Timeout | null = null;
|
||||
@@ -243,7 +240,6 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
keepAliveInterval = setInterval(() => {
|
||||
if (newWebSocket.readyState === WebSocket.OPEN) {
|
||||
newWebSocket.send(JSON.stringify({ MessageType: "KeepAlive" }));
|
||||
console.log("KeepAlive message sent");
|
||||
}
|
||||
}, 30000);
|
||||
};
|
||||
@@ -254,7 +250,6 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
|
||||
};
|
||||
|
||||
newWebSocket.onclose = (e) => {
|
||||
console.log("WebSocket connection closed:", e.reason);
|
||||
if (keepAliveInterval) {
|
||||
clearInterval(keepAliveInterval);
|
||||
}
|
||||
|
||||
@@ -41,8 +41,6 @@ export const reportPlaybackStopped = async ({
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("reportPlaybackStopped ~", { sessionId, itemId });
|
||||
|
||||
try {
|
||||
const url = `${api.basePath}/PlayingItems/${itemId}`;
|
||||
const params = {
|
||||
|
||||
@@ -52,7 +52,6 @@ export const postCapabilities = async ({
|
||||
);
|
||||
return d;
|
||||
} catch (error: any | AxiosError) {
|
||||
console.log("Failed to mark as not played", error);
|
||||
throw new Error("Failed to mark as not played");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user