mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 03:22:39 +01:00
This reflects the `try_write` approach will handles write failures elegantly, by logging the error and continuing. We do the same with `move`, `art_set` and `move_art`. We also handle exceptions on `before_item_moved` and `art_set` plugins hooks, the latter of which is moved *before* the file operations to remain consistent with other hook configurations. That might be a mistake and API-breaking change, another approach would be to have a new `before_art_set` hook instead. We also introduce a new hook (`move_art`) for those operations as well. The point of this patch is to make it possible for plugins to send a signal (through the already FileOperationError exception) to callers that it should skip a specific item or artwork. This is essential to allow beets to better integrate with other utilities like bittorrent clients which may rewrite those files. The rationale here is that some music collections will have *parts* of them managed by such clients in which case we should be careful not to overwrite or move those files. Operations like copy or hardlink are not handled by this, for that reason. We may also want to do proper error handling for those as well, that said, but that seems out of scope for this specific issue (#2617). |
||
|---|---|---|
| .. | ||
| autotag | ||
| dbcore | ||
| ui | ||
| util | ||
| __init__.py | ||
| __main__.py | ||
| art.py | ||
| config_default.yaml | ||
| importer.py | ||
| library.py | ||
| logging.py | ||
| mediafile.py | ||
| plugins.py | ||
| random.py | ||
| vfs.py | ||