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

4326 scrub should not restore on import if "write" is disabled #4900

Merged
merged 5 commits into from
Sep 16, 2023

Conversation

fracai
Copy link
Contributor

@fracai fracai commented Sep 11, 2023

Description

Fixes #4326.

scrub.py:import_task_files now passes ui.should_write() to _scrub_item to control restoring tags.
I also added a few tests to test_importer.py.

To Do

  • Documentation. (fixes discrepancy between documentation and behavior)
  • Changelog.
  • Tests.

@fracai
Copy link
Contributor Author

fracai commented Sep 11, 2023

just realized that the tests are checking the database tags, not the file tags. I'll have to fix those later today

@fracai
Copy link
Contributor Author

fracai commented Sep 11, 2023

just realized that the tests are checking the database tags, not the file tags. I'll have to fix those later today

and those should now be working properly

@sampsyo
Copy link
Member

sampsyo commented Sep 12, 2023

This overall looks like it's on the right track, but FWIW it looks like some tests are still failing.

@fracai
Copy link
Contributor Author

fracai commented Sep 13, 2023

This overall looks like it's on the right track, but FWIW it looks like some tests are still failing.

Turns out if you call load_plugins(…) in test setup you also need to call unload_plugins() in test teardown. Who knew?

@sampsyo
Copy link
Member

sampsyo commented Sep 16, 2023

Awesome; this is just great!! Thanks for the tidy work here.

@sampsyo sampsyo merged commit c15ccb1 into beetbox:master Sep 16, 2023
14 checks passed
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.

scrub: The auto option should be a no-op when import.write is disabled
2 participants