diff --git a/materialious/package-lock.json b/materialious/package-lock.json index faf149fa..f4d97334 100644 --- a/materialious/package-lock.json +++ b/materialious/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.1", "dependencies": { "beercss": "^3.5.1", + "fuse.js": "^7.0.0", "human-number": "^2.0.4", "media-icons": "^0.10.0", "peerjs": "^1.5.2", @@ -4913,6 +4914,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/fuse.js": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.0.0.tgz", + "integrity": "sha512-14F4hBIxqKvD4Zz/XjDc3y94mNZN6pRv3U13Udo0lNLCWRBUsrMv2xwcF/y/Z5sV6+FQW+/ow68cHpm4sunt8Q==", + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", diff --git a/materialious/package.json b/materialious/package.json index 1cb976b3..f9f6e71c 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -36,6 +36,7 @@ "type": "module", "dependencies": { "beercss": "^3.5.1", + "fuse.js": "^7.0.0", "human-number": "^2.0.4", "media-icons": "^0.10.0", "peerjs": "^1.5.2", diff --git a/materialious/src/routes/+layout.svelte b/materialious/src/routes/+layout.svelte index 57f58dfd..d79497b8 100644 --- a/materialious/src/routes/+layout.svelte +++ b/materialious/src/routes/+layout.svelte @@ -664,6 +664,8 @@ +
Sync party
+

Please note your IP will be visible to users you invite.

{#if $syncPartyPeer} {/if}
- + + +{/each} diff --git a/materialious/src/routes/subscriptions/manage/+page.ts b/materialious/src/routes/subscriptions/manage/+page.ts new file mode 100644 index 00000000..20322ba2 --- /dev/null +++ b/materialious/src/routes/subscriptions/manage/+page.ts @@ -0,0 +1,16 @@ +import { getSubscriptions } from "$lib/Api"; +import { error } from "@sveltejs/kit"; + +export async function load() { + let subscriptions; + + try { + subscriptions = await getSubscriptions(); + } catch (errorMessage: any) { + error(500, errorMessage); + } + + return { + subscriptions: subscriptions + }; +} \ No newline at end of file diff --git a/materialious/src/routes/watch/[slug]/+page.svelte b/materialious/src/routes/watch/[slug]/+page.svelte index 5ff43673..cbfaa312 100644 --- a/materialious/src/routes/watch/[slug]/+page.svelte +++ b/materialious/src/routes/watch/[slug]/+page.svelte @@ -56,7 +56,11 @@ } else if (event.type === 'play') { player.play(); } else if (event.type === 'seek' && event.time) { - player.currentTime = event.time; + const timeDiff = player.currentTime - event.time; + + if (timeDiff > 3 || timeDiff < 3) { + player.currentTime = event.time; + } } }); }); @@ -223,7 +227,7 @@
{data.video.title}
-
+ -
+
{#if data.returnYTDislikes} -
- -
- + {#if data.downloadOptions.length > 0} + + {/if} {#if data.personalPlaylists} -