Hey guys!
I am very proud of myself! ... Without even knowing what programming language these scripts are in, I managed to combine your 2 scripts, mgpai, into one ... the first one "Move to trash" and the other one "Play finished and unfinished files".
So now the script does move finished and unfinished files to trash and also deletes the links. In case another Linux-user is interested:
Code:
/*
Remove selected links and move files to trash
Trigger: "Downloadlist Contextmenu Button Pressed"
Customize download list context menu > Add a new "Eventscripter trigger" button > Rename it to "[Script] Remove links and move files to trash" (without quotes) > Change Icon (Optional)
*/
if (name == "[Script] Remove links and move files to trash") {
var links = dlSelection.getLinks();
if (links.length) {
links.forEach(function(link) {
var file = getPath(link.getDownloadPath());
link.remove();
if (file.exists()) {
callSync("kioclient", "move", file, "trash:/");
} else {
var partFile = getPath(file + ".part");
if (partFile.exists()) {
callSync("kioclient", "move", partFile, "trash:/");
}
}
})
}
}
Only unfinished youtube-files are not being moved to trash. I guess it is because of their strange naming. But in my case this is not a very big deal.
Would be glad, if this is of help for someone! ...