From c5c6c35799f937b0fd7ebce47d2b01ab07f48830 Mon Sep 17 00:00:00 2001 From: ThaUnknown <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 27 Aug 2025 23:01:45 +0200 Subject: [PATCH] fix: reduce caching to 14 days fix: episode list width on external player on mobile fix: start miniplayer dragging at >3px of movement fix: seekbar getting stuck when using android swipe gestures fix: android popups being weird width [maybe] --- package.json | 2 +- src/lib/components/ui/player/externalplayer.svelte | 2 +- src/lib/components/ui/player/player.svelte | 2 +- src/lib/components/ui/player/seekbar.svelte | 2 ++ src/lib/components/ui/player/wrapper.svelte | 14 ++++++++++++-- src/lib/modules/anilist/urql-client.ts | 2 +- src/lib/modules/native.ts | 6 ++++-- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index deeccd9..4b36878 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "6.4.104", + "version": "6.4.105", "license": "BUSL-1.1", "private": true, "packageManager": "pnpm@9.15.5", diff --git a/src/lib/components/ui/player/externalplayer.svelte b/src/lib/components/ui/player/externalplayer.svelte index b45f53f..2d6bb51 100644 --- a/src/lib/components/ui/player/externalplayer.svelte +++ b/src/lib/components/ui/player/externalplayer.svelte @@ -70,7 +70,7 @@
goto(`/app/anime/${mediaInfo.media.id}`)}>{mediaInfo.session.title}
{mediaInfo.session.description} - + {#if mediaInfo.media} {#await episodes(mediaInfo.media.id) then eps} diff --git a/src/lib/components/ui/player/player.svelte b/src/lib/components/ui/player/player.svelte index 02612fc..39dd975 100644 --- a/src/lib/components/ui/player/player.svelte +++ b/src/lib/components/ui/player/player.svelte @@ -904,7 +904,7 @@ {mediaInfo.session.title} {mediaInfo.session.description} - + {#if mediaInfo.media} {#await Promise.all([episodes(mediaInfo.media.id), client.single(mediaInfo.media.id)]) then [eps, media]} {#if media.data?.Media} diff --git a/src/lib/components/ui/player/seekbar.svelte b/src/lib/components/ui/player/seekbar.svelte index ab72b03..e796aba 100644 --- a/src/lib/components/ui/player/seekbar.svelte +++ b/src/lib/components/ui/player/seekbar.svelte @@ -138,6 +138,8 @@ } + +
3 && Math.abs(firstY - e.offsetY) > 3) { + dragging = true + } bottom = e.offsetY - initialY + 'px' right = e.offsetX - initialX + 'px' } @@ -39,6 +47,8 @@ function endHover () { if (!isMiniplayer) return dragging = false + firstX = 0 + firstY = 0 } let initialX = 0 @@ -74,7 +84,7 @@ 'pointer-events-auto w-full', isMiniplayer ? 'max-w-80 absolute bottom-0 right-0 rounded-lg overflow-clip miniplayer transition-transform duration-[500ms] ease-[cubic-bezier(0.3,1.5,0.8,1)]' : 'h-full w-full', dragging && isMiniplayer && 'dragging', - !$isPlaying && 'paused hover:paused-show' + !$isPlaying && 'paused select:paused-show' )} style:--top={bottom} style:--left={right}> {#if $active} {#await $active} diff --git a/src/lib/modules/anilist/urql-client.ts b/src/lib/modules/anilist/urql-client.ts index 3c5368c..7859e5b 100644 --- a/src/lib/modules/anilist/urql-client.ts +++ b/src/lib/modules/anilist/urql-client.ts @@ -36,7 +36,7 @@ export const storagePromise = Promise.withResolvers() export const storage = makeDefaultStorage({ idbName: 'graphcache-v3', onCacheHydrated: () => storagePromise.resolve(), - maxAge: 31 // The maximum age of the persisted data in days + maxAge: 14 // The maximum age of the persisted data in days }) debug('Loading urql client') diff --git a/src/lib/modules/native.ts b/src/lib/modules/native.ts index 1802f2d..0e1c919 100644 --- a/src/lib/modules/native.ts +++ b/src/lib/modules/native.ts @@ -1,3 +1,5 @@ +import { SUPPORTS } from './settings' + import type { AuthResponse, Native, TorrentInfo } from 'native' import { sleep } from '$lib/utils' @@ -51,7 +53,7 @@ const dummyFiles = [ export default Object.assign>({ authAL: (url: string) => { return new Promise((resolve, reject) => { - const popup = open(url, 'authframe', 'popup,width=382,height=582') + const popup = open(url, 'authframe', SUPPORTS.isAndroid ? 'popup' : 'popup,width=382,height=582') if (!popup) return reject(new Error('Failed to open popup')) const check = () => { if (popup.closed) return reject(new Error('Popup closed')) @@ -70,7 +72,7 @@ export default Object.assign>({ }, authMAL: (url: string) => { return new Promise<{ code: string, state: string }>((resolve, reject) => { - const popup = open(url, 'authframe', 'popup,width=540,height=782') + const popup = open(url, 'authframe', SUPPORTS.isAndroid ? 'popup' : 'popup,width=540,height=782') if (!popup) return reject(new Error('Failed to open popup')) const check = () => { if (popup.closed) return reject(new Error('Popup closed'))