Add a configurable stream prefetch limit.

This commit is contained in:
Kavin 2023-12-15 21:07:41 +00:00
parent fa24b99a95
commit 30aadde7ae
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
2 changed files with 15 additions and 1 deletions

View File

@ -207,6 +207,16 @@
@change="onChange($event)" @change="onChange($event)"
/> />
</label> </label>
<label class="pref" for="txtPrefetchLimit">
<strong v-t="'actions.concurrent_prefetch_limit'" />
<input
id="txtPrefetchLimit"
v-model="prefetchLimit"
class="input w-24"
type="text"
@change="onChange($event)"
/>
</label>
<h2 class="text-center">SponsorBlock</h2> <h2 class="text-center">SponsorBlock</h2>
<p class="text-center"> <p class="text-center">
@ -483,6 +493,7 @@ export default {
enabledCodecs: ["vp9", "avc"], enabledCodecs: ["vp9", "avc"],
disableLBRY: false, disableLBRY: false,
proxyLBRY: false, proxyLBRY: false,
prefetchLimit: 2,
password: null, password: null,
showConfirmResetPrefsDialog: false, showConfirmResetPrefsDialog: false,
}; };
@ -551,6 +562,7 @@ export default {
this.enabledCodecs = this.getPreferenceString("enabledCodecs", "vp9,avc").split(","); this.enabledCodecs = this.getPreferenceString("enabledCodecs", "vp9,avc").split(",");
this.disableLBRY = this.getPreferenceBoolean("disableLBRY", false); this.disableLBRY = this.getPreferenceBoolean("disableLBRY", false);
this.proxyLBRY = this.getPreferenceBoolean("proxyLBRY", false); this.proxyLBRY = this.getPreferenceBoolean("proxyLBRY", false);
this.prefetchLimit = this.getPreferenceNumber("prefetchLimit", 2);
this.hideWatched = this.getPreferenceBoolean("hideWatched", false); this.hideWatched = this.getPreferenceBoolean("hideWatched", false);
this.mobileChapterLayout = this.getPreferenceString("mobileChapterLayout", "Vertical"); this.mobileChapterLayout = this.getPreferenceString("mobileChapterLayout", "Vertical");
if (this.selectedLanguage != "en") { if (this.selectedLanguage != "en") {
@ -613,6 +625,7 @@ export default {
localStorage.setItem("enabledCodecs", this.enabledCodecs.join(",")); localStorage.setItem("enabledCodecs", this.enabledCodecs.join(","));
localStorage.setItem("disableLBRY", this.disableLBRY); localStorage.setItem("disableLBRY", this.disableLBRY);
localStorage.setItem("proxyLBRY", this.proxyLBRY); localStorage.setItem("proxyLBRY", this.proxyLBRY);
localStorage.setItem("prefetchLimit", this.prefetchLimit);
localStorage.setItem("hideWatched", this.hideWatched); localStorage.setItem("hideWatched", this.hideWatched);
localStorage.setItem("mobileChapterLayout", this.mobileChapterLayout); localStorage.setItem("mobileChapterLayout", this.mobileChapterLayout);

View File

@ -149,7 +149,8 @@
"delete_automatically": "Delete automatically after", "delete_automatically": "Delete automatically after",
"generate_qrcode": "Generate QR Code", "generate_qrcode": "Generate QR Code",
"download_frame": "Download frame", "download_frame": "Download frame",
"add_to_group": "Add to group" "add_to_group": "Add to group",
"concurrent_prefetch_limit": "Concurrent Stream Prefetch Limit"
}, },
"comment": { "comment": {
"pinned_by": "Pinned by {author}", "pinned_by": "Pinned by {author}",