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

Update media failure #40

Closed brendan-pike closed 7 years ago

brendan-pike commented 7 years ago

I did a fresh install from git O!MPD 1.02 PHP Version 7.0.15-0ubuntu0.16.04.2 mysql Ver 14.14 Distrib 5.7.17 Server version: Apache/2.4.18 (Ubuntu) and when I added my albums it got to 45% and has stalled. I don't seem to have any way of stopping it, restarting it, etc. The only error I could find is in apache which was: [Mon Feb 27 22:10:43.291640 2017] [:error] [pid 6085] [client 192.168.1.101:32974] PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/OMPD/include/library.inc.php on line 1373 Not sure its related though. Let me know how to better debug this and I'll do my best to help.

Thanks

ArturSierzant commented 7 years ago

Hi, please turn on debug mode: edit /include/config.inc.php: find $cfg['debug'] and change its value to true. More details you'll find here Please let me know if you figured it out.

nonplusnl commented 7 years ago

Dear Artur, Also with fresh install from git yesterday, update stalls at 80%. I enabled debugging, but the logfile just stops at the last succesful addition. So no help there. Also, Apache error log shows similar error to one mentioned by brendan-pike above, but it was 10 minutes before update started, so not sure if it is related.

ArturSierzant commented 7 years ago

Could you please share last several lines from debug log?

nonplusnl commented 7 years ago

Mhh.. disabling directory logged last solves the problem. So I still have to figure out what's wrong the files, but I won't bother you with that. Thanks!

ArturSierzant commented 7 years ago

Could you please share this problematic files (with removed music in a music editor - only files with tags)? I'd try to find out, what the problem is and maybe write a patch to handle it.

nonplusnl commented 7 years ago

Problem solved. Turned out to be cover image files. One case was a PNG that was names JPG, other was BMP named JPG. Correcting their extension solved the issue.

ArturSierzant commented 7 years ago

This problem is solved in 617c6e5 - before image is imported, update procedure checks what type image really is.