From 8942eb8b7c4fa1d16aa2e72e8ba7120a653c9aa2 Mon Sep 17 00:00:00 2001 From: Brandon Cohen Date: Fri, 27 Jan 2023 07:53:46 -0500 Subject: [PATCH 1/4] fix: pass in library type when scanning recently added items (#3287) --- server/api/plexapi.ts | 9 +++++---- server/lib/scanners/plex/index.ts | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/api/plexapi.ts b/server/api/plexapi.ts index 03246c810..f6b8f3cb0 100644 --- a/server/api/plexapi.ts +++ b/server/api/plexapi.ts @@ -226,12 +226,13 @@ class PlexAPI { id: string, options: { addedAt: number } = { addedAt: Date.now() - 1000 * 60 * 60, - } + }, + mediaType: 'movie' | 'show' ): Promise { const response = await this.plexClient.query({ - uri: `/library/sections/${id}/all?sort=addedAt%3Adesc&addedAt>>=${Math.floor( - options.addedAt / 1000 - )}`, + uri: `/library/sections/${id}/all?type=${ + mediaType === 'show' ? '4' : '1' + }&sort=addedAt%3Adesc&addedAt>>=${Math.floor(options.addedAt / 1000)}`, extraHeaders: { 'X-Plex-Container-Start': `0`, 'X-Plex-Container-Size': `500`, diff --git a/server/lib/scanners/plex/index.ts b/server/lib/scanners/plex/index.ts index 73e4d9b26..f074872bb 100644 --- a/server/lib/scanners/plex/index.ts +++ b/server/lib/scanners/plex/index.ts @@ -96,7 +96,8 @@ class PlexScanner // We remove 10 minutes from the last scan as a buffer addedAt: library.lastScan - 1000 * 60 * 10, } - : undefined + : undefined, + library.type ); // Bundle items up by rating keys From 9d10e6a88c0996671f1d9d20792e1930dbc82329 Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Sun, 29 Jan 2023 13:27:33 +0900 Subject: [PATCH 2/4] fix(ui): style range thumbs correctly for firefox (#3294) --- src/styles/globals.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/styles/globals.css b/src/styles/globals.css index 7598cb9b1..e9bb6aa77 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -452,8 +452,9 @@ @apply hidden; } - input[type='range']::-webkit-slider-thumb { - @apply rounded-full bg-indigo-500; + input[type='range']::-webkit-slider-thumb, + input[type='range']::-moz-range-thumb { + @apply rounded-full border-0 bg-indigo-500; pointer-events: all; width: 16px; height: 16px; From 7040da1334f6d18e19a494c73caa17f7df552dfe Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Sun, 29 Jan 2023 16:27:09 +0900 Subject: [PATCH 3/4] fix(ui): show 5 icons when possible on mobile menu (#3298) --- src/components/Layout/MobileMenu/index.tsx | 44 +++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/components/Layout/MobileMenu/index.tsx b/src/components/Layout/MobileMenu/index.tsx index 2ccd75d3d..e0b45a22f 100644 --- a/src/components/Layout/MobileMenu/index.tsx +++ b/src/components/Layout/MobileMenu/index.tsx @@ -167,27 +167,29 @@ const MobileMenu = () => {
- {filteredLinks.slice(0, 4).map((link) => { - const isActive = - router.pathname.match(link.activeRegExp) && !isOpen; - return ( - - - {cloneElement( - isActive ? link.svgIconSelected : link.svgIcon, - { - className: 'h-6 w-6', - } - )} - - - ); - })} - {filteredLinks.length > 4 && ( + {filteredLinks + .slice(0, filteredLinks.length === 5 ? 5 : 4) + .map((link) => { + const isActive = + router.pathname.match(link.activeRegExp) && !isOpen; + return ( + + + {cloneElement( + isActive ? link.svgIconSelected : link.svgIcon, + { + className: 'h-6 w-6', + } + )} + + + ); + })} + {filteredLinks.length > 4 && filteredLinks.length !== 5 && (
diff --git a/src/components/PersonDetails/index.tsx b/src/components/PersonDetails/index.tsx index 9c8173adc..f4d489d52 100644 --- a/src/components/PersonDetails/index.tsx +++ b/src/components/PersonDetails/index.tsx @@ -91,11 +91,13 @@ const PersonDetails = () => { year: 'numeric', month: 'long', day: 'numeric', + timeZone: 'UTC', }), deathdate: intl.formatDate(data.deathday, { year: 'numeric', month: 'long', day: 'numeric', + timeZone: 'UTC', }), }) ); @@ -106,6 +108,7 @@ const PersonDetails = () => { year: 'numeric', month: 'long', day: 'numeric', + timeZone: 'UTC', }), }) ); diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx index 5c59e4fb8..72a3eacde 100644 --- a/src/components/TvDetails/index.tsx +++ b/src/components/TvDetails/index.tsx @@ -844,6 +844,7 @@ const TvDetails = ({ tv }: TvDetailsProps) => { year: 'numeric', month: 'long', day: 'numeric', + timeZone: 'UTC', })}
@@ -858,6 +859,7 @@ const TvDetails = ({ tv }: TvDetailsProps) => { year: 'numeric', month: 'long', day: 'numeric', + timeZone: 'UTC', })}