Page 1 of 1

Full Update.... Error:Can't read image information from:

Posted: Wed Jun 20, 2007 10:06 pm
by charliego
When i'm doing a full update in an existing netjukebox database on some files which are already in the database before i get an error "Can't read image information from: filename". Deleting the database and making a new one gives no problems. I'm using version 4.01.

Posted: Thu Jun 21, 2007 12:59 am
by wbartels
1) Did the update error appear after you have upgraded to netjukebox 4.01?
Or did you created a new installation?

2) What where the values of these configuration settings?
$cfg['image_copy_to_local']
$cfg['image_read_embedded']

3) After you had removed the database and created a new one did the error came back?

4) Can you reproduce the error and set $cfg['debug_message'] = true; in the config.inc.php file.
Witch line produced the error?

5) Can you mail me the image file that produced the error?
email see: http://www.netjukebox.nl/about.php

Thanks for the help,

Willem

Posted: Thu Jun 21, 2007 7:37 am
by charliego
1) New Installation

2) $cfg['image_copy_to_local'] = true;
$cfg['image_read_embedded'] = true;

3) While creating a new database there are no errors, the errors appear only during a full update on an existing database.

4) Can't read image information from:
D:/Mijn Documenten/Mijn Muziek/Andrew Bird/Oh! The Grandeur!/01 - Candy Shop.mp3
--------------------------------------------------------------------------------
file: C:\Program Files\xampp\htdocs\netjukebox\update.php
line: 1002

5) There are no image files in that directory.

When browsing to the album the album-art is not empty. Its showing a cover. Don't know where that came from, maybe i did an image update. But there are no image's in that directory.

Thanks

Posted: Thu Jun 21, 2007 10:38 am
by wbartels
Thanks for the help so far.
I think the problem has to do with the embedded APIC images in music files (01 - Candy Shop.mp3)

Can you do the update again with a new database and set the $cfg['image_read_embedded'] = false; in the config.inc.php file?

It would be very helpful if you can mail me the mp3 file from the error message (01 - Candy Shop.mp3).
Dan it is easier for me to reproduce and fix the problem.

Posted: Thu Jun 21, 2007 11:38 am
by wbartels
Thanks for the mp3 file.
After the first update everything worked as expected and the embedded APIC image is read correctly.
After the second update things got wrong the same way you described, and I haven't tested that :wink:
Here is a quick bug fix:

Replace the code block started at lines 964:

Code: Select all

	{
	// Use current embedded image
	$image = $file[0];
	}
By:

Code: Select all

	{
	// Use current embedded image
	$image 		= $file[0];
	$filesize	= filesize($file[0]);
	$filemtime	= filemtime($file[0]);
	}
Replace line 999:

Code: Select all

if (is_file($image))
By:

Code: Select all

if (is_file($image) && $image != $file[0])
Please let me know if this did the trick?

Posted: Thu Jun 21, 2007 3:00 pm
by charliego
Thanks, it did work :D

Posted: Thu Jun 21, 2007 3:45 pm
by wbartels
I have released netjukebox 4.01b with a bug fix similar to the above code.