mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-11 23:30:58 +03:00
Added new setting to force a safe download (removes features like progress bar)
This commit is contained in:
@@ -1893,8 +1893,11 @@ app.post('/api/tomp3', optionalJwt, async function(req, res) {
|
||||
user: req.isAuthenticated() ? req.user.uid : null
|
||||
}
|
||||
|
||||
const safeDownloadOverride = config_api.getConfigItem('ytdl_safe_download_override');
|
||||
const is_playlist = url.includes('playlist');
|
||||
if (is_playlist || options.customQualityConfiguration || options.customArgs || options.maxBitrate)
|
||||
|
||||
let result_obj = null;
|
||||
if (safeDownloadOverride || is_playlist || options.customQualityConfiguration || options.customArgs || options.maxBitrate)
|
||||
result_obj = await downloadFileByURL_exec(url, 'audio', options, req.query.sessionID);
|
||||
else
|
||||
result_obj = await downloadFileByURL_normal(url, 'audio', options, req.query.sessionID);
|
||||
@@ -1920,9 +1923,11 @@ app.post('/api/tomp4', optionalJwt, async function(req, res) {
|
||||
user: req.isAuthenticated() ? req.user.uid : null
|
||||
}
|
||||
|
||||
const safeDownloadOverride = config_api.getConfigItem('ytdl_safe_download_override');
|
||||
const is_playlist = url.includes('playlist');
|
||||
|
||||
let result_obj = null;
|
||||
if (is_playlist || options.customQualityConfiguration || options.customArgs || options.selectedHeight || !url.includes('youtu'))
|
||||
if (safeDownloadOverride || is_playlist || options.customQualityConfiguration || options.customArgs || options.selectedHeight || !url.includes('youtu'))
|
||||
result_obj = await downloadFileByURL_exec(url, 'video', options, req.query.sessionID);
|
||||
else
|
||||
result_obj = await downloadFileByURL_normal(url, 'video', options, req.query.sessionID);
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"path-audio": "audio/",
|
||||
"path-video": "video/",
|
||||
"use_youtubedl_archive": false,
|
||||
"custom_args": ""
|
||||
"custom_args": "",
|
||||
"safe_download_override": false
|
||||
},
|
||||
"Extra": {
|
||||
"title_top": "YoutubeDL-Material",
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"path-audio": "audio/",
|
||||
"path-video": "video/",
|
||||
"use_youtubedl_archive": false,
|
||||
"custom_args": ""
|
||||
"custom_args": "",
|
||||
"safe_download_override": false
|
||||
},
|
||||
"Extra": {
|
||||
"title_top": "YoutubeDL-Material",
|
||||
|
||||
@@ -182,7 +182,8 @@ DEFAULT_CONFIG = {
|
||||
"path-audio": "audio/",
|
||||
"path-video": "video/",
|
||||
"use_youtubedl_archive": false,
|
||||
"custom_args": ""
|
||||
"custom_args": "",
|
||||
"safe_download_override": false
|
||||
},
|
||||
"Extra": {
|
||||
"title_top": "YoutubeDL-Material",
|
||||
|
||||
@@ -152,6 +152,10 @@
|
||||
<mat-checkbox color="accent" [(ngModel)]="new_config['Downloader']['use_youtubedl_archive']"><ng-container i18n="Use youtubedl archive setting">Use youtube-dl archive</ng-container></mat-checkbox>
|
||||
<p>Note: This setting only applies to downloads on the Home page. If you would like to use youtube-dl archive functionality in subscriptions, head down to the Subscriptions section.</p>
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<mat-checkbox color="accent" [(ngModel)]="new_config['Downloader']['safe_download_override']"><ng-container i18n="Safe download override setting">Safe download override</ng-container></mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"path-audio": "audio/",
|
||||
"path-video": "video/",
|
||||
"use_youtubedl_archive": false,
|
||||
"custom_args": ""
|
||||
"custom_args": "",
|
||||
"safe_download_override": false
|
||||
},
|
||||
"Extra": {
|
||||
"title_top": "YoutubeDL-Material",
|
||||
@@ -37,7 +38,7 @@
|
||||
"Subscriptions": {
|
||||
"allow_subscriptions": true,
|
||||
"subscriptions_base_path": "subscriptions/",
|
||||
"subscriptions_check_interval": "300",
|
||||
"subscriptions_check_interval": "30",
|
||||
"subscriptions_use_youtubedl_archive": true
|
||||
},
|
||||
"Users": {
|
||||
@@ -49,7 +50,8 @@
|
||||
"custom_downloading_agent": "",
|
||||
"multi_user_mode": true,
|
||||
"allow_advanced_download": true,
|
||||
"logger_level": "debug"
|
||||
"logger_level": "debug",
|
||||
"use_cookies": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user