From d2ffa35f2ce08729bd2736c868b04e0ef4aa4a0c Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Fri, 14 Apr 2023 19:32:34 +0200 Subject: [PATCH 1/5] fix(superstream): fix subtitle error on SuperStream --- src/backend/providers/superstream/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/providers/superstream/index.ts b/src/backend/providers/superstream/index.ts index 9ebe6262..3c499739 100644 --- a/src/backend/providers/superstream/index.ts +++ b/src/backend/providers/superstream/index.ts @@ -229,9 +229,7 @@ registerProvider({ (subtitle: any): MWCaption | null => { const sub = subtitle; sub.subtitles = subtitle.subtitles.filter((subFile: any) => { - const extension = subFile.file_path.substring( - sub.file_path.length - 3 - ); + const extension = subFile.file_path.slice(-3); return [MWCaptionType.SRT, MWCaptionType.VTT].includes(extension); }); return { From 07945583380bb451d25e08c6aa8e2273328894e5 Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Fri, 14 Apr 2023 19:39:01 +0200 Subject: [PATCH 2/5] fix(player): add max-height to modals for smaller screens --- src/components/popout/FloatingView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/popout/FloatingView.tsx b/src/components/popout/FloatingView.tsx index 9ae797ee..4c21f136 100644 --- a/src/components/popout/FloatingView.tsx +++ b/src/components/popout/FloatingView.tsx @@ -29,6 +29,7 @@ export function FloatingView(props: Props) { data-floating-page={props.show ? "true" : undefined} style={{ height: props.height ? `${props.height}px` : undefined, + maxHeight: "70vh", width: props.width ? width : undefined, }} > From 5dfeeadbb87af9bdf0761c27fc2eba08c44cbfe6 Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Fri, 14 Apr 2023 20:03:11 +0200 Subject: [PATCH 3/5] fix(popouts): fix touch on scroll areas being weird --- .../positions/FloatingCardMobilePosition.tsx | 17 +++++++++++++++-- src/setup/index.css | 13 ++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/components/popout/positions/FloatingCardMobilePosition.tsx b/src/components/popout/positions/FloatingCardMobilePosition.tsx index 059f6667..7f890051 100644 --- a/src/components/popout/positions/FloatingCardMobilePosition.tsx +++ b/src/components/popout/positions/FloatingCardMobilePosition.tsx @@ -21,8 +21,21 @@ export function FloatingCardMobilePosition(props: MobilePositionProps) { })); const bind = useDrag( - ({ last, velocity: [, vy], direction: [, dy], movement: [, my] }) => { + ({ + last, + velocity: [, vy], + direction: [, dy], + movement: [, my], + ...event + }) => { if (closing.current) return; + + const isInScrollable = (event.target as HTMLDivElement).closest( + ".overflow-y-auto" + ); + // console.log(my); + if (isInScrollable) return; // Don't attempt to swipe the thing away if it's a scroll area unless the scroll area is at the top and the user is swiping down + const height = cardRect?.height ?? 0; if (last) { // if past half height downwards @@ -69,7 +82,7 @@ export function FloatingCardMobilePosition(props: MobilePositionProps) { return (
Date: Fri, 14 Apr 2023 21:40:55 +0200 Subject: [PATCH 4/5] Update src/components/popout/positions/FloatingCardMobilePosition.tsx --- src/components/popout/positions/FloatingCardMobilePosition.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/popout/positions/FloatingCardMobilePosition.tsx b/src/components/popout/positions/FloatingCardMobilePosition.tsx index 7f890051..dece3ccc 100644 --- a/src/components/popout/positions/FloatingCardMobilePosition.tsx +++ b/src/components/popout/positions/FloatingCardMobilePosition.tsx @@ -33,7 +33,6 @@ export function FloatingCardMobilePosition(props: MobilePositionProps) { const isInScrollable = (event.target as HTMLDivElement).closest( ".overflow-y-auto" ); - // console.log(my); if (isInScrollable) return; // Don't attempt to swipe the thing away if it's a scroll area unless the scroll area is at the top and the user is swiping down const height = cardRect?.height ?? 0; From b576a298e8bf77b95c415e000aa895a3af43166e Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Fri, 14 Apr 2023 21:43:30 +0200 Subject: [PATCH 5/5] Disable netfilm --- src/backend/providers/netfilm.ts | 1 + src/setup/index.css | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/providers/netfilm.ts b/src/backend/providers/netfilm.ts index 23a8cf90..f7efcfbe 100644 --- a/src/backend/providers/netfilm.ts +++ b/src/backend/providers/netfilm.ts @@ -22,6 +22,7 @@ registerProvider({ displayName: "NetFilm", rank: 15, type: [MWMediaType.MOVIE, MWMediaType.SERIES], + disabled: true, // The creator has asked us (very nicely) to leave him alone. Until (if) we self-host, netfilm should remain disabled async scrape({ media, episode, progress }) { if (!this.type.includes(media.meta.type)) { diff --git a/src/setup/index.css b/src/setup/index.css index 29a04f0f..af81851d 100644 --- a/src/setup/index.css +++ b/src/setup/index.css @@ -56,7 +56,6 @@ body[data-no-select] { @apply brightness-[500]; } -/* Disable scrolling on mobile view */ .is-mobile-view .overflow-y-auto { height: 60vh; }