Skip to content

Update only deletions? #5461

Answered by jackwilsdon
Juddium asked this question in Q&A
Oct 14, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Update doesn't support only matching deletions at the moment, but it might be nice to have a --only-delete flag to avoid making any other changes. It should be easy to add - just skipping the rest of this loop if the flag is set:

beets/beets/ui/commands.py

Lines 1650 to 1704 in 65d78cb

for item in items:
# Item deleted?
if not item.path or not os.path.exists(syspath(item.path)):
ui.print_(format(item))
ui.print_(ui.colorize("text_error", " deleted"))
if not pretend:
item.remove(True)
affected_albums.add(item.album_id)
continue
# Did the item change since last checked?
if item.current_mtime() <= item.mtime:
log.debug(

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Juddium
Comment options

@jackwilsdon
Comment options

Answer selected by Juddium
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants