- Moderator
- #1
When using the "File Menu" in My Music to delete a file out of a share and the file name contains a single quote, it gets not deleted from the Music Database.
Had a quick look at the code and found the problem in DeleteSong of Music\Database.cs.
When a song gets added the CRC is built on the file name.
DeleteSong uses this CRC for the search in the database.
The following statement
is translating single quotes in file names to double quotes.
....\Who's that girl.mp3 becomes
....\Who"s that girl.mp3
and then the CRC is built with the translated name.
The problem is that in AddSong the CRC is built on the filename with the single quote.
So the row to be deleted is never found as the CRC is different.
Solution is to move:
in DeleteSong just a few lines down after the
tried this on my system and it worked very well.
Could anyone of the devs apply the changes?
thx,
Helmut
Had a quick look at the code and found the problem in DeleteSong of Music\Database.cs.
When a song gets added the CRC is built on the file name.
DeleteSong uses this CRC for the search in the database.
The following statement
Code:
DatabaseUtility.RemoveInvalidChars(ref strFileName);
is translating single quotes in file names to double quotes.
....\Who's that girl.mp3 becomes
....\Who"s that girl.mp3
and then the CRC is built with the translated name.
The problem is that in AddSong the CRC is built on the filename with the single quote.
So the row to be deleted is never found as the CRC is different.
Solution is to move:
Code:
DatabaseUtility.RemoveInvalidChars(ref strFileName);
Code:
ulong dwCRC = crc.calc(strFileName);
tried this on my system and it worked very well.
Could anyone of the devs apply the changes?
thx,
Helmut