From 30aadde7ae22a7ce5df50dd3a4ba641e1adb0729 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:07:41 +0000 Subject: [PATCH] Add a configurable stream prefetch limit. --- src/components/PreferencesPage.vue | 13 +++++++++++++ src/locales/en.json | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/PreferencesPage.vue b/src/components/PreferencesPage.vue index cf1877f5..9271f536 100644 --- a/src/components/PreferencesPage.vue +++ b/src/components/PreferencesPage.vue @@ -207,6 +207,16 @@ @change="onChange($event)" /> +

SponsorBlock

@@ -483,6 +493,7 @@ export default { enabledCodecs: ["vp9", "avc"], disableLBRY: false, proxyLBRY: false, + prefetchLimit: 2, password: null, showConfirmResetPrefsDialog: false, }; @@ -551,6 +562,7 @@ export default { this.enabledCodecs = this.getPreferenceString("enabledCodecs", "vp9,avc").split(","); this.disableLBRY = this.getPreferenceBoolean("disableLBRY", false); this.proxyLBRY = this.getPreferenceBoolean("proxyLBRY", false); + this.prefetchLimit = this.getPreferenceNumber("prefetchLimit", 2); this.hideWatched = this.getPreferenceBoolean("hideWatched", false); this.mobileChapterLayout = this.getPreferenceString("mobileChapterLayout", "Vertical"); if (this.selectedLanguage != "en") { @@ -613,6 +625,7 @@ export default { localStorage.setItem("enabledCodecs", this.enabledCodecs.join(",")); localStorage.setItem("disableLBRY", this.disableLBRY); localStorage.setItem("proxyLBRY", this.proxyLBRY); + localStorage.setItem("prefetchLimit", this.prefetchLimit); localStorage.setItem("hideWatched", this.hideWatched); localStorage.setItem("mobileChapterLayout", this.mobileChapterLayout); diff --git a/src/locales/en.json b/src/locales/en.json index d97bcc7b..0afc35e7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -149,7 +149,8 @@ "delete_automatically": "Delete automatically after", "generate_qrcode": "Generate QR Code", "download_frame": "Download frame", - "add_to_group": "Add to group" + "add_to_group": "Add to group", + "concurrent_prefetch_limit": "Concurrent Stream Prefetch Limit" }, "comment": { "pinned_by": "Pinned by {author}",