feat: remember library filters #192

This commit is contained in:
Prayag Prajapati committed 2024-09-13 10:39:48 +05:30
1 parent a19ea1c52f
commit 15e78a370c
8 files changed
+267 -198

No files matched your search

+2 -3
View File
@@ -104,7 +104,6 @@ const PlayButton = ({
playlistId: playlistItemId,
});
} else {
console.log(itemType);
switch (itemType) {
case BaseItemKind.Episode:
result = await getTvShowsApi(api).getEpisodes({
@@ -119,7 +118,7 @@ const PlayButton = ({
enableUserData: true,
userId: userId,
seasonId: item.SeasonId,
startItemId: item.Id,
// startItemId: item.Id,
});
mediaSource = await getMediaInfoApi(api).getPostedPlaybackInfo({
audioStreamIndex: currentAudioTrack,
@@ -297,7 +296,7 @@ const PlayButton = ({
result?.mediaSource.MediaSources?.[0].MediaStreams,
);
// URL generation
const urlOptions = {
const urlOptions: URLSearchParams = {
Static: true,
tag: result?.mediaSource.MediaSources?.[0].ETag,
mediaSourceId: result?.mediaSource.MediaSources?.[0].Id,
+1 -1
View File
@@ -49,7 +49,7 @@ const CardComponent = ({
disableOverlay = false,
overrideIcon,
}: {
item: BaseItemDto;
item: BaseItemDto | null;
cardTitle: string | undefined | null;
cardCaption?: string | null | number;
imageType: ImageType;
+7 -7
View File
@@ -36,13 +36,13 @@ const MusicTrack = ({
trackIndex,
className = "",
}: {
item: BaseItemDto;
queryKey: QueryKey;
userId: string | undefined;
playlistItem: boolean;
playlistItemId: string;
trackIndex: number;
className: string;
item?: BaseItemDto | null;
queryKey?: QueryKey;
userId?: string | undefined;
playlistItem?: boolean;
playlistItemId?: string;
trackIndex?: number;
className?: string;
}) => {
const api = useApiInContext((s) => s.api);
const [currentTrackItem] = useAudioPlayback((state) => [state.item]);
@@ -4,7 +4,7 @@ import Typography from "@mui/material/Typography";
import { red } from "@mui/material/colors";
import React from "react";
export const ErrorNotice = ({ error }) => {
export const ErrorNotice = ({ error }: { error?: unknown }) => {
console.log(error);
return (
<Box
+3 -2
View File
@@ -1,15 +1,16 @@
import Typography from "@mui/material/Typography";
import "./textLink.scss";
import { useNavigate } from "@tanstack/react-router";
const TextLink = ({ children, location, variant, otherProps }) => {
// const navigate = useNavigate();
const navigate = useNavigate();
return (
<Typography
variant={variant}
className="link flex"
// onClick={() => navigate(location)}
onClick={() => navigate({ to: location })}
{...otherProps}
>
{children}