[REQ] Keep user's custom Case checker script

Get help for different MediaMonkey 5 Addons.

Moderators: jiri, drakinite, Addon Administrators

tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

[REQ] Keep user's custom Case checker script

Post by tbm72 »

On a portable install I've edited the dlgCaseChecker.js script with my own customised file. Each time I update MM5 I need to remember to keep a backup of the script and paste it back in over the top of the default file. Is there any way to stop MM5 updating my edited case checker script?
Andre_H
Posts: 415
Joined: Thu Jan 21, 2021 2:04 pm
Location: Germany

Re: [REQ] Keep user's custom Case checker script

Post by Andre_H »

You could copy it into another folder as a new script/addon, so it shouldn't be replaced.
- MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 2016 # only essential addons # my 24/7 media server
- MMW MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 10 # playing, testing skins & addons # my desktop app
- MMA Pro (2.0.0.1063) on Android 10, 11, 12 Phones & Tabs # WiFi Sync # playing

- MP3Tag, MP3Diags, MP3DirectCut, IrfanView
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: [REQ] Keep user's custom Case checker script

Post by tbm72 »

Andre_H wrote: Fri Jul 02, 2021 4:01 am You could copy it into another folder as a new script/addon, so it shouldn't be replaced.
Thanks - just trying this out. I haven't really used scripts much before but I've duplicated and renamed the 'caseChecker' folder inside the scripts folder and edited the info.json file so I can see which is my edited version within Tools>Addons.

So what would I need to do to make sure when I go to Tools>Edit Tags>Case Checker that it uses my edited version? Do I need to delete the original Case Checker addon?
Ludek
Posts: 4958
Joined: Fri Mar 09, 2007 9:00 am

Re: [REQ] Keep user's custom Case checker script

Post by Ludek »

You can rename your verison to "Case Checker 2" and you will know that this is your version when using it. i.e. having both installed at once.

i.e.
1) rename folder caseChecked to caseChecked2
2) in info.json change

Code: Select all

   
   "title": "Case Checker",
   "id": "casechecker",
to

Code: Select all

   
   "title": "Case Checker 2",
   "id": "casechecker2",
3) in actions._add.js change

Code: Select all

actions.caseChecker = {
    title: _('Case Checker') + '...',
    hotkeyAble: true,
    icon: 'caseChecker',
    disabled: uitools.notMediaListSelected,
    visible: window.uitools.getCanEdit,
    execute: async function () {
        var list = uitools.getSelectedTracklist();
        var dlg = uitools.openDialog('dlgCaseChecker', {
            show: true,
            modal: true,
            title: _('Case Checker'),
            tracks: list
        });
    }
}
to

Code: Select all

actions.caseChecker = {
    title: _('Case Checker 2') + '...',
    hotkeyAble: true,
    icon: 'caseChecker',
    disabled: uitools.notMediaListSelected,
    visible: window.uitools.getCanEdit,
    execute: async function () {
        var list = uitools.getSelectedTracklist();
        var dlg = uitools.openDialog('dlgCaseChecker', {
            show: true,
            modal: true,
            title: _('Case Checker 2'),
            tracks: list
        });
    }
}
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: [REQ] Keep user's custom Case checker script

Post by tbm72 »

Ludek wrote: Fri Jul 02, 2021 7:27 am You can rename your verison to "Case Checker 2" and you will know that this is your version when using it. i.e. having both installed at once.
Thanks Ludek, I followed these instructions and renamed the casechecker folder to casechecker2 (and the rest of the steps included above). I then replaced dlgCaseChecker.js with my own version. In the Tools menu I then have 1 version of the script available:

Tools>Edit tags>Case Checker 2

This works as expected (and runs my own version of the script). But if I run the MM5 installer again and update MM5 it then adds back in the original case checker script so there are now 2 available from the Tools menu (Case Checker and Case Checker 2). This would be no problem as I would just choose Case Checker 2 but both of these scripts now give the same output (running the default script for both of them).

Is there something missing in the previous steps?
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: [REQ] Keep user's custom Case checker script

Post by tbm72 »

It looks like whenever there are 2 versions of the script, it always uses dlgCaseChecker.js from the original default script, even if you choose the 2nd one from Tools>Edit tags>Case Checker 2.
Andre_H
Posts: 415
Joined: Thu Jan 21, 2021 2:04 pm
Location: Germany

Re: [REQ] Keep user's custom Case checker script

Post by Andre_H »

Can you delete the original addon (after every update, i know)?
- MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 2016 # only essential addons # my 24/7 media server
- MMW MMW 5.0.4.2690 (non-portable, shared DB & files) on Windows 10 # playing, testing skins & addons # my desktop app
- MMA Pro (2.0.0.1063) on Android 10, 11, 12 Phones & Tabs # WiFi Sync # playing

- MP3Tag, MP3Diags, MP3DirectCut, IrfanView
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: [REQ] Keep user's custom Case checker script

Post by Lowlander »

Yes, you could delete it after each update. Instead however you could also just copy you're edited version back to the original CaseChecker and replace the updated replacement again.
tbm72
Posts: 363
Joined: Tue Dec 09, 2008 3:04 pm
Location: UK

Re: [REQ] Keep user's custom Case checker script

Post by tbm72 »

I guess I'll just go back to what I was doing and copy it back after each update then! Thanks for the suggestions though.
Ludek
Posts: 4958
Joined: Fri Mar 09, 2007 9:00 am

Re: [REQ] Keep user's custom Case checker script

Post by Ludek »

OK, I haven't tried, but probably also the dlgCaseChecker would have to be renamed to dlgCaseChecker2 to not be conflicting ?
Post Reply