Corrupt MP3 files case


I have recently (around two months ago) moved ganjoor.net to a new server and used FileZilla Server to transfer files (I don’t recall on the source or destination machine) and recently found out that some of mp3 file (poem recitations) on the new server are corrupted. I am not 100% sure about the cause of corruption but FileZilla server is the most probable reason.

Fortunately I have backups for these files but I cannot replace the whole files with the backed up ones because people might have uploaded replacements for their old recitations and replacing them with the old files causes other issues.

I maintain an MD5 checksum for MP3 files in the accompanying XML files which contains metadata and synchronization information for the MP3.

So I am going to use the combination of my backup files and the MD5 checksum for the files to resolve this issue.

code for resolving corrupt mp3 files problem