Skip to content

Commit

Permalink
feat: remember library filters #192
Browse files Browse the repository at this point in the history
  • Loading branch information
prayag17 committed Sep 13, 2024
1 parent a19ea1c commit 15e78a3
Show file tree
Hide file tree
Showing 8 changed files with 264 additions and 195 deletions.
1 change: 0 additions & 1 deletion .million/store.json

This file was deleted.

5 changes: 2 additions & 3 deletions src/components/buttons/playButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const PlayButton = ({
playlistId: playlistItemId,
});
} else {
console.log(itemType);
switch (itemType) {
case BaseItemKind.Episode:
result = await getTvShowsApi(api).getEpisodes({
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CardComponent = ({
disableOverlay = false,
overrideIcon,
}: {
item: BaseItemDto;
item: BaseItemDto | null;
cardTitle: string | undefined | null;
cardCaption?: string | null | number;
imageType: ImageType;
Expand Down
14 changes: 7 additions & 7 deletions src/components/musicTrack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/components/textLink/index.jsx
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
Loading

0 comments on commit 15e78a3

Please sign in to comment.