Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller script loader always uses local copy #8339

Closed
mixxxbot opened this issue Aug 22, 2022 · 8 comments
Closed

Controller script loader always uses local copy #8339

mixxxbot opened this issue Aug 22, 2022 · 8 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: Pegasus-RPG
Date: 2015-11-26T02:46:21Z
Status: Fix Released
Importance: High
Launchpad Issue: lp1520047
Tags: controllers, midi, scripting


As I update controller scrips, I'm editing the file in /res/controllers and running Mixxx with --resourcePath res/

I repeatedly tell it to reload the preset (choosing the second of the same name in the list because I know the first is my local copy) and the XML is updated correctly, but if a copy of the JS file is in my ~/.mixxx directory, it uses that regardless. I have to manually delete that copy in order for it to try using the copy in res/.

This is serious because it will cause all kinds of problems when users try to load updated presets after upgrading.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T22:58:20Z


if we already do the right thing with respect to XML, then we should definitely fix this for js.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T23:11:46Z


which preset? There is code that is supposed to do the right thing in dlgprefcontroller.cpp:380.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T23:14:54Z


reproduced, working on this now

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T23:25:53Z


So the problem is that when the user picks an item from the preset menu, the listitem contains the full path of the preset to import -- either the user's preset, or the system preset. But the scripts are loaded dynamically, and it looks first in the user's dir, and if it finds the script, it's done.

To fix this, we have to know which preset they are loading and load the script from the same path.

Should we put up a warning box when presets are loaded, indicating that users might lose customization?

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T23:30:28Z


oh, hah, we increment the filename, no need to warn the user

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2015-11-26T23:37:35Z


e47ff90

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2015-11-27T05:25:26Z


Sweet, thanks for the quick fix!

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 2.0.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant