diff --git a/front/Dockerfile b/front/Dockerfile index 6ff38b3a..9929b917 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -1,5 +1,4 @@ FROM node:16-alpine AS builder -RUN apk add git bash WORKDIR /app COPY .yarn ./.yarn COPY .yarnrc.yml ./ diff --git a/front/apps/web/package.json b/front/apps/web/package.json index b467bdfd..6f354989 100644 --- a/front/apps/web/package.json +++ b/front/apps/web/package.json @@ -24,7 +24,7 @@ "jotai": "^2.3.1", "libass-wasm": "^4.1.0", "moti": "^0.26.0", - "next": "13.4.13", + "next": "13.4.19", "next-translate": "^2.5.3", "raf": "^3.4.1", "react": "18.2.0", diff --git a/front/packages/ui/src/navbar/index.tsx b/front/packages/ui/src/navbar/index.tsx index f55914a2..6174f18b 100644 --- a/front/packages/ui/src/navbar/index.tsx +++ b/front/packages/ui/src/navbar/index.tsx @@ -34,10 +34,8 @@ import { } from "@kyoo/primitives"; import { Platform, TextInput, View, ViewProps } from "react-native"; import { useTranslation } from "react-i18next"; -import { createParam } from "solito"; import { useRouter } from "solito/router"; import { Stylable, useYoshiki } from "yoshiki/native"; -import MenuIcon from "@material-symbols/svg-400/rounded/menu-fill.svg"; import Search from "@material-symbols/svg-400/rounded/search-fill.svg"; import Login from "@material-symbols/svg-400/rounded/login.svg"; import Register from "@material-symbols/svg-400/rounded/app_registration.svg"; @@ -58,16 +56,15 @@ export const NavbarTitle = (props: Stylable & { onLayout?: ViewProps["onLayout"] ); }; -const { useParam } = createParam<{ q?: string }>(); - const SearchBar = forwardRef(function SearchBar(props, ref) { const { css, theme } = useYoshiki(); const { t } = useTranslation(); const { push, replace, back } = useRouter(); + const hasChanged = useRef(false); const [query, setQuery] = useState(""); useEffect(() => { - if (Platform.OS !== "web") return; + if (Platform.OS !== "web" || !hasChanged.current) return; const action = window.location.pathname.startsWith("/search") ? replace : push; if (query) action(`/search?q=${encodeURI(query)}`, undefined, { shallow: true }); else back(); @@ -77,7 +74,10 @@ const SearchBar = forwardRef(function SearchBar(props, ref) { + hasChanged.current = true; + setQuery(q); + }} placeholder={t("navbar.search")} placeholderTextColor={theme.light.overlay0} {...tooltip(t("navbar.search"))} diff --git a/front/yarn.lock b/front/yarn.lock index 8a8990f0..736322cf 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -2665,10 +2665,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.4.13": - version: 13.4.13 - resolution: "@next/env@npm:13.4.13" - checksum: 94935ff1730de9fe00be238256ad1af3e5da7ae737e6ce5d261404ccc9245f2a18fee24afa7f3b27d7f7d1c16e2715c8eccb70260ab0c0a08e7bbaa95ed36211 +"@next/env@npm:13.4.19": + version: 13.4.19 + resolution: "@next/env@npm:13.4.19" + checksum: ace4f82890954ade0164fbe2b7ff988268d2b99b2e80caa6707c51fa4cbfaaa31e48fbbcecd4fd142af3503c544e1b4c91e8185d4af253c8fb46550e9e70ad7e languageName: node linkType: hard @@ -2681,65 +2681,65 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-darwin-arm64@npm:13.4.13" +"@next/swc-darwin-arm64@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-darwin-arm64@npm:13.4.19" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-darwin-x64@npm:13.4.13" +"@next/swc-darwin-x64@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-darwin-x64@npm:13.4.19" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-linux-arm64-gnu@npm:13.4.13" +"@next/swc-linux-arm64-gnu@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-linux-arm64-gnu@npm:13.4.19" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-linux-arm64-musl@npm:13.4.13" +"@next/swc-linux-arm64-musl@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-linux-arm64-musl@npm:13.4.19" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-linux-x64-gnu@npm:13.4.13" +"@next/swc-linux-x64-gnu@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-linux-x64-gnu@npm:13.4.19" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-linux-x64-musl@npm:13.4.13" +"@next/swc-linux-x64-musl@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-linux-x64-musl@npm:13.4.19" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-win32-arm64-msvc@npm:13.4.13" +"@next/swc-win32-arm64-msvc@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-win32-arm64-msvc@npm:13.4.19" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-win32-ia32-msvc@npm:13.4.13" +"@next/swc-win32-ia32-msvc@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-win32-ia32-msvc@npm:13.4.19" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.4.13": - version: 13.4.13 - resolution: "@next/swc-win32-x64-msvc@npm:13.4.13" +"@next/swc-win32-x64-msvc@npm:13.4.19": + version: 13.4.19 + resolution: "@next/swc-win32-x64-msvc@npm:13.4.19" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -10692,20 +10692,20 @@ __metadata: languageName: node linkType: hard -"next@npm:13.4.13": - version: 13.4.13 - resolution: "next@npm:13.4.13" +"next@npm:13.4.19": + version: 13.4.19 + resolution: "next@npm:13.4.19" dependencies: - "@next/env": 13.4.13 - "@next/swc-darwin-arm64": 13.4.13 - "@next/swc-darwin-x64": 13.4.13 - "@next/swc-linux-arm64-gnu": 13.4.13 - "@next/swc-linux-arm64-musl": 13.4.13 - "@next/swc-linux-x64-gnu": 13.4.13 - "@next/swc-linux-x64-musl": 13.4.13 - "@next/swc-win32-arm64-msvc": 13.4.13 - "@next/swc-win32-ia32-msvc": 13.4.13 - "@next/swc-win32-x64-msvc": 13.4.13 + "@next/env": 13.4.19 + "@next/swc-darwin-arm64": 13.4.19 + "@next/swc-darwin-x64": 13.4.19 + "@next/swc-linux-arm64-gnu": 13.4.19 + "@next/swc-linux-arm64-musl": 13.4.19 + "@next/swc-linux-x64-gnu": 13.4.19 + "@next/swc-linux-x64-musl": 13.4.19 + "@next/swc-win32-arm64-msvc": 13.4.19 + "@next/swc-win32-ia32-msvc": 13.4.19 + "@next/swc-win32-x64-msvc": 13.4.19 "@swc/helpers": 0.5.1 busboy: 1.6.0 caniuse-lite: ^1.0.30001406 @@ -10744,7 +10744,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 49c161ffafa0f63ee07d37720431aa92dd95b1f593519d729116904b1d61e8fd2b51ed97546f9ac4406132f74198010277022948fa27cac1c82571abeba2a6cd + checksum: f4873dab8888ed4dae14d36d7cf8dc54cd042695cf7ee41d05e8757f463d11952a594eb066143cc2f7253ea1d41c6efe681cdc3ab8c2fa6eb0815fa5a94de3dc languageName: node linkType: hard @@ -14259,7 +14259,7 @@ __metadata: jotai: ^2.3.1 libass-wasm: ^4.1.0 moti: ^0.26.0 - next: 13.4.13 + next: 13.4.19 next-translate: ^2.5.3 raf: ^3.4.1 react: 18.2.0 diff --git a/scanner/providers/implementations/themoviedatabase.py b/scanner/providers/implementations/themoviedatabase.py index 00b23aaf..1e385950 100644 --- a/scanner/providers/implementations/themoviedatabase.py +++ b/scanner/providers/implementations/themoviedatabase.py @@ -111,7 +111,7 @@ class TheMovieDatabase(Provider): async def for_language(lng: str) -> Movie: movie = await self.get( - f"/movie/{movie_id}", + f"movie/{movie_id}", params={ "language": lng, "append_to_response": "alternative_titles,videos,credits,keywords,images", @@ -186,7 +186,7 @@ class TheMovieDatabase(Provider): async def for_language(lng: str) -> Show: show = await self.get( - f"/tv/{show_id}", + f"tv/{show_id}", params={ "language": lng, "append_to_response": "alternative_titles,videos,credits,keywords,images,external_ids", @@ -327,7 +327,7 @@ class TheMovieDatabase(Provider): async def for_language(lng: str) -> Episode: episode = await self.get( - f"/tv/{show_id}/season/{season}/episode/{episode_nbr}", + f"tv/{show_id}/season/{season}/episode/{episode_nbr}", params={ "language": lng, },