Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
5rahim committed Jan 5, 2025
1 parent 10b3f57 commit 49aefb6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## v2.6.2

- ⚡️ Advanced search: Maintain search params during navigation #195
- 🦺 Torrent streaming: Fixed playback issue
- 🦺 Auto Downloader: Fixed list not updating correctly after batch creation
- 🔧 Torrent streaming: Reverted to using separate streaming server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Params = {
}

export const __advancedSearch_paramsAtom = atomWithImmer<Params>({
active: false,
active: true,
title: null,
sorting: null,
status: null,
Expand Down
30 changes: 16 additions & 14 deletions seanime-web/src/app/(main)/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ export default function Page() {
const setParams = useSetAtom(__advancedSearch_paramsAtom)

useMount(() => {
setParams({
active: true,
title: null,
sorting: sortingUrlParam ? [sortingUrlParam as AL_MediaSort] : null,
status: statusUrlParam ? [statusUrlParam as AL_MediaStatus] : null,
genre: genreUrlParam ? [genreUrlParam] : null,
format: (formatUrlParam as AL_MediaFormat) === "MANGA" ? null : (formatUrlParam as AL_MediaFormat),
season: (seasonUrlParam as AL_MediaSeason) || null,
year: yearUrlParam || null,
minScore: null,
isAdult: false,
countryOfOrigin: null,
type: (formatUrlParam as AL_MediaFormat) === "MANGA" ? "manga" : (typeUrlParam as "anime" | "manga") || "anime",
})
if (sortingUrlParam || genreUrlParam || statusUrlParam || formatUrlParam || seasonUrlParam || yearUrlParam || typeUrlParam) {
setParams({
active: true,
title: null,
sorting: sortingUrlParam ? [sortingUrlParam as AL_MediaSort] : null,
status: statusUrlParam ? [statusUrlParam as AL_MediaStatus] : null,
genre: genreUrlParam ? [genreUrlParam] : null,
format: (formatUrlParam as AL_MediaFormat) === "MANGA" ? null : (formatUrlParam as AL_MediaFormat),
season: (seasonUrlParam as AL_MediaSeason) || null,
year: yearUrlParam || null,
minScore: null,
isAdult: false,
countryOfOrigin: null,
type: (formatUrlParam as AL_MediaFormat) === "MANGA" ? "manga" : (typeUrlParam as "anime" | "manga") || "anime",
})
}
})

return (
Expand Down

0 comments on commit 49aefb6

Please sign in to comment.