[REQ] Keep user's custom Case checker script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [REQ] Keep user's custom Case checker script

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

by Ludek » Wed Jul 07, 2021 7:43 am

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

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

by tbm72 » Fri Jul 02, 2021 12:15 pm

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.

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

by Lowlander » Fri Jul 02, 2021 10:27 am

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.

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

by Andre_H » Fri Jul 02, 2021 10:14 am

Can you delete the original addon (after every update, i know)?

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

by tbm72 » Fri Jul 02, 2021 8:43 am

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.

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

by tbm72 » Fri Jul 02, 2021 8:16 am

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?

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

by Ludek » 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.

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
        });
    }
}

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

by tbm72 » Fri Jul 02, 2021 6:09 am

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?

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

by Andre_H » 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.

[REQ] Keep user's custom Case checker script

by tbm72 » Fri Jul 02, 2021 3:24 am

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?

Top