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

fetchart: defer file removal config option eval #5244

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

Conversation

mgoltzsche
Copy link
Contributor

@mgoltzsche mgoltzsche commented May 13, 2024

Description

Defer the evaluation of the source file removal options (import.delete and import.move) to the point where the fetchart plugin is actually called instead of only evaluating those configuration options on plugin initialization.
This is to allow other plugins (such as the ytimport plugin) to invoke the import directly (within the same python process; implicitly invoking the fetchart plugin) with temporarily overwritten configuration options.

Addresses #5167 (comment)

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@mgoltzsche mgoltzsche force-pushed the defer-fetchart-delete-src-evaluation branch from cabd8c4 to cef2288 Compare May 13, 2024 23:07
@mgoltzsche mgoltzsche marked this pull request as draft May 13, 2024 23:07
@mgoltzsche mgoltzsche marked this pull request as ready for review May 13, 2024 23:09
@mgoltzsche mgoltzsche marked this pull request as draft May 13, 2024 23:09
@mgoltzsche mgoltzsche force-pushed the defer-fetchart-delete-src-evaluation branch from cef2288 to f1f5e5c Compare May 13, 2024 23:12
Defer the evaluation of the source file removal options (`import.delete` and `import.move`) to the point where the fetchart plugin is actually called instead of only evaluating those configuration options on plugin initialization.
This is to allow other plugins (such as the [ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194) plugin) to invoke the import directly (within the same python process; implicitly invoking the fetchart plugin) with temporarily overwritten configuration options.

Relates to beetbox#5167 (comment)
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.

None yet

1 participant