ArturSierzant / OMPD

O!MPD is free, opensource MPD client based on PHP and mySQL.
http://ompd.pl
GNU General Public License v3.0
40 stars 13 forks source link

Improve audio file error handling #93

Closed brendan-pike closed 5 years ago

brendan-pike commented 5 years ago

In my collection I've found that if an audio file (flac in my case) is invalid in some way then the reindexing of the entire collection will fail. The debug log is not detailed enough to show me why, but I assume a getID3 probe fails and stalls. Nothing is feed back to the user via the browser which leads to frustration also. When I opened the flac in VLC the track started playing half way through, so it was corrupt in some way.

I suggest some sort of timeout is added and the error flagged to the user so they can example the specific files/album. It would probably be helpful is the user gets a tailed log or the indexing process too, so you can see the progress and know which albums its working through.

ArturSierzant commented 5 years ago

Could you please share corrupted file? This would help me to improve update procedure.

brendan-pike commented 5 years ago

Knew you were going to say that, I've deleted the album now but I'll have a backup somewhere.

brendan-pike commented 5 years ago

Just emailed you regarding the files.

ArturSierzant commented 5 years ago

Thanks, problem lies in getID3 - it crashes with fatal error. I'll try to write a function to handle this problem. But first I have to handle problems with my system - it crashes during update procedure and I don't know why...

ArturSierzant commented 5 years ago

This kind of errors are now handled: appropriate message is displayed on 'Configuration -> Update' page, user has also possibility to reset hung update process. Error message is also added to update_log.txt, file causing problem is listed right above this message.