beetbox / mediafile

elegant audio file tagging
http://mediafile.readthedocs.io/
MIT License
100 stars 26 forks source link

Make file operations atomic #57

Open wisp3rwind opened 3 years ago

wisp3rwind commented 3 years ago

As discussed in https://github.com/beetbox/beets/issues/3849 and https://github.com/beetbox/beets/pull/4060, we would like most/all of beets file operations to be atomic. This requires support by mediafile, which in turn either requires that we shuffle around temporary files, or someone invests the time to implement this in mutagen directly, see https://github.com/quodlibet/mutagen/issues/241. Ideally, on CoW file systems, this should use reflinks.

catap commented 3 years ago

@wisp3rwind this seems like a huge project for mutagen to be honest.

Anyway, usually it edits only end of a file which seems fast enough.

Anyway, embeded arts may easy make things slow :(

wisp3rwind commented 3 years ago

Sure, this might involve a lot of work and will depend on a volunteer to do so. I opened this issue to keep track of the problem, since the previous discussion is mostly in the review comments in https://github.com/beetbox/beets/pull/4060 and as such hard to find.

catap commented 3 years ago

@wisp3rwind meanwhie, I'll try to find any motivation to implement a way with tempfiles also here ;)