moved settings button to bottom and made it collapsible;use nc's built-in filepicker to set download and torrents folders;fixed issues of youtube-dl filenames exceeding the maximum length
This commit is contained in:
@@ -126,4 +126,20 @@ window.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
settingsForm.getInstance().setParent("custom-youtube-dl-settings-container").render(input);
|
||||
}).send();
|
||||
const filepicker = function (event) {
|
||||
let element = event.target;
|
||||
OC.dialogs.filepicker(
|
||||
t('ncdownloader', 'Select a directory'),
|
||||
function (path) {
|
||||
if (element.value !== path) {
|
||||
element.value = path;
|
||||
}
|
||||
},
|
||||
false,
|
||||
'httpd/unix-directory',
|
||||
true
|
||||
);
|
||||
}
|
||||
eventHandler.add('click', "#ncd_downloader_dir", filepicker);
|
||||
eventHandler.add('click', "#ncd_torrents_dir", filepicker);
|
||||
});
|
||||
Reference in New Issue
Block a user