feat: remember library filters #192
This commit is contained in:
8 files changed
+267
-198
No files matched your search
@@ -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,
|
||||
|
||||
@@ -49,7 +49,7 @@ const CardComponent = ({
|
||||
disableOverlay = false,
|
||||
overrideIcon,
|
||||
}: {
|
||||
item: BaseItemDto;
|
||||
item: BaseItemDto | null;
|
||||
cardTitle: string | undefined | null;
|
||||
cardCaption?: string | null | number;
|
||||
imageType: ImageType;
|
||||
|
||||
@@ -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]);
|
||||
|
||||
+1
-1
@@ -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
|
||||
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user