looking for a script that help to edit end-time for a number of tracks at once example : track length minus last 18 seconds
the existing one need to be done for each individual track, it will be helpful if there is a syntax for the length of the track and all you have to do is add the minus what ever seconds from the end of the tracks, as each track length differ from the next one.
Thank you
Track End-Time
Moderators: jiri, drakinite, Addon Administrators
Re: Track End-Time
You can get inspired by the Andre's code here:
https://www.mediamonkey.com/forum/viewt ... 22#p493322
and instead of changing track.playCounter there use code like:
https://www.mediamonkey.com/forum/viewt ... 22#p493322
and instead of changing track.playCounter there use code like:
Code: Select all
track.stopTime = track.songLength - 18000; // milliseconds
Re: Track End-Time
thank you so much luke, much appreciated, i am so bad at writing code, but i cannot for the life of me do it, if not too much trouble could you please show me where to change the code to
track.stopTime = track.songLength - 18000; // milliseconds
many thanks
track.stopTime = track.songLength - 18000; // milliseconds
many thanks
Re: Track End-Time
Sure, the code looks like:
The whole addon to install is here: https://www.dropbox.com/s/98qig8vms1q69 ... .mmip?dl=0
i.e. go to menu Addons > Add ..., select the subtractSeconds.mmip and install it.
Usage: Select group of tracks > Edit tags > Subtract 18 seconds...
Code: Select all
actions.subtractMilliseconds = {
title: _('Sutract 18 seconds ...'),
hotkeyAble: true,
icon: 'edit',
disabled: uitools.notMediaListSelected,
visible: window.uitools.getCanEdit,
execute: async function () {
var list = await uitools.getSelectedTracklist().whenLoaded();
if (list.count === 0) {
return;
}
list.forEach(function (track) {
track.stopTime = track.songLength - 18000; // milliseconds
track.commitAsync();
});
}
}
window._menuItems.editTags.action.submenu.push({
action: actions.subtractMilliseconds,
order: 10,
grouporder: 10
});
i.e. go to menu Addons > Add ..., select the subtractSeconds.mmip and install it.
Usage: Select group of tracks > Edit tags > Subtract 18 seconds...
Re: Track End-Time
Cannot thank you enough, God bless you and your family
that helped a lot
stay safe and thanks once again
Ross
that helped a lot
stay safe and thanks once again
Ross