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

CmdlineArgs: Add --rescan-library for rescanning on startup #13661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Sep 18, 2024

This adds a small convenience flag for rescanning the library on startup without changing the settings.

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, though I'm interested why you think this is useful as a CLI option (as opposed to the menu button or the keyboard shortcut or the config option) in the first place.

@fwcd
Copy link
Member Author

fwcd commented Sep 18, 2024

I'm looking into making my track import workflow more scriptable and rescanning the library is one step towards that.

My plan is to add an option for analyzing new tracks on startup in a future PR too, but since that will likely be more complicated both from an implementation perspective and perhaps more discussion-worthy, I've split out this PR (which was fortunately pretty trivial to implement since we already have the setting).

@Swiftb0y
Copy link
Member

so you conditionally (depending on whether mixxx got called from your script or yourself) want to rescan the library?

Would it make more sense to have an overwrite for the config file so its not limited to this one setting?

@fwcd
Copy link
Member Author

fwcd commented Sep 18, 2024

so you conditionally (depending on whether mixxx got called from your script or yourself) want to rescan the library?

Yes, exactly

Would it make more sense to have an overwrite for the config file so its not limited to this one setting?

That's an interesting idea, hadn't thought of that. Feels a bit more convoluted from a usage perspective, but would definitely be more general and I guess for scripts the reduced discoverability would be fine. Haven't looked deeply enough into the config mechanism to find out how complicated that would be to do.

@Swiftb0y
Copy link
Member

probably not terribly as long as you don't need it it to do at runtime. The clang-tools have an option to overwrite the config as well as specific parts of the config (for example in clang-tidy via --checks), but thats probably not complexity worth delving in.

@fwcd
Copy link
Member Author

fwcd commented Sep 18, 2024

I've had a quick look at ConfigObject. If we want to support overrides there, we'd probably have to store overrides in a separate map, to avoid accidentally committing the overrides to the main config. There are probably some pitfalls with this, like e.g. how we handle the corresponding checkboxes etc. in the UI. Should they display the overridden values? Is it unexpected if they still change the underlying value in that case (and don't do anything until Mixxx is relaunched without the override)? Maybe the cleanest solution would be to disable them if overridden, but that would likely require a large number of changes across the UI.

I feel like there's a fair bit of complexity involved to make this "non-surprising" and am wondering whether it's worth the effort. Any thoughts?

@Swiftb0y
Copy link
Member

I feel like there's a fair bit of complexity involved to make this "non-surprising" and am wondering whether it's worth the effort. Any thoughts?

Yeah, lets avoid that for now. We can re-evaluate once we introduce more flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants