diff --git a/capacitor/src/support.js b/capacitor/src/support.js
index 2994f5f..1ebffcc 100644
--- a/capacitor/src/support.js
+++ b/capacitor/src/support.js
@@ -1,5 +1,13 @@
-// feature support list, overriden per environment
+// feature support list, overriden per environment, capacitor
export const SUPPORTS = {
- offscreenRender: false
+ offscreenRender: false,
+ update: false,
+ angle: false,
+ doh: false,
+ dht: false,
+ discord: false,
+ torrentPort: false,
+ torrentPath: false,
+ torrentPersist: false
}
diff --git a/capacitor/src/webtorrent.js b/capacitor/src/webtorrent.js
index 0ee9de8..dbf1a39 100644
--- a/capacitor/src/webtorrent.js
+++ b/capacitor/src/webtorrent.js
@@ -25,4 +25,4 @@ async function storageQuota () {
return quota - usage
}
-globalThis.client = new TorrentClient(ipcRendererWebTorrent, storageQuota, 'browser', controller, { torrentPort: Math.random() * 65535 + 1 })
+globalThis.client = new TorrentClient(ipcRendererWebTorrent, storageQuota, 'browser', controller, { torrentPort: Math.floor(Math.random() * 65535 + 1) })
diff --git a/common/Router.svelte b/common/Router.svelte
index c05a7bc..a482bf4 100644
--- a/common/Router.svelte
+++ b/common/Router.svelte
@@ -1,7 +1,7 @@
-
-
-
-
-
diff --git a/common/components/Menubar.svelte b/common/components/Menubar.svelte
index 0bbcbab..4a81a60 100644
--- a/common/components/Menubar.svelte
+++ b/common/components/Menubar.svelte
@@ -61,7 +61,8 @@
}
@media (pointer: none), (pointer: coarse) {
.navbar {
- display: none;
+ display: none !important;
+ height: 0;
}
}
diff --git a/common/components/Navbar.svelte b/common/components/Navbar.svelte
index 5857275..4b00031 100644
--- a/common/components/Navbar.svelte
+++ b/common/components/Navbar.svelte
@@ -2,7 +2,7 @@
import { getContext } from 'svelte'
import { alID } from '@/modules/anilist.js'
import { media } from '../views/Player/MediaHandler.svelte'
- import { platformMap } from '../views/Settings.svelte'
+ import { platformMap } from '@/views/Settings/Settings.svelte'
import { toast } from 'svelte-sonner'
import { click } from '@/modules/click.js'
import { logout } from './Logout.svelte'
diff --git a/common/components/Sidebar.svelte b/common/components/Sidebar.svelte
index f8435f9..b29ff88 100644
--- a/common/components/Sidebar.svelte
+++ b/common/components/Sidebar.svelte
@@ -2,7 +2,7 @@
import { getContext } from 'svelte'
import { alID } from '@/modules/anilist.js'
import { media } from '../views/Player/MediaHandler.svelte'
- import { platformMap } from '../views/Settings.svelte'
+ import { platformMap } from '@/views/Settings/Settings.svelte'
import { settings } from '@/modules/settings.js'
import { toast } from 'svelte-sonner'
import { click } from '@/modules/click.js'
diff --git a/common/components/TabLabel.svelte b/common/components/TabLabel.svelte
index 57063d3..5dcac1a 100644
--- a/common/components/TabLabel.svelte
+++ b/common/components/TabLabel.svelte
@@ -9,6 +9,12 @@
registerTab(tab)
-
selectTab(tab)}>
+
selectTab(tab)}>
+
+
diff --git a/common/modules/subtitles.js b/common/modules/subtitles.js
index 80c58bc..5da01ab 100644
--- a/common/modules/subtitles.js
+++ b/common/modules/subtitles.js
@@ -160,6 +160,9 @@ export default class Subtitles {
subContent: defaultHeader,
fonts: this.fonts,
offscreenRender: SUPPORTS.offscreenRender,
+ libassMemoryLimit: 1024,
+ libassGlyphLimit: 80000,
+ maxRenderHeight: parseInt(settings.value.subtitleRenderHeight) || 0,
fallbackFont: settings.value.font?.name || 'roboto medium',
availableFonts: {
'roboto medium': './Roboto.ttf'
diff --git a/common/modules/support.js b/common/modules/support.js
index 9747cdd..725a357 100644
--- a/common/modules/support.js
+++ b/common/modules/support.js
@@ -1,5 +1,13 @@
-// feature support list, overriden per environment
+// feature support list, overriden per environment, global
export const SUPPORTS = {
- offscreenRender: true
+ offscreenRender: true,
+ update: true,
+ angle: true,
+ doh: true,
+ dht: true,
+ discord: true,
+ torrentPort: true,
+ torrentPath: true,
+ torrentPersist: true
}
diff --git a/common/modules/util.js b/common/modules/util.js
index c422ffb..d0a94f0 100644
--- a/common/modules/util.js
+++ b/common/modules/util.js
@@ -157,6 +157,7 @@ export const defaults = {
dhtPort: 0,
missingFont: true,
maxConns: 50,
+ subtitleRenderHeight: 0,
subtitleLanguage: 'eng',
audioLanguage: 'jpn',
enableDoH: false,
diff --git a/common/modules/webtorrent.js b/common/modules/webtorrent.js
index 6ef2e5f..0dd33e3 100644
--- a/common/modules/webtorrent.js
+++ b/common/modules/webtorrent.js
@@ -6,11 +6,17 @@ import { defaults, fontRx, subRx, videoRx } from './util.js'
const LARGE_FILESIZE = 32_000_000_000
+let storedSettings = {}
+
+try {
+ storedSettings = JSON.parse(localStorage.getItem('settings')) || {}
+} catch (error) {}
+
export default class TorrentClient extends WebTorrent {
static excludedErrorMessages = ['WebSocket', 'User-Initiated Abort, reason=', 'Connection failed.']
constructor (ipc, storageQuota, serverMode, controller, settingOverrides = {}) {
- const settings = { ...defaults, ...(JSON.parse(localStorage.getItem('settings')) || {}), ...settingOverrides }
+ const settings = { ...defaults, ...storedSettings, ...settingOverrides }
super({
dht: !settings.torrentDHT,
maxConns: settings.maxConns,
diff --git a/common/package.json b/common/package.json
index 1e0cfda..8325170 100644
--- a/common/package.json
+++ b/common/package.json
@@ -13,11 +13,12 @@
"p2pt": "github:ThaUnknown/p2pt#modernise",
"perfect-seekbar": "^1.1.0",
"quartermoon": "^1.2.3",
+ "simple-font-select": "^1.0.1",
"simple-store-svelte": "^1.0.1",
"svelte": "^4.2.3",
"svelte-keybinds": "^1.0.5",
"svelte-loader": "^3.1.9",
- "svelte-miniplayer": "^1.0.4",
+ "svelte-miniplayer": "^1.0.5",
"svelte-sonner": "^0.3.3",
"webpack-merge": "^5.10.0"
}
diff --git a/common/views/Settings.svelte b/common/views/Settings.svelte
deleted file mode 100644
index 9e615fd..0000000
--- a/common/views/Settings.svelte
+++ /dev/null
@@ -1,550 +0,0 @@
-
-
-
-
-
-
-
-
Settings
- {#each Object.values(groups) as group}
-
-
-
{group.icon}
-
-
{group.name}
-
{group.desc}
-
-
-
- {/each}
-
-
-
-
-
-
Restart may be required for some settings to take effect.
-
If you don't know what shit does, use default settings.
-
v{version} {platformMap[window.version.platform]} {window.version.arch}
-
-
-
-
-
-
-
font_download
- Default Subtitle Font
-
-
-
-
-
-
-
-
-
-
play_arrow
- Playback Settings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
list
- Anilist Settings
-
-
-
-
-
-
-
-
-
translate
- Language Settings
-
-
-
-
-
-
-
-
- {#each $settings.rssFeedsNew as _, i}
-
- {/each}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#await changeLog}
-
Loading changelog...
- {:then changes}
- {#each changes as { body, version }}
- {version}
{body}
- {/each}
- {/await}
-
-
-
-
-
-
-
diff --git a/common/views/Settings/AppSettings.svelte b/common/views/Settings/AppSettings.svelte
new file mode 100644
index 0000000..3608c21
--- /dev/null
+++ b/common/views/Settings/AppSettings.svelte
@@ -0,0 +1,54 @@
+
+
+
+
+ {#if SUPPORTS.update}
+
+ {/if}
+
+
diff --git a/common/views/Settings/HomeSectionsSettings.svelte b/common/views/Settings/HomeSectionsSettings.svelte
index 7d556b7..aeaa547 100644
--- a/common/views/Settings/HomeSectionsSettings.svelte
+++ b/common/views/Settings/HomeSectionsSettings.svelte
@@ -22,67 +22,57 @@
}
-
-
-
-
list
- Home Sections Order
+{#if mouseYCoordinate}
+
- {#if mouseYCoordinate}
-