python-audio-tools
python-audio-tools copied to clipboard
Ability to abort ripping/recoding
I'm trying to find a way to solve following three events, and has yet to come up with a solution. Sometimes cd2track just freezes and I have to use kill -9
to kill it.
I'm writing a own program for a project, which is an automated ripping to mp3 when CD is inserted into a drive, but I've been able to reproduce the issues using cd2track.
- Ejecting of CD during ripping (using udisk1 for event handling, but hasn't found a way to stop the ripping)
- Disconnect the physical CD drive (external USB portable drive)
- removal of the target directory during ripping
I've pushed out a fix to ensure CD reading doesn't lock up the whole Python interpreter. That way you should be able to perform a ctrl-c to exit in the worst case without having to kill -9 it.
I'll see if I can track down an external USB drive and reproduce the lockups. CD reading is a pretty thin wrapper around libcdio's cdio_read_audio_sectors function so it may be something I need to push upstream if I can locate the problem.