Skip to content

Database: Make it possible to trigger the "Repair Database" action via CLI option and menu item - #16855

Open
cr7pt0gr4ph7 wants to merge 2 commits into
mixxxdj:mainfrom
cr7pt0gr4ph7:rtm_cli_repairdatabase
Open

Database: Make it possible to trigger the "Repair Database" action via CLI option and menu item #16855
cr7pt0gr4ph7 wants to merge 2 commits into
mixxxdj:mainfrom
cr7pt0gr4ph7:rtm_cli_repairdatabase

Conversation

@cr7pt0gr4ph7

Copy link
Copy Markdown
Contributor

I can split this into two separate PRs, but have kept is as one PR for now because updating the comment in trackcollectionmanager would cause a merge conflict anyway.

image image
$ ./mixxx --help

Usage: ./mixxx [options] file
Mixxx is an open source DJ software. For more information, see: https://manual.mixxx.org/2.7/chapters/appendix/commandline_dev_tools.html

Options:
  [...]
  --repair-database                       Run a database cleanup when Mixxx is
                                          launched.
  [...]

@cr7pt0gr4ph7
cr7pt0gr4ph7 force-pushed the rtm_cli_repairdatabase branch from 2ca6550 to b35c626 Compare August 8, 2026 11:23
@cr7pt0gr4ph7
cr7pt0gr4ph7 force-pushed the rtm_cli_repairdatabase branch from b35c626 to ea209de Compare August 8, 2026 14:47
pOptionsMenu->addSeparator();

QString repairDatabaseTitle = tr("Repair Database");
QString repairDatabaseText = tr("Restart Mixxx & repair database inconsistencies");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
QString repairDatabaseText = tr("Restart Mixxx & repair database inconsistencies");
QString repairDatabaseText = tr("Repair database inconsistencies on next launch");

to not imply that Mixxx quits and restarts by itself.
I know this is more clear in the message box in MixxxMainWindow::slotOptionsRepairDatabase(), but with the "Restart .." title I'd hesitate to click this because it sounds like it would restart immediately

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh sorry, it does quit right away.
Guess this is desired behavior, because why feel the urge to cleanup the db and not do it right away..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it should quit right away because that's needed for the DB cleanup. Either you want to repair the database, or you don't. Ideally it would also restart Mixxx, but that would require an external wrapper application AFAICT, and is probably best left to a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants