diff --git a/Blink-arm64-release.apk b/Blink-arm64-release.apk new file mode 100644 index 0000000..0f5a34d Binary files /dev/null and b/Blink-arm64-release.apk differ diff --git a/src/components/albumMusicTrack/albumMusicTrack.scss b/src/components/albumMusicTrack/albumMusicTrack.scss index d2dafaf..0718f9d 100644 --- a/src/components/albumMusicTrack/albumMusicTrack.scss +++ b/src/components/albumMusicTrack/albumMusicTrack.scss @@ -1,6 +1,6 @@ .album-track { display: grid; - grid-template-columns: 2.4em minmax(0, 1fr) 4.5em 2.6em; + grid-template-columns: 2.4em minmax(0, 1fr) 4.5em auto; gap: 1em; align-items: center; padding: 0.5em 1em; @@ -69,7 +69,9 @@ &-like { display: flex; - justify-content: center; + align-items: center; + justify-content: flex-end; + gap: 0.1em; opacity: 0; transition: opacity $transition-time-fast; diff --git a/src/components/albumMusicTrack/index.tsx b/src/components/albumMusicTrack/index.tsx index 8a92031..423a105 100644 --- a/src/components/albumMusicTrack/index.tsx +++ b/src/components/albumMusicTrack/index.tsx @@ -2,19 +2,20 @@ import type { BaseItemDto, BaseItemDtoQueryResult, } from "@jellyfin/sdk/lib/generated-client"; -import React from "react"; import { useSnackbar } from "notistack"; -import lyricsIcon from "../../assets/icons/lyrics.svg"; +import React from "react"; import { getRuntimeMusic } from "@/utils/date/time"; +import { useApiInContext } from "@/utils/store/api"; import { generateAudioStreamUrl, playAudio, useAudioPlayback, } from "@/utils/store/audioPlayback"; -import { useApiInContext } from "@/utils/store/api"; import { useCentralStore } from "@/utils/store/central"; import { setQueue } from "@/utils/store/queue"; +import lyricsIcon from "../../assets/icons/lyrics.svg"; import LikeButton from "../buttons/likeButton"; +import RatingControl from "../buttons/ratingControl"; import "./albumMusicTrack.scss"; @@ -25,10 +26,17 @@ type AlbumMusicTrackProps = { */ trackIndex: number; musicTracks: BaseItemDtoQueryResult | null; + /** Query key of the list this track belongs to, refreshed after a rating change. */ + queryKey?: string[]; }; export default function AlbumMusicTrack(props: AlbumMusicTrackProps) { - const { track, musicTracks, trackIndex } = props; + const { + track, + musicTracks, + trackIndex, + queryKey = ["item", "musicTracks"], + } = props; const [currentPlayingItem] = useAudioPlayback((state) => [state.item]); const user = useCentralStore((state) => state.currentUser); @@ -88,17 +96,13 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) { play_arrow - - {track.IndexNumber ?? "–"} - + {track.IndexNumber ?? "–"}
{track.Name} {(artists.length > 0 || track.HasLyrics) && ( - {track.HasLyrics && ( - Есть текст песни - )} + {track.HasLyrics && Есть текст песни} {artists.join(", ")} )} @@ -107,10 +111,18 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) { {getRuntimeMusic(track.RunTimeTicks ?? 0)}
e.stopPropagation()}> + diff --git a/src/components/appStatus/appStatus.scss b/src/components/appStatus/appStatus.scss new file mode 100644 index 0000000..e22b947 --- /dev/null +++ b/src/components/appStatus/appStatus.scss @@ -0,0 +1,117 @@ +/* Titlebar status: a tiny spinner that resolves into check / warning. */ +.app-status { + --status-accent: rgb(255 255 255 / 0.8); + + position: relative; + display: grid; + place-items: center; + width: 2.35rem; + height: 2.35rem; + flex: 0 0 auto; + border-radius: 50%; + color: var(--status-accent); + opacity: 0; + transform: scale(0.92); + pointer-events: none; + transition: + opacity 0.18s ease, + transform 0.18s ease, + background-color 0.15s ease, + color 0.18s ease; +} + +.app-status--loading, +.app-status--success, +.app-status--warning, +.app-status--error, +.app-status--info { + opacity: 1; + transform: scale(1); + pointer-events: auto; +} + +/* Same hover language as the other titlebar icon buttons. */ +.app-status--loading:hover, +.app-status--success:hover, +.app-status--warning:hover, +.app-status--error:hover, +.app-status--info:hover { + background: rgb(255 255 255 / 0.1); +} + +.app-status--loading { + --status-accent: rgb(255 255 255 / 0.8); +} + +.app-status--success { + --status-accent: #65e6a3; +} + +.app-status--warning { + --status-accent: #ffc46b; +} + +.app-status--error { + --status-accent: #ff8a7a; +} + +.app-status--info { + --status-accent: #8fd0ff; +} + +.app-status__icon { + display: grid; + place-items: center; + width: 100%; + height: 100%; + + .material-symbols-rounded { + font-size: 1.35rem; + } +} + +.app-status__spinner { + width: 1.05rem; + height: 1.05rem; + border: 2px solid currentColor; + border-right-color: transparent; + border-radius: 50%; + animation: app-status-spin 0.8s linear infinite; +} + +@keyframes app-status-spin { + to { + transform: rotate(360deg); + } +} + +/* On auth screens the titlebar is hidden; keep the same feedback as a plain + icon next to the window controls, without a separate badge around it. */ +.app-status--floating { + position: fixed; + top: calc(10px + var(--safe-top)); + right: calc(150px + var(--safe-right, 0px)); + z-index: 1002; + filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.5)); +} + +html.is-android .app-status--floating { + right: 12px; +} + +@media (max-width: 900px) { + .app-status { + width: 2.15rem; + height: 2.15rem; + } + + .app-status--floating { + top: calc(8px + var(--safe-top)); + right: 12px; + } +} + +/* Notifications are rendered as the titlebar status instead of toasts. */ +.notistack-SnackbarContainer { + display: none !important; +} diff --git a/src/components/appStatus/index.tsx b/src/components/appStatus/index.tsx new file mode 100644 index 0000000..4266233 --- /dev/null +++ b/src/components/appStatus/index.tsx @@ -0,0 +1,77 @@ +import { Tooltip } from "@mui/material"; +import { useLocation } from "@tanstack/react-router"; +import { AnimatePresence, motion } from "motion/react"; +import React from "react"; +import { shouldShowTitlebar } from "@/components/appTitlebar/routeVisibility"; +import { + type AppStatusPhase, + useAppStatusStore, +} from "@/utils/store/appStatus"; + +import "./appStatus.scss"; + +const ICONS: Record, string> = { + success: "check", + warning: "warning", + error: "warning", + info: "info", +}; + +export const AppStatusIndicator = ({ + floating = false, +}: { + floating?: boolean; +}) => { + const phase = useAppStatusStore((state) => state.phase); + const message = useAppStatusStore((state) => state.message); + + if (phase === "idle") { + return floating ? null : ( +
+ { setCheckForQuickConnect(true); }, onError: (error) => { - enqueueSnackbar("Не удалось запустить Quick Connect.", { variant: "error" }); + enqueueSnackbar("Не удалось запустить Quick Connect.", { + variant: "error", + }); console.error(error); }, }); @@ -157,7 +159,6 @@ const QuickConnectButton = (props: LoadingButtonProps) => { useInterval( () => { if (quickConnectSecret) { - console.log(checkForQuickConnect); checkQuickConnectStatus.mutate(quickConnectSecret); } }, @@ -187,9 +188,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => { : "Quick Connect недоступен"} - {quickConnectEnabled.data?.data - ? "Quick Connect" - : "QC недоступен"} + {quickConnectEnabled.data?.data ? "Quick Connect" : "QC недоступен"} { variant="body2" sx={{ mt: 2, opacity: 0.75, textAlign: "center" }} > - Или отсканируйте код в Blink на телефоне, чтобы подтвердить вход. + Или отсканируйте код в Blink на телефоне, чтобы подтвердить + вход. -
+
state.api); + const queryClient = useQueryClient(); + const { enqueueSnackbar } = useSnackbar(); + const [rating, setRating] = React.useState(likes); + + React.useEffect(() => { + setRating(likes); + }, [likes]); + + const mutation = useMutation({ + mutationKey: ["ratingControl", itemId], + mutationFn: async (next: boolean | null) => { + if (!api || !itemId || !userId) return null; + const userDataApi = getUserDataApi(api); + const response = + next === null + ? await userDataApi.deleteUserItemRating({ itemId, userId }) + : await userDataApi.updateUserItemRating({ + itemId, + userId, + likes: next, + }); + return response.data; + }, + onSuccess: (data) => { + if (data) setRating(data.Likes ?? null); + }, + onError: () => { + setRating(likes); + enqueueSnackbar( + `Не удалось обновить оценку${itemName ? ` «${itemName}»` : ""}`, + { variant: "error" }, + ); + }, + onSettled: async () => { + if (queryKey) { + await queryClient.invalidateQueries({ queryKey }); + } + // Keep item details (full player, floating bar, headers) in sync. + if (itemId) { + await queryClient.invalidateQueries({ queryKey: ["item", itemId] }); + } + }, + }); + + const updateRating = (next: boolean) => { + if (!api || !itemId || !userId || mutation.isPending) return; + const value = rating === next ? null : next; + setRating(value); + mutation.mutate(value); + }; + + const disabled = !api || !itemId || !userId; + const isLiked = rating === true; + const isDisliked = rating === false; + const size = compact ? "small" : "medium"; + + return ( +
event.stopPropagation()} + onKeyDown={(event) => event.stopPropagation()} + > + + + updateRating(true)} + sx={{ opacity: mutation.isPending ? 0.5 : 1 }} + > + + thumb_up + + + + + + + updateRating(false)} + sx={{ opacity: mutation.isPending ? 0.5 : 1 }} + > + + thumb_down + + + + +
+ ); +} diff --git a/src/components/carousel/index.tsx b/src/components/carousel/index.tsx index 69285a0..7091fd1 100644 --- a/src/components/carousel/index.tsx +++ b/src/components/carousel/index.tsx @@ -1,11 +1,13 @@ -import React, { useCallback, useEffect, useState } from "react"; import type { Api } from "@jellyfin/sdk"; import { type BaseItemDto, BaseItemKind, } from "@jellyfin/sdk/lib/generated-client"; +import { AnimatePresence } from "motion/react"; +import React, { useCallback, useEffect, useState } from "react"; import { useCarouselStore } from "../../utils/store/carousel"; import "./carousel.scss"; +import CachedImage from "@/components/cachedImage"; import getImageUrlsApi from "@/utils/methods/getImageUrlsApi"; import { resolveItemImage } from "@/utils/methods/itemImages"; import { useApiInContext } from "@/utils/store/api"; @@ -17,10 +19,7 @@ const AUTOPLAY_MS = 9000; const MemoizedCarouselSlide = React.memo(CarouselSlide); /** Wide artwork for the trending rail, falling back through the item's images. */ -const trendingImageUrl = ( - api: Api, - item: BaseItemDto, -): string | undefined => { +const trendingImageUrl = (api: Api, item: BaseItemDto): string | undefined => { const image = resolveItemImage(item, "Thumb"); if (!image) return undefined; return getImageUrlsApi(api).getItemImageUrlById( @@ -101,7 +100,9 @@ const Carousel = ({ onMouseEnter={() => setIsPaused(true)} onMouseLeave={() => setIsPaused(false)} > - + + + {total > 1 && (
+ } + /> {trendingLabel(item)} diff --git a/src/components/carouselSlide/index.tsx b/src/components/carouselSlide/index.tsx index 461e2e1..e2222ab 100644 --- a/src/components/carouselSlide/index.tsx +++ b/src/components/carouselSlide/index.tsx @@ -7,27 +7,27 @@ import Chip from "@mui/material/Chip"; import { green, red, yellow } from "@mui/material/colors"; import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; -import { useNavigate } from "@tanstack/react-router"; import { useQuery } from "@tanstack/react-query"; +import { useNavigate } from "@tanstack/react-router"; import { motion, type Variants } from "motion/react"; import React from "react"; +import CachedImage from "@/components/cachedImage"; import { endsAt, getRuntime } from "@/utils/date/time"; import { getHeroPosterUrl, getItemImagesQueryOptions, resolveHeroArtwork, } from "@/utils/methods/heroArtwork"; -import CachedImage from "@/components/cachedImage"; -import BlurhashCanvas from "../blurhash-canvas"; +import { getItemLinkOptions } from "@/utils/navigation/itemLink"; import { useApiInContext } from "@/utils/store/api"; import { useCarouselStore } from "@/utils/store/carousel"; import { useCentralStore } from "@/utils/store/central"; +import BlurhashCanvas from "../blurhash-canvas"; import LikeButton from "../buttons/likeButton"; import MarkPlayedButton from "../buttons/markPlayedButton"; import PlayButton from "../buttons/playButton"; import { getTypeIcon } from "../utils/iconsCollection"; -import { getItemLinkOptions } from "@/utils/navigation/itemLink"; const MotionTypography = motion.create(Typography); const MotionStack = motion.create(Stack); @@ -79,14 +79,17 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => { : undefined; return ( -
- + +
{heroArtwork?.blurhash && ( { loading="eager" /> )} - +
{ -
+ ); }; diff --git a/src/components/musicTrack/index.tsx b/src/components/musicTrack/index.tsx index e4af2c6..5a45adb 100644 --- a/src/components/musicTrack/index.tsx +++ b/src/components/musicTrack/index.tsx @@ -9,13 +9,14 @@ import { } from "../../utils/store/audioPlayback"; import LikeButton from "../buttons/likeButton"; import PlayButton from "../buttons/playButton"; +import RatingControl from "../buttons/ratingControl"; import "./musicTrack.scss"; +import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; +import { Link } from "@tanstack/react-router"; import CachedImage from "@/components/cachedImage"; import getImageUrlsApi from "@/utils/methods/getImageUrlsApi"; import { resolveItemImage } from "@/utils/methods/itemImages"; import { useApiInContext } from "@/utils/store/api"; -import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; -import { Link } from "@tanstack/react-router"; import { useCentralStore } from "@/utils/store/central"; import { setQueue } from "@/utils/store/queue"; import lyrics_icon from "../../assets/icons/lyrics.svg"; @@ -59,10 +60,7 @@ const MusicTrack = ({ return; } if (queue && queue.length > 0) { - const index = Math.max( - 0, - Math.min(queueIndex ?? 0, queue.length - 1), - ); + const index = Math.max(0, Math.min(queueIndex ?? 0, queue.length - 1)); const selected = queue[index]; if (!selected?.Id) return; playAudio( @@ -218,11 +216,7 @@ const MusicTrack = ({ ))}
{item.Album && ( - + {item.Album} )} @@ -230,7 +224,15 @@ const MusicTrack = ({ {getRuntimeMusic(item.RunTimeTicks ?? 0)} -
+
+
); }; diff --git a/src/components/playback/audioPlayer/index.tsx b/src/components/playback/audioPlayer/index.tsx index 63ff82e..06f4918 100644 --- a/src/components/playback/audioPlayer/index.tsx +++ b/src/components/playback/audioPlayer/index.tsx @@ -10,11 +10,13 @@ import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api"; import IconButton from "@mui/material/IconButton"; import Tooltip from "@mui/material/Tooltip"; import Typography from "@mui/material/Typography"; +import { useQuery } from "@tanstack/react-query"; import { useLocation, useNavigate } from "@tanstack/react-router"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { useSnackbar } from "notistack"; import React, { type SyntheticEvent, useEffect, useRef, useState } from "react"; import LikeButton from "@/components/buttons/likeButton"; +import RatingControl from "@/components/buttons/ratingControl"; import { secToTicks, ticksToSec } from "@/utils/date/time"; import { beginAudioPlaybackReport, @@ -29,6 +31,7 @@ import { import getImageUrlsApi, { getPlayerCoverUrl, } from "@/utils/methods/getImageUrlsApi"; +import { getItemQueryOptions } from "@/utils/queries/items"; import { useApiInContext } from "@/utils/store/api"; import { setAudioPlaying, @@ -151,6 +154,12 @@ const AudioPlayer = () => { const activeItem: BaseItemDto | undefined | null = remote?.NowPlayingItem ?? item; + // Fresh user data, so rating and favourite set elsewhere (full player, + // another list) are reflected in the bar without a reload. + const activeItemDetails = useQuery({ + ...getItemQueryOptions(activeItem?.Id ?? "", api, user?.Id), + enabled: Boolean(activeItem?.Id && api && user?.Id), + }); const artists = activeItem?.ArtistItems?.length ? activeItem.ArtistItems : (activeItem?.AlbumArtists ?? []); @@ -632,11 +641,28 @@ const AudioPlayer = () => {
+ {activeItem?.Id && ( + + )} diff --git a/src/components/playback/videoPlayer/controls.tsx b/src/components/playback/videoPlayer/controls.tsx index 209f6bc..f1b0e66 100644 --- a/src/components/playback/videoPlayer/controls.tsx +++ b/src/components/playback/videoPlayer/controls.tsx @@ -10,6 +10,7 @@ import React, { useState, } from "react"; import { useShallow } from "zustand/shallow"; +import { AppStatusIndicator } from "@/components/appStatus"; import CastButton from "@/components/buttons/castButton"; import PlayNextButton from "@/components/buttons/playNextButton"; import PlayPreviousButton from "@/components/buttons/playPreviousButtom"; @@ -20,8 +21,8 @@ import { secToTicks, ticksToSec } from "@/utils/date/time"; import { buildPlayDeepLink } from "@/utils/deepLinks"; import { openSyncPlayDialog } from "@/utils/methods/syncPlay"; import { useApiInContext } from "@/utils/store/api"; -import { useShareStore } from "@/utils/store/share"; import { usePlaybackStore } from "@/utils/store/playback"; +import { useShareStore } from "@/utils/store/share"; import useSyncPlayback from "@/utils/store/syncPlayback"; import type { VideoFitMode } from "@/utils/types/videoFitMode"; import CaptionsButton from "./buttons/CaptionsButton"; @@ -38,8 +39,7 @@ import EndsAtDisplay from "./EndsAtDisplay"; import VideoPlayerSettingsMenu from "./settingsMenu"; import "./controls.scss"; -import { clearQueue } from "@/utils/store/queue"; -import useQueue from "@/utils/store/queue"; +import useQueue, { clearQueue } from "@/utils/store/queue"; import ProgressDisplay from "./ProgressDisplay"; /** @@ -280,6 +280,7 @@ const VideoPlayerControls = ({ > groups + setSettingsMenuRef(e.currentTarget)} aria-label="Настройки плеера" @@ -394,7 +395,11 @@ const VideoPlayerControls = ({ })} /> { window.history.back(); break; default: - console.info("Unhandled remote command", name, args); + break; } }; @@ -249,11 +249,8 @@ const RealtimeBridge = () => { PlayCommand?: PlayCommand; }) => { if (!play?.ItemIds?.length || !userId) return; - if (play.PlayCommand && play.PlayCommand !== PlayCommand.PlayNow) { - // PlayNext/PlayLast are uncommon from a remote; behave like PlayNow - // instead of silently ignoring the user's intent. - console.info("Remote play command", play.PlayCommand); - } + // PlayNext/PlayLast are uncommon from a remote; behave like PlayNow + // instead of silently ignoring the user's intent. startPlaybackFromIds(api, userId, play.ItemIds, { startIndex: play.StartIndex ?? 0, startPositionTicks: play.StartPositionTicks ?? 0, diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx index 97c901c..79324d8 100644 --- a/src/components/search/index.tsx +++ b/src/components/search/index.tsx @@ -150,7 +150,11 @@ const Search = () => { useSearchStore.getState().toggleSearchDialog(); } }).catch((error) => { - console.warn("Global search shortcut is unavailable", error); + // HMR can leave the OS shortcut registered while this module is + // reloaded; that is not an application failure. + if (!String(error).toLowerCase().includes("already registered")) { + console.warn("Global search shortcut is unavailable", error); + } }); }, []); diff --git a/src/components/userAvatarMenu/index.tsx b/src/components/userAvatarMenu/index.tsx index debf708..458bdf3 100644 --- a/src/components/userAvatarMenu/index.tsx +++ b/src/components/userAvatarMenu/index.tsx @@ -50,7 +50,6 @@ export const UserAvatarMenu = () => { }, []); const handleLogout = useCallback(async () => { - console.log("Logging out user..."); await api?.logout(); createApi(api?.basePath ?? "", undefined); resetCurrentUser(); diff --git a/src/main.tsx b/src/main.tsx index bd59ab7..3332f41 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,18 +4,14 @@ import React, { useEffect } from "react"; import ReactDOM from "react-dom/client"; // Import the generated route tree import { routeTree } from "./routeTree.gen"; -import { - ApiProvider, - initializeApi, - useApiInContext, -} from "./utils/store/api"; -import { CentralProvider, useCentralStore } from "./utils/store/central"; import { clearPersistedQueryCache, persistQueryCache, restoreQueryCache, } from "./utils/queryCachePersistence"; import { delUser } from "./utils/storage/user"; +import { ApiProvider, initializeApi, useApiInContext } from "./utils/store/api"; +import { CentralProvider, useCentralStore } from "./utils/store/central"; const queryClient = new QueryClient({ defaultOptions: { @@ -55,9 +51,7 @@ const router = createRouter({ // search field) must not trigger a transition on every keystroke. defaultViewTransition: { types: ({ pathChanged }) => - pathChanged && document.visibilityState === "visible" - ? ["page"] - : false, + pathChanged && document.visibilityState === "visible" ? ["page"] : false, }, scrollRestoration: true, scrollRestorationBehavior: "auto", @@ -101,12 +95,6 @@ function ProviderWrapper() { }); }, [api?.accessToken, fetchCurrentUser, createApi]); useEffect(() => { - if (api) { - console.log(`API is set - Route ${window.location.pathname}`); - console.log(api); - } else { - console.log(`API is not set - Route ${window.location.pathname}`); - } router.invalidate(); // This is a hack to force the router to re-evaluate the routes and re-run the beforeLoad functions }, [api?.accessToken]); return ( @@ -177,9 +165,7 @@ const init = async () => { diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index da8043f..b5757c3 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -4,6 +4,7 @@ import { ThemeProvider } from "@mui/material/styles"; import { createRootRouteWithContext, Outlet } from "@tanstack/react-router"; import { SnackbarProvider } from "notistack"; import React from "react"; +import { AppStatusOverlay } from "@/components/appStatus"; import { AppTitlebar } from "@/components/appTitlebar"; import MobilePreview from "@/components/mobilePreview"; // import NProgress from "@/components/nProgress"; @@ -25,6 +26,7 @@ import Backdrop from "@/components/backdrop"; import DeepLinkHandler from "@/components/deepLinks"; import FollowMe from "@/components/followMe"; import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice"; +import NotificationBridge from "@/components/notifications"; import OverlayScrollbar from "@/components/overlayScrollbar"; import PlaybackSync from "@/components/playback/PlaybackSync"; import QuickConnectApprovalDialog from "@/components/quickConnectApproval"; @@ -56,7 +58,18 @@ export const Route = createRootRouteWithContext()({ return ( - + {/* */} @@ -73,6 +86,7 @@ export const Route = createRootRouteWithContext()({ + diff --git a/src/routes/_api/favorite/index.tsx b/src/routes/_api/favorite/index.tsx index 508cda4..142cf24 100644 --- a/src/routes/_api/favorite/index.tsx +++ b/src/routes/_api/favorite/index.tsx @@ -341,5 +341,3 @@ function FavoritePage() {
); } - -export default FavoritePage; diff --git a/src/routes/_api/home/index.tsx b/src/routes/_api/home/index.tsx index e1935e3..1be903b 100644 --- a/src/routes/_api/home/index.tsx +++ b/src/routes/_api/home/index.tsx @@ -400,5 +400,3 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) { ); } - -export default Home; diff --git a/src/routes/_api/login.tsx b/src/routes/_api/login.tsx index 89d92d9..af5a59c 100644 --- a/src/routes/_api/login.tsx +++ b/src/routes/_api/login.tsx @@ -1,14 +1,13 @@ -import AppBarBackOnly from "@/components/appBar/backOnly"; import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api"; -import { Outlet, createFileRoute, redirect } from "@tanstack/react-router"; +import { createFileRoute, Outlet, redirect } from "@tanstack/react-router"; import React from "react"; +import AppBarBackOnly from "@/components/appBar/backOnly"; export const Route = createFileRoute("/_api/login")({ beforeLoad: async ({ context, location }) => { if (location.pathname === "/login") { const api = context.api; if (!api) { - console.info("Awaiting Api generation."); // throw redirect({ to: "/login/manual" }); } else { const publicUsers = (await getUserApi(api).getPublicUsers()).data; diff --git a/src/routes/_api/music/album/$id.tsx b/src/routes/_api/music/album/$id.tsx index ed55b3e..6924a44 100644 --- a/src/routes/_api/music/album/$id.tsx +++ b/src/routes/_api/music/album/$id.tsx @@ -2,13 +2,14 @@ import { BaseItemKind, SortOrder } from "@jellyfin/sdk/lib/generated-client"; import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api"; import Box from "@mui/material/Box"; import CircularProgress from "@mui/material/CircularProgress"; -import { createFileRoute, Link } from "@tanstack/react-router"; import { useQuery } from "@tanstack/react-query"; +import { createFileRoute, Link } from "@tanstack/react-router"; import React, { useLayoutEffect, useMemo } from "react"; import AlbumMusicTrack from "@/components/albumMusicTrack"; import InstantMixButton from "@/components/buttons/instantMixButton"; import LikeButton from "@/components/buttons/likeButton"; import PlayButton from "@/components/buttons/playButton"; +import RatingControl from "@/components/buttons/ratingControl"; import { Card } from "@/components/card/card"; import CardScroller from "@/components/cardScroller/cardScroller"; import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice"; @@ -86,6 +87,7 @@ function MusicAlbumTitlePage() { sortOrder: [SortOrder.Ascending], sortBy: ["IndexNumber", "ParentIndexNumber"], fields: ["MediaSources"], + enableUserData: true, }); return result.data; }, @@ -179,9 +181,7 @@ function MusicAlbumTitlePage() {
{trackCount > 1 ? "Альбом" : "Сингл"} - {item.data.ProductionYear - ? ` · ${item.data.ProductionYear}` - : ""} + {item.data.ProductionYear ? ` · ${item.data.ProductionYear}` : ""}

{item.data.Name}

{artistId ? ( @@ -217,6 +217,14 @@ function MusicAlbumTitlePage() { userId={user?.Id} itemName={item.data.Name} /> +
@@ -228,35 +236,33 @@ function MusicAlbumTitlePage() { Время
- {allDiscs.length > 1 ? ( - allDiscs.map((disc) => ( -
-

Диск {disc}

- {musicTracks.data?.Items?.map((track, index) => - track.ParentIndexNumber === disc ? ( - - ) : null, - )} -
- )) - ) : ( - musicTracks.data?.Items?.map((track, index) => ( - - )) - )} - {trackCount === 0 && ( -

Треки не найдены

- )} + {allDiscs.length > 1 + ? allDiscs.map((disc) => ( +
+

Диск {disc}

+ {musicTracks.data?.Items?.map((track, index) => + track.ParentIndexNumber === disc ? ( + + ) : null, + )} +
+ )) + : musicTracks.data?.Items?.map((track, index) => ( + + ))} + {trackCount === 0 &&

Треки не найдены

} {(genres.length > 0 || item.data.Overview) && ( @@ -265,18 +271,12 @@ function MusicAlbumTitlePage() { {genres.length > 0 && (
{genres.map((genre) => ( - + ))}
)} {item.data.Overview && ( - + )} )} @@ -330,5 +330,3 @@ function MusicAlbumTitlePage() { ); } } - -export default MusicAlbumTitlePage; diff --git a/src/routes/_api/music/artist/$id.tsx b/src/routes/_api/music/artist/$id.tsx index 9c68fb8..3510d27 100644 --- a/src/routes/_api/music/artist/$id.tsx +++ b/src/routes/_api/music/artist/$id.tsx @@ -1,3 +1,5 @@ +import type { Api } from "@jellyfin/sdk"; +import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; import { BaseItemKind, ItemFields, @@ -11,12 +13,11 @@ import Tooltip from "@mui/material/Tooltip"; import { useQuery } from "@tanstack/react-query"; import { createFileRoute } from "@tanstack/react-router"; import React, { useEffect, useMemo, useState } from "react"; -import type { Api } from "@jellyfin/sdk"; -import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; import AlbumMusicTrack from "@/components/albumMusicTrack"; import InstantMixButton from "@/components/buttons/instantMixButton"; import LikeButton from "@/components/buttons/likeButton"; import PlayButton from "@/components/buttons/playButton"; +import RatingControl from "@/components/buttons/ratingControl"; import { Card } from "@/components/card/card"; import IconLink from "@/components/iconLink"; import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice"; @@ -109,6 +110,7 @@ function ArtistTitlePage() { includeItemTypes: [BaseItemKind.Audio], userId: user?.Id, fields: [ItemFields.Overview], + enableUserData: true, }); return result.data; }, @@ -154,7 +156,8 @@ function ArtistTitlePage() { if (artistDiscography.data && artistSongs.data && artistAppearances.data) { if (artistDiscography.data.TotalRecordCount) setActiveTab("discography"); else if (artistSongs.data.TotalRecordCount) setActiveTab("songs"); - else if (artistAppearances.data.TotalRecordCount) setActiveTab("appearances"); + else if (artistAppearances.data.TotalRecordCount) + setActiveTab("appearances"); } }, [artistDiscography.data, artistSongs.data, artistAppearances.data]); @@ -267,13 +270,18 @@ function ArtistTitlePage() { isFavorite={item.data.UserData?.IsFavorite} userId={user?.Id} /> + {item.data.Overview && (
- +
)} {(item.data.ExternalUrls?.length ?? 0) > 0 && ( @@ -336,6 +344,7 @@ function ArtistTitlePage() { track={track} trackIndex={index} musicTracks={artistSongs.data ?? null} + queryKey={["item", id, "artist", "songs"]} /> ))} {songCount === 0 &&

Песен пока нет

} @@ -362,5 +371,3 @@ function ArtistTitlePage() { ); } } - -export default ArtistTitlePage; diff --git a/src/routes/_api/music/music.scss b/src/routes/_api/music/music.scss index 703a7e2..ee9d72b 100644 --- a/src/routes/_api/music/music.scss +++ b/src/routes/_api/music/music.scss @@ -119,6 +119,7 @@ .music-actions { display: flex; + flex-wrap: wrap; align-items: center; gap: 0.5em; margin-top: 1.6em; diff --git a/src/routes/_api/music/playlist/$id.tsx b/src/routes/_api/music/playlist/$id.tsx index b7961b4..4afb58e 100644 --- a/src/routes/_api/music/playlist/$id.tsx +++ b/src/routes/_api/music/playlist/$id.tsx @@ -9,6 +9,7 @@ import React, { useEffect } from "react"; import AlbumMusicTrack from "@/components/albumMusicTrack"; import LikeButton from "@/components/buttons/likeButton"; import PlayButton from "@/components/buttons/playButton"; +import RatingControl from "@/components/buttons/ratingControl"; import { Card } from "@/components/card/card"; import CardScroller from "@/components/cardScroller/cardScroller"; import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice"; @@ -82,6 +83,7 @@ function PlaylistTitlePage() { const result = await getPlaylistApi(api).getPlaylistItems({ userId: user?.Id, playlistId: item.data.Id, + enableUserData: true, }); return result.data; }, @@ -169,6 +171,14 @@ function PlaylistTitlePage() { userId={user?.Id} itemName={item.data.Name} /> + @@ -186,6 +196,7 @@ function PlaylistTitlePage() { track={track} trackIndex={index} musicTracks={musicTracks.data ?? null} + queryKey={["item", id, "musicTracks"]} /> ))} {trackCount === 0 && ( @@ -204,10 +215,7 @@ function PlaylistTitlePage() { )} {item.data.Overview && ( - + )} )} @@ -256,5 +264,3 @@ function PlaylistTitlePage() { ); } } - -export default PlaylistTitlePage; diff --git a/src/routes/_api/player/audio.tsx b/src/routes/_api/player/audio.tsx index 95efaf5..99cb853 100644 --- a/src/routes/_api/player/audio.tsx +++ b/src/routes/_api/player/audio.tsx @@ -11,7 +11,12 @@ import { Tooltip, } from "@mui/material"; import { useQuery } from "@tanstack/react-query"; -import { createFileRoute, Link, useNavigate, useRouter } from "@tanstack/react-router"; +import { + createFileRoute, + Link, + useNavigate, + useRouter, +} from "@tanstack/react-router"; import { AnimatePresence, motion } from "motion/react"; import React, { useEffect, @@ -22,9 +27,8 @@ import React, { } from "react"; import CastButton from "@/components/buttons/castButton"; import LikeButton from "@/components/buttons/likeButton"; -import LyricsPanel, { - getLyricsQueryOptions, -} from "@/components/playback/audioPlayer/components/LyricsPanel"; +import RatingControl from "@/components/buttons/ratingControl"; +import LyricsPanel from "@/components/playback/audioPlayer/components/LyricsPanel"; import PlayerVolume from "@/components/playback/audioPlayer/components/PlayerVolume"; import StatsPanel from "@/components/playback/audioPlayer/components/StatsPanel"; import WindowControls from "@/components/windowControls"; @@ -268,8 +272,6 @@ function AudioPlayerRoute() { ...getItemQueryOptions(item?.Id ?? "", api, user?.Id), enabled: Boolean(item?.Id && api && user?.Id), }); - const lyrics = useQuery(getLyricsQueryOptions(item, api)); - const hasLyrics = (lyrics.data?.Lyrics?.length ?? 0) > 0; // Wall colour derived from the sleeve. const palette = useMemo(() => getCoverPalette(item), [item]); @@ -333,9 +335,7 @@ function AudioPlayerRoute() { return ( <> -
+
-
- +
+ -
-

{item?.Name}

-
- {item?.ArtistItems?.length - ? item.ArtistItems.map((artist, index) => ( - - {index > 0 && ", "} - {artist.Id ? ( - - {artist.Name} - - ) : ( - artist.Name - )} - - )) - : item?.Artists?.join(", ")} - {item?.Album && ( - <> - {(item?.ArtistItems?.length || item?.Artists?.length) && - " · "} - {item.AlbumId ? ( - - {item.Album} - - ) : ( - item.Album - )} - - )} -
- -
- +

{item?.Name}

+
+ {item?.ArtistItems?.length + ? item.ArtistItems.map((artist, index) => ( + + {index > 0 && ", "} + {artist.Id ? ( + + {artist.Name} + + ) : ( + artist.Name + )} + + )) + : item?.Artists?.join(", ")} + {item?.Album && ( + <> + {(item?.ArtistItems?.length || item?.Artists?.length) && + " · "} + {item.AlbumId ? ( + + {item.Album} + + ) : ( + item.Album + )} + )} - max={item?.RunTimeTicks ?? 1} - step={1} - size="small" - aria-label="Перемотка" - onChange={(_, value) => { - const next = Array.isArray(value) ? value[0] : value; - setProgress(ticksToSec(next)); - }} - onChangeCommitted={(_, value) => { - const next = Array.isArray(value) ? value[0] : value; - handleSeekCommit(next); - }} - /> +
+ +
+ { + const next = Array.isArray(value) ? value[0] : value; + setProgress(ticksToSec(next)); + }} + onChangeCommitted={(_, value) => { + const next = Array.isArray(value) ? value[0] : value; + handleSeekCommit(next); + }} + /> +
-
- - {panelOpen && ( - -
- {panelTab === "lyrics" ? ( - <> -
- - Текст песни - - setPanelOpen(false)} - > - close - -
-
- {hasLyrics ? ( + + {panelOpen && ( + +
+ {panelTab === "lyrics" ? ( + <> +
+ + Текст песни + + setPanelOpen(false)} + > + + close + + +
+
- ) : ( -

- Для этого трека нет текста. -

- )} -
- - ) : ( - <> -
- Очередь - setPanelOpen(false)} - > - close - -
-
- {upcoming.length === 0 ? ( -

- Очередь пуста. Запустите альбом или плейлист, - чтобы она наполнилась. -

- ) : ( -
- {upcoming.map((track, offset) => ( - - playItemFromQueue(index, user?.Id, api) - } - queryKey={["queue-upcoming"]} - userId={user?.Id} - /> - ))} -
- )} -
- - )} -
-
- )} -
+
+ + ) : ( + <> +
+ + Очередь + + setPanelOpen(false)} + > + + close + + +
+
+ {upcoming.length === 0 ? ( +

+ Очередь пуста. Запустите альбом или плейлист, + чтобы она наполнилась. +

+ ) : ( +
+ {upcoming.map((track, offset) => ( + + playItemFromQueue(index, user?.Id, api) + } + queryKey={["queue-upcoming"]} + userId={user?.Id} + /> + ))} +
+ )} +
+ + )} +
+
+ )} +
@@ -533,6 +530,14 @@ function AudioPlayerRoute() { queryKey={["item", item?.Id ?? ""]} userId={user?.Id} /> + {item && ( lyrics diff --git a/src/routes/_api/player/index.tsx b/src/routes/_api/player/index.tsx index 182e6d8..8141c46 100644 --- a/src/routes/_api/player/index.tsx +++ b/src/routes/_api/player/index.tsx @@ -88,8 +88,10 @@ function addSubtitleTrackToReactPlayer( const a = track.track; a.mode = "showing"; }); - track.addEventListener("error", (e) => { - console.error("Error loading subtitle track", e); + track.addEventListener("error", () => { + // Some servers advertise subtitle streams that cannot be delivered + // as a text track; the video still plays and JASSUB handles image + // subtitles separately. }); videoElem.appendChild(track); @@ -99,7 +101,7 @@ function addSubtitleTrackToReactPlayer( } } -export function VideoPlayer() { +function VideoPlayer() { const api = useApiInContext((s) => s.api); const navigate = useNavigate(); const { history } = useRouter(); @@ -357,8 +359,6 @@ export function VideoPlayer() { }); } - console.log(mediaSource.subtitle); - registerPlayerActions({ seekTo: (seconds: number) => { // A user seek wins over the pending transfer/resume target. @@ -639,9 +639,7 @@ export function VideoPlayer() { wasmUrl, modernWasmUrl, }); - jassubRenderer.ready.then(() => { - console.log("JASSUB subtitle renderer is ready"); - }); + jassubRenderer.ready.then(() => undefined); } else if ( mediaSource.subtitle.format === "subrip" || mediaSource.subtitle.format === "vtt" diff --git a/src/routes/_api/search/index.tsx b/src/routes/_api/search/index.tsx index 72af165..265925b 100644 --- a/src/routes/_api/search/index.tsx +++ b/src/routes/_api/search/index.tsx @@ -505,5 +505,3 @@ function CategorySkeleton() { ); } - -export default SearchPage; diff --git a/src/routes/setup/server.add.tsx b/src/routes/setup/server.add.tsx index a57bbe8..90189cb 100644 --- a/src/routes/setup/server.add.tsx +++ b/src/routes/setup/server.add.tsx @@ -54,7 +54,6 @@ function ServerSetup() { enqueueSnackbar("Что-то пошло не так", { variant: "error" }); }, onSettled: (bestServer) => { - console.log(bestServer); if (!bestServer) { enqueueSnackbar("Указанный адрес не является сервером Jellyfin.", { variant: "error", diff --git a/src/routes/setup/server.list.tsx b/src/routes/setup/server.list.tsx index d0524a5..cc1f3fc 100644 --- a/src/routes/setup/server.list.tsx +++ b/src/routes/setup/server.list.tsx @@ -234,4 +234,3 @@ function ServerList() {
); } -export default ServerList; diff --git a/src/utils/methods/itemImages.ts b/src/utils/methods/itemImages.ts index c04cff4..c0c6fc3 100644 --- a/src/utils/methods/itemImages.ts +++ b/src/utils/methods/itemImages.ts @@ -1,4 +1,7 @@ -import type { BaseItemDto, ImageType } from "@jellyfin/sdk/lib/generated-client"; +import type { + BaseItemDto, + ImageType, +} from "@jellyfin/sdk/lib/generated-client"; export type ResolvedItemImage = { /** Item that actually owns the image (episodes borrow their series' artwork). */ @@ -47,11 +50,14 @@ export const resolveItemImage = ( // Library grids show one poster per episode, owned by the series. const seriesId = options.seriesId ?? item.SeriesId; if (options.seriesId && seriesId) { - return { - itemId: seriesId, - imageType: "Primary", - tag: item.SeriesPrimaryImageTag ?? undefined, - }; + const seriesPrimaryTag = item.SeriesPrimaryImageTag ?? undefined; + if (seriesPrimaryTag) { + return { + itemId: seriesId, + imageType: "Primary", + tag: seriesPrimaryTag, + }; + } } const order = ownFallbackOrder[preferred] ?? [preferred]; @@ -69,9 +75,6 @@ export const resolveItemImage = ( tag: item.SeriesPrimaryImageTag, }; } - if (seriesId && item.Type === "Episode") { - return { itemId: seriesId, imageType: "Primary" }; - } // Audio inherits its cover from the album. if (item.AlbumId) { return { itemId: item.AlbumId, imageType: "Primary" }; @@ -84,11 +87,9 @@ export const resolveItemImage = ( }; } - // Nothing known: keep the requested type so the server gets a chance, but - // only when the item exists. Callers render their icon placeholder on 404. - if (item.Id) { - return { itemId: item.Id, imageType: preferred }; - } + // Do not invent an image URL when the item has no advertised artwork: + // requesting /Images/Primary for such items only produces 404 noise. The + // card/hero fall back to their own placeholder icon instead. return undefined; }; diff --git a/src/utils/methods/transferPlayback.ts b/src/utils/methods/transferPlayback.ts index b11f427..5b16859 100644 --- a/src/utils/methods/transferPlayback.ts +++ b/src/utils/methods/transferPlayback.ts @@ -64,13 +64,28 @@ export const playOnSession = async ( ): Promise => { if (options.itemIds.length === 0) return; - const sessionApi = getSessionApi(api); - const startPositionTicks = Math.max(0, options.startPositionTicks ?? 0); - const startIndex = Math.min( + // The Jellyfin Play endpoint takes every queue item as a repeated query + // parameter. A whole library/playlist can exceed the proxy URL limit and + // the connection is closed before the request reaches the server. Send a + // window of the queue around the current item; 40 is plenty for hand-off. + const MAX_REMOTE_QUEUE = 40; + const requestedIndex = Math.min( Math.max(0, options.startIndex ?? 0), options.itemIds.length - 1, ); - const expectedItemId = options.itemIds[startIndex]; + const windowStart = Math.max( + 0, + Math.min(requestedIndex, options.itemIds.length - MAX_REMOTE_QUEUE), + ); + const itemIds = options.itemIds.slice( + windowStart, + windowStart + MAX_REMOTE_QUEUE, + ); + const startIndex = requestedIndex - windowStart; + const expectedItemId = itemIds[startIndex]; + + const sessionApi = getSessionApi(api); + const startPositionTicks = Math.max(0, options.startPositionTicks ?? 0); const readTarget = async () => { try { @@ -106,7 +121,7 @@ export const playOnSession = async ( await sessionApi.play({ sessionId, playCommand: "PlayNow", - itemIds: options.itemIds, + itemIds, startIndex, startPositionTicks, mediaSourceId: options.mediaSourceId, diff --git a/src/utils/queries/libraryItems.ts b/src/utils/queries/libraryItems.ts index f5135b3..9672c3e 100644 --- a/src/utils/queries/libraryItems.ts +++ b/src/utils/queries/libraryItems.ts @@ -71,7 +71,6 @@ export const getLibraryItemsQueryOptions = ( ); return { Items: [], TotalRecordCount: 0 } as BaseItemDtoQueryResult; } - console.info("Fetching library items with params:", params); const { currentViewType, videoTypesState, filters } = params; const buildVideoTypes = (state: typeof videoTypesState) => { const videoTypes: VideoType[] = []; diff --git a/src/utils/storage/settings.ts b/src/utils/storage/settings.ts index 73fd589..5a3dccc 100644 --- a/src/utils/storage/settings.ts +++ b/src/utils/storage/settings.ts @@ -14,7 +14,6 @@ export const setSetting = async (settingKey: string, value: boolean) => { export const getSetting = async (settingKey: string) => { const value = await SettingsStore.get(settingKey); - console.log(`${settingKey} - ${value}`); if (value) return value; return false; }; @@ -28,4 +27,4 @@ export const allSettings = { "Показывает кнопку пропуска интро и титров в сериях. Для этого на сервере должен быть установлен плагин jumoog/intro-skipper.", }, ], -}; \ No newline at end of file +}; diff --git a/src/utils/store/appStatus.ts b/src/utils/store/appStatus.ts new file mode 100644 index 0000000..a5c7713 --- /dev/null +++ b/src/utils/store/appStatus.ts @@ -0,0 +1,79 @@ +import { create } from "zustand"; + +export type AppStatusPhase = + | "idle" + | "loading" + | "success" + | "warning" + | "error" + | "info"; + +type AppStatusState = { + phase: AppStatusPhase; + message: string; + /** Bumped on every notification so stale timers can be ignored. */ + token: number; + notify: (variant: string, message: unknown) => void; + reset: () => void; +}; + +let resultTimer: ReturnType | null = null; +let idleTimer: ReturnType | null = null; + +const clearTimers = () => { + if (resultTimer) clearTimeout(resultTimer); + if (idleTimer) clearTimeout(idleTimer); + resultTimer = null; + idleTimer = null; +}; + +const messageText = (message: unknown): string => { + if (typeof message === "string") return message; + if (typeof message === "number") return String(message); + if (message && typeof message === "object") { + const props = (message as { props?: { children?: unknown } }).props; + if (typeof props?.children === "string") return props.children; + } + return "Готово"; +}; + +const phaseForVariant = (variant: string): AppStatusPhase => { + switch (variant) { + case "success": + return "success"; + case "error": + return "error"; + case "warning": + return "warning"; + default: + return "info"; + } +}; + +export const useAppStatusStore = create((set) => ({ + phase: "idle", + message: "", + token: 0, + notify: (variant, message) => { + clearTimers(); + const phase = phaseForVariant(variant); + const text = messageText(message); + const token = Date.now(); + set({ phase: "loading", message: text, token }); + + // A short spinner beat makes the titlebar icon feel like a process + // completing (spinner → check / warning) rather than a random blink. + resultTimer = setTimeout(() => { + resultTimer = null; + set({ phase, message: text, token }); + idleTimer = setTimeout(() => { + idleTimer = null; + set({ phase: "idle", message: "", token: 0 }); + }, 2600); + }, 450); + }, + reset: () => { + clearTimers(); + set({ phase: "idle", message: "", token: 0 }); + }, +})); diff --git a/src/utils/store/playback.ts b/src/utils/store/playback.ts index 3da13ce..bba44ce 100644 --- a/src/utils/store/playback.ts +++ b/src/utils/store/playback.ts @@ -565,7 +565,6 @@ export const usePlaybackStore = create< }, }, registerPlayerActions: (actions) => { - console.info("Registering player actions:", actions); set({ _playerActions: actions, }); @@ -628,10 +627,8 @@ export const usePlaybackStore = create< (s) => s.Id === activeSegmentId, ); if (!activeSegment) { - console.warn("No segment to skip"); return; } - console.info("Skipping segment:", activeSegment); get()._playerActions.seekTo(ticksToSec(activeSegment.EndTicks ?? 0)); }, handleStartSeek: (ticks) => { @@ -653,7 +650,6 @@ export const usePlaybackStore = create< const ticks = secToTicks(seconds); const segments = get().metadata.mediaSegments?.Items; if (!segments || segments.length === 0) { - console.warn("No segments available for seeking"); return; } const segment = segments.find( diff --git a/src/utils/store/queue.ts b/src/utils/store/queue.ts index dc1d410..31a01b5 100644 --- a/src/utils/store/queue.ts +++ b/src/utils/store/queue.ts @@ -30,7 +30,6 @@ export const setQueue = ( }; export const setTrackIndex = (index: number) => { - console.info(`Setting index ${index}`); useQueue.setState((state) => ({ ...state, currentItemIndex: index })); };