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

Check for existing files / Invoke convert's convert_item #42

Closed
RollingStar opened this issue Oct 30, 2019 · 2 comments
Closed

Check for existing files / Invoke convert's convert_item #42

RollingStar opened this issue Oct 30, 2019 · 2 comments
Labels

Comments

@RollingStar
Copy link

Convert.convert_item has destination file checking. Then it invokes encode. This plugin goes straight to convert.encode, skipping the dupe check, meaning existing files are overwritten by a new encode. I found this because I had to kill the convert process to shut my PC off. Resuming it today began from the beginning.

if self.should_transcode(item):

https://github.com/beetbox/beets/blob/1b187fbf5345727e0dfdaea958a714f19e917a4e/beetsplug/convert.py#L295

convert_item has different arguments, so it won't be a drop-in replacement. Or this plugin could implement dupe checking on its own.

@wisp3rwind
Copy link
Collaborator

Are you sure that it actually restarted transcoding from scratch? What will happen after killing beets and running alt update again is the plugin scanning all files again (typically just an mtime comparison).

If I understand correctly what you suggest, then beets-alternatives already does that. A file will only be newly encoded if the ADD action is triggered. That in turn only happens if the file either didn't exist in the alternative collection before, or if the formats configuration changed. In all other cases, only tags and embedded art are updated. The line you quote is not reached in those cases.

@wisp3rwind
Copy link
Collaborator

Closing this, since I suspect there's no bug. In case you feel like beets-alternatives' behavior is indeed violating your expectations, feel free to re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants