mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-19 19:21:02 +03:00
Added option to change JWT expiration time called "Login expiration" in the Advanced tab
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
"multi_user_mode": false,
|
||||
"allow_advanced_download": false,
|
||||
"use_cookies": false,
|
||||
"jwt_expiration": 86400,
|
||||
"logger_level": "info"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"multi_user_mode": false,
|
||||
"allow_advanced_download": false,
|
||||
"use_cookies": false,
|
||||
"jwt_expiration": 86400,
|
||||
"logger_level": "info"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ exports.initialize = function(input_users_db, input_logger) {
|
||||
************************/
|
||||
saltRounds = 10;
|
||||
|
||||
JWT_EXPIRATION = (60 * 60); // one hour
|
||||
JWT_EXPIRATION = config_api.getConfigItem('ytdl_jwt_expiration');
|
||||
|
||||
SERVER_SECRET = null;
|
||||
if (users_db.get('jwt_secret').value()) {
|
||||
|
||||
@@ -227,6 +227,7 @@ DEFAULT_CONFIG = {
|
||||
"multi_user_mode": false,
|
||||
"allow_advanced_download": false,
|
||||
"use_cookies": false,
|
||||
"jwt_expiration": 86400,
|
||||
"logger_level": "info"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +152,10 @@ let CONFIG_ITEMS = {
|
||||
'key': 'ytdl_use_cookies',
|
||||
'path': 'YoutubeDLMaterial.Advanced.use_cookies'
|
||||
},
|
||||
'ytdl_jwt_expiration': {
|
||||
'key': 'ytdl_jwt_expiration',
|
||||
'path': 'YoutubeDLMaterial.Advanced.jwt_expiration'
|
||||
},
|
||||
'ytdl_logger_level': {
|
||||
'key': 'ytdl_logger_level',
|
||||
'path': 'YoutubeDLMaterial.Advanced.logger_level'
|
||||
|
||||
@@ -285,6 +285,18 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-12 mt-2 mb-1">
|
||||
<mat-form-field>
|
||||
<mat-label><ng-container i18n="Login expiration select label">Login expiration</ng-container></mat-label>
|
||||
<mat-select color="accent" [(ngModel)]="new_config['Advanced']['jwt_expiration']">
|
||||
<mat-option [value]="3600">1 Hour</mat-option>
|
||||
<mat-option [value]="86400">1 Day</mat-option>
|
||||
<mat-option [value]="604800">1 Week</mat-option>
|
||||
<mat-option [value]="2592000">1 Month</mat-option>
|
||||
<mat-option [value]="31536000">1 Year</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<mat-checkbox color="accent" [(ngModel)]="new_config['Advanced']['allow_advanced_download']"><ng-container i18n="Allow advanced downloading setting">Allow advanced download</ng-container></mat-checkbox>
|
||||
</div>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
"custom_downloading_agent": "",
|
||||
"multi_user_mode": true,
|
||||
"allow_advanced_download": true,
|
||||
"jwt_expiration": 86400,
|
||||
"logger_level": "debug",
|
||||
"use_cookies": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user