mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-10 18:01:29 +03:00
Player component now remembers previously set volume
Updated name of updatePlaylist->updatePlaylistFiles for clarity and added updatePlaylist route Added smarter safe download override, will auto activate if subtitle args are included.
This commit is contained in:
@@ -155,6 +155,13 @@ function setConfigItems(items) {
|
||||
return success;
|
||||
}
|
||||
|
||||
function globalArgsRequiresSafeDownload() {
|
||||
const globalArgs = config_api.getConfigItem('ytdl_custom_args');
|
||||
const argsThatRequireSafeDownload = ['--write-sub', '--write-srt'];
|
||||
const failedArgs = globalArgs.filter(arg => argsThatRequireSafeDownload.includes(arg));
|
||||
return failedArgs && failedArgs.length > 0;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getConfigItem: getConfigItem,
|
||||
setConfigItem: setConfigItem,
|
||||
@@ -164,7 +171,8 @@ module.exports = {
|
||||
configExistsCheck: configExistsCheck,
|
||||
CONFIG_ITEMS: CONFIG_ITEMS,
|
||||
initialize: initialize,
|
||||
descriptors: {}
|
||||
descriptors: {},
|
||||
globalArgsRequiresSafeDownload: globalArgsRequiresSafeDownload
|
||||
}
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
|
||||
Reference in New Issue
Block a user