Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion beets/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ def move(path: bytes, dest: bytes, replace: bool = False):
)
finally:
if tmp_filename:
os.remove(tmp_filename)
try:
os.remove(tmp_filename)
except OSError:
pass
Comment on lines +550 to +553
Copy link
Member

Choose a reason for hiding this comment

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

Use contextlib.suppress here



def link(path: bytes, dest: bytes, replace: bool = False):
Expand Down
6 changes: 5 additions & 1 deletion beetsplug/fetchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,11 @@ def assign_art(self, session: ImportSession, task: ImportTask):
candidate = self.art_candidates.pop(task)
removal_enabled = self._is_source_file_removal_enabled()

self._set_art(task.album, candidate, not removal_enabled)
try:
self._set_art(task.album, candidate, not removal_enabled)
except util.FilesystemError as exc:
self._log.warning("failed to set album art: {}", exc)
return

if removal_enabled:
task.prune(candidate.path)
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Bug fixes
- :doc:`plugins/musicbrainz`: Fix fetching very large releases that have more
than 500 tracks. :bug:`6355`
- :doc:`plugins/badfiles`: Fix number of found errors in log message
- :doc:`plugins/fetchart`: Gracefully handle permissions errors when setting
Copy link
Member

Choose a reason for hiding this comment

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

We've had a release since this PR was submitted - move the note under the Unreleased section, thanks!

album art instead of crashing the import. :bug:`6193`

..
For plugin developers
Expand Down
Loading