by variables » Thu Dec 23, 2021 1:04 am
I've got a collection of mp3/cdg files i'd like to organize. When a mp3 is renamed/copied, I'd like the same operation to happen to the accompanying cdg file.
I tried making an addon with the following code:
init.js
Code: Select all
app.filesystem.override({
copyFileAsync: function($super, src, dst) {
$super(src, dst);
alert(`copy ${src} to ${dst}`);
// use fileExists and $super to copy the cdg file
}
});
I didn't get any errors but I also didn't any alert boxes. So either my addon didn't load or autoOrganize doesn't call any of the filesystem methods.
also tried with no alert shown
Code: Select all
app.trackOperation.override({
autoOrganize: function($super, sl, names, isMoving, addToLib, removeEmpty) {
alert(JSON.stringify(names));
$super(sl, names, isMoving, addToLib, removeEmpty);
}
});
I've got a collection of mp3/cdg files i'd like to organize. When a mp3 is renamed/copied, I'd like the same operation to happen to the accompanying cdg file.
I tried making an addon with the following code:
init.js
[code]
app.filesystem.override({
copyFileAsync: function($super, src, dst) {
$super(src, dst);
alert(`copy ${src} to ${dst}`);
// use fileExists and $super to copy the cdg file
}
});
[/code]
I didn't get any errors but I also didn't any alert boxes. So either my addon didn't load or autoOrganize doesn't call any of the filesystem methods.
also tried with no alert shown
[code]
app.trackOperation.override({
autoOrganize: function($super, sl, names, isMoving, addToLib, removeEmpty) {
alert(JSON.stringify(names));
$super(sl, names, isMoving, addToLib, removeEmpty);
}
});
[/code]