- Go to the src/actions folder
- Open the template.js
- Save the new template as <ActionName>.js
- Find a suitable material icon
- Download the icon from the material icon GitHub. You will need to search for the icon due to GitHub limits
- Load the svg into Photopea
- Resize to 64x64
- Save as svg and jpg
- Place a <ActionName>.svg and <ActionName>.jpg in the skin\icon folder
- Open the template <ActionName>.js
- Search for "ActionTemplate" and replace with <ActionName>
- Add
requirejs('actions/<ActionName>')to init.js - Copy the commented
// (function () { ... })();at the end of local.js - Search for "ActionTemplate" and replace with <ActionName>
- Replace "Action Tooltop" with something more meaningful
- Update the
actionTitle - Update the
confirmMessage- %s will inject the total number of highlighted tracks to the message - Update the
completeMessage
grouporder: 100- All custom actions use the same group order to keep menu items togetherorder:- Set to 10 higher than the highest order value in existing action files- ClearComments: order 10
- PadTrackNo: order 20
- New actions should follow this pattern
- The template will always expect one or more files to have been selected in the MediaMonkey browser
- the
TrackWorker()function receives alistoftracks. - A single
trackis processed in thetracks.forEach(track => { /* here */ }); - Always code for a single track and let the scaffolding do the hard work