diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index 04b0065a..3b0daeee 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 134 - versionName "1.9.17" + versionCode 135 + versionName "1.9.18" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/materialious/electron/materialious.metainfo.xml b/materialious/electron/materialious.metainfo.xml index 773eb01f..bb88cc20 100644 --- a/materialious/electron/materialious.metainfo.xml +++ b/materialious/electron/materialious.metainfo.xml @@ -69,7 +69,11 @@ - + + + https://github.com/Materialious/Materialious/releases/tag/1.9.18 + + https://github.com/Materialious/Materialious/releases/tag/1.9.17 diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 3b16e650..10a1d81a 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -1,6 +1,6 @@ { "name": "Materialious", - "version": "1.9.17", + "version": "1.9.18", "description": "Modern material design for Invidious.", "author": { "name": "Ward Pearce", @@ -44,4 +44,4 @@ "capacitor", "electron" ] -} +} \ No newline at end of file diff --git a/materialious/package.json b/materialious/package.json index fca37748..abe87fbe 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -1,6 +1,6 @@ { "name": "materialious", - "version": "1.9.17", + "version": "1.9.18", "private": true, "scripts": { "dev": "vite dev", diff --git a/materialious/src/lib/components/Player.svelte b/materialious/src/lib/components/Player.svelte index 2b28dc35..f3709b8e 100644 --- a/materialious/src/lib/components/Player.svelte +++ b/materialious/src/lib/components/Player.svelte @@ -378,9 +378,7 @@ dashUrl += '?local=true'; } - await player.load(dashUrl); - - await loadPlayerPos(); + await player.load(dashUrl, await getLastPlayPos()); } else { if (data.video.fallbackPatch === 'youtubejs') { await player.load(data.video.dashUrl); @@ -650,8 +648,8 @@ } }); - async function loadPlayerPos() { - if (loadTimeFromUrl($page)) return; + async function getLastPlayPos(): Promise { + if (loadTimeFromUrl($page)) return 0; let toSetTime = 0; @@ -670,7 +668,7 @@ } } - if (toSetTime > 0 && playerElement) playerElement.currentTime = toSetTime; + return toSetTime; } function savePlayerPos() { diff --git a/materialious/src/routes/(no-layout)/tv/[slug]/+page.svelte b/materialious/src/routes/(no-layout)/tv/[slug]/+page.svelte index c39321e6..4556c967 100644 --- a/materialious/src/routes/(no-layout)/tv/[slug]/+page.svelte +++ b/materialious/src/routes/(no-layout)/tv/[slug]/+page.svelte @@ -111,22 +111,24 @@
{$_('player.chapters')}
{#each data.content.timestamps as timestamp} -
{ - if (playerElement) playerElement.currentTime = timestamp.time; - }} - > -
-

{timestamp.title}

- = timestamp.time && - (playerCurrentTime <= timestamp.endTime || timestamp.endTime === -1)} - class="chip no-margin">{timestamp.timePretty} -
-
+ +
{ + if (playerElement) playerElement.currentTime = timestamp.time; + }} + > +
+

{timestamp.title}

+ = timestamp.time && + (playerCurrentTime <= timestamp.endTime || timestamp.endTime === -1)} + class="chip no-margin">{timestamp.timePretty} +
+
+
{/each}
{/if} diff --git a/update_versions.py b/update_versions.py index c824f933..072eb9a8 100644 --- a/update_versions.py +++ b/update_versions.py @@ -3,7 +3,7 @@ import os import re from datetime import datetime -LATEST_VERSION = "1.9.17" +LATEST_VERSION = "1.9.18" RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")