-
Notifications
You must be signed in to change notification settings - Fork 29
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
Delete files from target that vanished on source #49
Comments
I'd be reluctant to add that sort of feature - I'm not keen on deleting stuff that the tool is not managing. |
@robinbowes how do you mean "stuff that the tool is not managing"? my understanding of the concept of flac2mp3 is that the target directory is in the "possession" of flac2mp3, so flac2mp3 can delete files there without having to worry about them. how do you handle otherwise e.g. when you rename (or move, or delete) a file in the source folder? you delete it manually in the target dir? |
Yes, that is indeed the operating model. It still makes me nervous deleting things. |
it could just be an additional option to delete data on the target, like it is with the copyfiles? |
Robin's script doesn't handle file renames, it will result in multiple files in the destination directory. And deleted files in the source dir will not have an effect on the destination dir. I have a fork of flac2mp3 where exactly this, and many other issues are addressed. I recommend giving it a try: https://github.com/carlasplund/flac2mp3/tree/develop (i.e. the develop branch). |
@carlasplund cool, thanks for the info. i looked at some of the forks but didn't find yours with the delete option. maybe @robinbowes wants to take a look at yours commits (especially carlasplund@3d0758d ) and mrege some of them? :-) |
works like a charm. i had to change the --preset option as this is not supported (yet) in your version :-) |
I really need to give this code some love - it's been too long :) |
this one from @carlasplund would be really nice to have it in your master :-) |
Figured this isn't a bad place to share the init script I made for the Docker container, since most of it is exactly what everyone above is talking about above. Not the cleanest script, since I'm not a coder and basically cobbled it together from various sources but it works. On my Syno 918+, takes about 5 minutes for 9000 files. Works on a very bare Alpine linux distro so it should work everywhere.
|
I thought that when files in the source directory are being deleted, they will be deleted on the target too?
e.g. delete a FLAC file -> it should remove the correpsonding MP3
delete any other file in source, while copyfiles is used, it should be removed in the target dir.
Or perhaps I haven't used flac2mp3 for too long and thought this feature was there. So this is a feature request then ;-)
The text was updated successfully, but these errors were encountered: