beets
beets copied to clipboard
Fix issue with fetchart modifying cover art files in copy mode
Description
This fixes an issue where fetchart, when the config file was set to move files but the command-line option -c was passed, would remove the cover art files anyway, even though the rest of the music files were left alone. This meant it was changing the on-disk files during a copy.
The solution I coded was simply copying the cover art to a named temporary file when drawing a candidate from the filesystem. I rewrote most of the failing tests but I haven't added any new ones.
To Do
- [X] Documentation. (If you've add a new command-line flag, for example, find the appropriate page under
docs/to describe it.) - [X] Changelog. (Add an entry to
docs/changelog.rstnear the top of the document.) - [-] Tests. (Encouraged but not strictly required.)
I think I see the problem, but at this point I don't quite understand why the temporary file is necessary — could you clarify why that is needed, and it's not enough to simply ensure that src_removed is always set correctly? (Which might require that the art sources return a flag indicating whether to remove the file.)
@wisp3rwind I tried that to begin with but if you look at the code, you can see that any modifications to the file overwrite the original. So for my configuration, I have it set to convert everything to png. But if the source file is a jpeg, then it will be overwritten with the png version. To get the source file to remain untouched, I thought it would be simplest to just shift all of the processing to a temporary file.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.