I just realized a few moments ago that my XMPlay's playlist only contained less than half of the songs I used to have in playlist (about 900 items, from a total of about 2600), and that the library and everything it contained related to play history and overwritten tags are...gone!
I simply cannot imagine what could have gone wrong.
The only thing that comes to my mind is related to a system crash I had yesterday. Looking at what was left of the original playlist file, I noticed that the last entry had no title
...it just had the path
, which tells me that this corruption occurred while XMPlay was saving the file (I set it to auto-save the playlist at 10 minutes).
Now...if the process of auto-saving the playlist is like this:
- delete current xmplay.pls
- write xmplay.pls
- write xmplay.library
- overwriting directly the files (without deleting them first) is exactly the same thing, as the system automatically truncates the file's content to 0 when opening a file for writing.
then I have to say: this is the wrong way to do it. Because it might lead to corruption in case of xmplay/system failure during the auto-save process, and the loss of over 2 years of library management (which I was kinda proud of
The correct way to do it is:
- save the xmplay.pls
files with temporary names
- copy both files, replacing the original ones
- after the copy process is done, remove the temporary files
It's not complicated at all, it doesn't consume resources (the only difference is copying the files and deleting them, which takes a very short time, considering it's 2 files of a few hundred KB). And if anything goes wrong at any of the steps, then at least one set of files will be left intact, and the user can recover them, so this method minimizes a lot
the risk of data corruption or data loss during playlist/library saving.
So please, Ian, can you make these changes in XMPlay? There's no way to recover what I lost at this point, so I have to deal with it. But just to be sure that nor me, nor other users, get in the same situation, please make these changes in XMPlay (you can also apply them for normal playlist/library saving, since the same problems can occur then). Thanks.