Added to external settings
This commit is contained in:
+9
-1
@@ -27,7 +27,7 @@ Materialious allows you to customize various settings by overwriting the default
|
||||
+ [Listen by default](#listen-by-default)
|
||||
+ [Theatre mode by default](#theatre-mode-by-default)
|
||||
+ [Autoplay next by default](#autoplay-next-by-default)
|
||||
+ [Dash](#dash)
|
||||
+ [Default video quality](#default-video-quality)
|
||||
* [Sponsorblock](#sponsorblock)
|
||||
+ [Sponsor](#sponsor)
|
||||
+ [Unpaid/Self Promotion](#unpaidself-promotion)
|
||||
@@ -144,6 +144,14 @@ Avoids loading images.
|
||||
|
||||
## Player
|
||||
|
||||
### Default video quality
|
||||
|
||||
Determines the default quality for videos.
|
||||
|
||||
```json
|
||||
"defaultQuality": "1440"
|
||||
```
|
||||
|
||||
### Autoplay video
|
||||
|
||||
Controls whether videos autoplay.
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
playerAutoPlayStore,
|
||||
playerAutoplayNextByDefaultStore,
|
||||
playerDefaultLanguage,
|
||||
playerDefaultQualityStore,
|
||||
playerProxyVideosStore,
|
||||
playerSavePlaybackPositionStore,
|
||||
playerTheatreModeByDefaultStore,
|
||||
@@ -34,7 +35,11 @@ import {
|
||||
} from '$lib/store';
|
||||
import { get, type Writable } from 'svelte/store';
|
||||
|
||||
const persistedStores: { name: string, store: Writable<any>, type: 'string' | 'boolean' | 'array'; }[] = [
|
||||
const persistedStores: {
|
||||
name: string;
|
||||
store: Writable<any>;
|
||||
type: 'string' | 'boolean' | 'array';
|
||||
}[] = [
|
||||
{
|
||||
name: 'returnYTDislikesInstance',
|
||||
store: returnYTDislikesInstanceStore,
|
||||
@@ -189,6 +194,11 @@ const persistedStores: { name: string, store: Writable<any>, type: 'string' | 'b
|
||||
name: 'defaultPage',
|
||||
store: interfaceDefaultPage,
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
name: 'defaultQuality',
|
||||
store: playerDefaultQualityStore,
|
||||
type: 'string'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -197,7 +207,7 @@ function setStores(toSet: Record<string, any>) {
|
||||
let userOverwritten: boolean = false;
|
||||
try {
|
||||
userOverwritten = localStorage.getItem(store.name) !== null;
|
||||
} catch { }
|
||||
} catch {}
|
||||
|
||||
let paramValue = toSet[store.name];
|
||||
if (typeof paramValue !== 'undefined' && !userOverwritten) {
|
||||
|
||||
Reference in New Issue
Block a user