mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
54030c9448
commit
5466e3660a
4 changed files with 51 additions and 10 deletions
41
dashboard-ui/bower_components/emby-webcomponents/appsettings.js
vendored
Normal file
41
dashboard-ui/bower_components/emby-webcomponents/appsettings.js
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
define(['appStorage'], function (appStorage) {
|
||||
|
||||
function getKey(name, userId) {
|
||||
|
||||
if (userId) {
|
||||
name = userId + '-' + name;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
function get(name, userId) {
|
||||
|
||||
return appStorage.getItem(getKey(name, userId));
|
||||
}
|
||||
|
||||
function set(name, value, userId) {
|
||||
appStorage.setItem(getKey(name, userId), value);
|
||||
}
|
||||
|
||||
return {
|
||||
enableAutomaticBitrateDetection: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
set('enableAutomaticBitrateDetection', val.toString());
|
||||
}
|
||||
|
||||
return get('enableAutomaticBitrateDetection') != 'false';
|
||||
},
|
||||
maxStreamingBitrate: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
set('preferredVideoBitrate', val);
|
||||
}
|
||||
|
||||
return parseInt(get('preferredVideoBitrate') || '') || 1500000;
|
||||
},
|
||||
set: set,
|
||||
get: get
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue