diff --git a/api/src/controllers/shows/shows.ts b/api/src/controllers/shows/shows.ts index 0452d4c5..13a1f3c7 100644 --- a/api/src/controllers/shows/shows.ts +++ b/api/src/controllers/shows/shows.ts @@ -106,6 +106,9 @@ export const showsH = new Elysia({ prefix: "/shows", tags: ["shows"] }) jwt: { sub, settings }, }) => { const langs = processLanguages(languages); + + if (query) ignoreInCollection = false; + const items = await getShows({ limit, after, diff --git a/api/src/websockets.ts b/api/src/websockets.ts index 7b45016e..bb9327a8 100644 --- a/api/src/websockets.ts +++ b/api/src/websockets.ts @@ -92,7 +92,12 @@ export const appWs = baseWs.ws("/ws", { const handler = actionMap[action as keyof typeof actionMap]; for (const perm of handler.permissions ?? []) { if (!ws.data.jwt.permissions.includes(perm)) { - return ws.close(3000, `Missing permission: '${perm}'.`); + ws.send({ + action: action, + status: 403, + message: `Missing permission: '${perm}'.`, + }); + return; } } await handler.message(ws as any, body as any); diff --git a/front/src/primitives/input.tsx b/front/src/primitives/input.tsx index 0bf2a796..78ad0c14 100644 --- a/front/src/primitives/input.tsx +++ b/front/src/primitives/input.tsx @@ -31,7 +31,7 @@ export const Input = ({ // @ts-expect-error not yet in typescript i think includeFontPadding={false} className={cn( - "min-h-6 flex-1 font-sans text-base text-slate-600 outline-0 dark:text-slate-400", + "min-h-6 min-w-0 flex-1 font-sans text-base text-slate-600 outline-0 dark:text-slate-400", className, )} {...props} diff --git a/front/src/ui/browse/header.tsx b/front/src/ui/browse/header.tsx index ed29d8d8..f8647bb8 100644 --- a/front/src/ui/browse/header.tsx +++ b/front/src/ui/browse/header.tsx @@ -198,8 +198,8 @@ export const BrowseSettings = ({ return ( - - + + 0 || studioSlugs.length > 0 || staffSlugs.length > 0) && ( - + {mediaType !== "all" && ( diff --git a/front/src/ui/navbar.tsx b/front/src/ui/navbar.tsx index 3ede1fde..1c2194b8 100644 --- a/front/src/ui/navbar.tsx +++ b/front/src/ui/navbar.tsx @@ -104,9 +104,9 @@ const NavbarLink = >({ > - + {label} @@ -141,6 +141,7 @@ export const NavbarRight = () => { { if (path === "/browse") { @@ -168,8 +169,13 @@ export const SearchBar = ({ className, containerClassName, forceExpand, + overlayOnSmallScreen, ...props -}: TextInputProps & { forceExpand?: boolean; containerClassName?: string }) => { +}: TextInputProps & { + forceExpand?: boolean; + containerClassName?: string; + overlayOnSmallScreen?: boolean; +}) => { const { t } = useTranslation(); const [_expanded, setExpanded] = useState(!!value); const inputRef = useRef(null); @@ -181,6 +187,10 @@ export const SearchBar = ({ className={cn( "mr-2 flex-row items-center overflow-hidden rounded-full p-0 pl-4", expanded ? "bg-slate-100 dark:bg-slate-800" : "bg-transparent", + Platform.OS === "web" && + overlayOnSmallScreen && + expanded && + "max-sm:fixed max-sm:top-2 max-sm:right-1 max-sm:left-1 max-sm:z-50 max-sm:mr-0", containerClassName, )} style={[ @@ -207,7 +217,7 @@ export const SearchBar = ({ placeholder={t("navbar.search")} textAlignVertical="center" className={cn( - "h-full flex-1 font-sans text-base outline-0", + "h-full min-w-0 flex-1 font-sans text-base outline-0", "align-middle text-slate-600 dark:text-slate-200", !expanded && "w-0 grow-0", className, @@ -225,7 +235,6 @@ export const SearchBar = ({ // https://github.com/react-navigation/react-navigation/issues/12274 // https://github.com/react-navigation/react-navigation/issues/12667 onPressIn={() => { - console.log(expanded); if (expanded) { inputRef.current?.blur(); inputRef.current?.clear(); @@ -234,7 +243,7 @@ export const SearchBar = ({ } else { setExpanded(true); // Small delay to allow animation to start before focusing - setTimeout(() => inputRef.current?.focus(), 100); + setTimeout(() => inputRef.current?.focus(), 200); } }} iconClassName={cn( diff --git a/front/src/ui/player/language-preference.ts b/front/src/ui/player/language-preference.ts index 9c1a2469..aa9b43df 100644 --- a/front/src/ui/player/language-preference.ts +++ b/front/src/ui/player/language-preference.ts @@ -17,7 +17,7 @@ export const useLanguagePreference = (player: VideoPlayer, slug: string) => { useEvent(player, "onAudioTrackChange", () => { if (!audios?.length) return; const selected = - audios?.[player.getAvailableTextTracks().findIndex((x) => x.selected)]; + audios?.[player.getAvailableAudioTracks().findIndex((x) => x.selected)]; if (!selected) return; aud.current = { idx: selected.index, lang: selected.language }; }); diff --git a/transcoder/src/chapters.go b/transcoder/src/chapters.go index c3b2092b..e6db2f85 100644 --- a/transcoder/src/chapters.go +++ b/transcoder/src/chapters.go @@ -156,6 +156,13 @@ func mergeChapters(info *MediaInfo, candidates []Chapter) []Chapter { merged = true break } + + if cand.StartTime-MergeWindowSec < chapters[i].StartTime && + cand.EndTime+MergeWindowSec > chapters[i].EndTime && + cand.Type == chapters[i].Type { + // prefer the existing match instead of splitting it into two. + merged = true + } } if !merged {