Bug 134344

Summary: KAudioCreator should suffix incomplete files with .part
Product: [Unmaintained] kaudiocreator Reporter: Justin Sheckler <self>
Component: generalAssignee: Gerd Fleischer <gerdfleischer>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Justin Sheckler 2006-09-19 18:44:23 UTC
Version:           1.13 (using KDE 3.5.4 "release 62.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.21-0.21-smp

Hi, not sure whether to file this under KAC or Amarok, but here it goes:

I have KAC set up to write files into the same folder that Amarok uses as my collection-- this is very convenient.  However, when ripping MP3's, Amarok ends up with incomplete tag data for the last track of every album.

My guess is that this is due to Amarok receiving an inode notification for a file that isn't fully written yet?  Curiously I've never had this happen with OGG files.

It seems like it would be a good idea to have KAC encode files in a tmp directory, and then move them over once they're entirely finished.  Or, suppress inode notifications on the directory it's currently writing to (if that's even possible.)
Comment 1 Nigel Stewart 2006-09-21 06:00:51 UTC
Sounds like a good idea in principle for the output file to be written in an atomic manner, to avoid this kind of problem.  Is there a way to keep a file invisible to the system until it is completely written?
Comment 2 Justin Sheckler 2006-09-21 06:03:39 UTC
It occurred to me later that it could just be written as something that doesn't end with 'mp3' or 'ogg' (md5_hex, maybe?) and then renamed when complete.
Comment 3 icefox 2006-09-29 20:42:40 UTC
hmm, this is an amarok issue, they need to update themselves when the file is closed
Comment 4 Nigel Stewart 2006-10-02 06:09:16 UTC
I disagree that Amarok should have to do special handling for this situation.  It would be simple enough for KAudioCreator to encode to a temporary file and then move it in one shot to the final destination.

Otherwise it seems a rather fragile assumption that Amarok can detect that a file has changed since the precise time it was previously accessed.    More easily solved upstream in KAudioCreator.
Comment 5 Nigel Stewart 2006-10-14 19:04:48 UTC
Another good reason for KAudioCreator to deal with this problem...

The encoding can fail:
- A bug in the encoder
- A system crash
- A power failure
- Out of disk space

And in that case KAudioCreator is leaving behind a partial track,
the only way to know if it is truncated is for the user to manually
play it, and that's assuming they're familar with the track, and how
it is supposed to end.
Comment 6 Ian Monroe 2006-10-15 02:41:30 UTC
Well this would be a WONTFIX for Amarok, our collection only scans when the directory has been updated so it would require another system to fix.

However its common practice that files should be prefixed with .part while they are incomplete and renamed on completion. Seems sensible that KAudioCreator should do so as well.
Comment 7 Ian Monroe 2006-10-15 02:43:11 UTC
I meant suffix of course. :)
Comment 8 Justin Zobel 2021-03-09 03:51:42 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 9 Christoph Cullmann 2025-06-10 16:05:27 UTC
This project is unfortunately no longer maintained.

If a new maintainer wants to step up and take care, the project is archived here:

https://invent.kde.org/unmaintained/kaudiocreator

You can just clone it in your private namespace on invent.kde.org and if you have started to work on it and fixed/implemented something get it reviewed and the project unarchived.

Sorry for the inconveniences.