GetID3 lib default path is wrong

ARDAS - February 16, 2008 - 23:08
Project:getID3()
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (code needs review)
Description

Greetings,

By default getid3 path is built from module path and one more '/getid3' folder.

function getid3_get_path() {
  return variable_get('getid3_path', drupal_get_path('module', 'getid3') .'/getid3');
}

When visiting settings page after enabling module it says getid3 lib is not found and the path is 'modules/getid3/getid3' which is correct.

Here is the reason - you are adding one more superfluous folder '/getid3/getid3.php':

function _getid3_admin_settings_check_path($form_element) {
  $path = $form_element['#value'];
  if (!is_dir($path) || !file_exists($path .'/getid3/getid3.php')) {
  ......

You probably have to change it to:

  ......
  if (!is_dir($path) || !file_exists($path .'/getid3.php')) {
  ......

#1

Rob Loach - February 17, 2008 - 09:47
Version:5.x-1.1» 5.x-1.x-dev
Status:active» patch (code needs review)

Does this do it?

AttachmentSize
getid3.patch1.18 KB

#2

guardian - February 26, 2008 - 16:38

not sure the patch works
i get no more error message, however i get this: Version GETID3_VERSION found.

#3

asb - April 17, 2008 - 01:25

Hi Rob,

same here; the patch applies cleanly, admin/settings/getid3 reports "Version GETID3_VERSION found" when saving the setting. The former error message ("The getID3 PHP library could not be found in modules/getid3/getid3") is gone, but the getid3 library still seems not to be found, at least according to the warning when a mediafield node is bing saved ("getid3 library not found!").

Greetings, -asb

#4

Rob Loach - May 7, 2008 - 18:13
Title:getid3 lib default path is wrong» GetID3 lib default path is wrong
Status:patch (code needs review)» patch (code needs work)

#5

drew reece - June 23, 2008 - 01:01

Bump,

Having the same trouble with the 5.x-1.1 version

Also seems to be a related issue here?
http://drupal.org/node/265969

Drew

#6

xjm - July 25, 2008 - 15:29
Status:patch (code needs work)» patch (code needs review)

The issue with mediafield not finding getid3 at a given path is an issue with mediafield, not with this module. Mediafield has a static requirement for the path and does not depend on or utilize this module. I'd submit that to the mediafield people.

Testing patch.

#7

xjm - July 25, 2008 - 15:48

I applied the patch and set my custom path to misc/lib/getid3/ (which is the location required by mediafield). This resolved the issue for me. I'd recommend those trying to use both mediafield and modules that depend on this one try that and re-test the patch.

To use both mediafield and modules that depend on this one:

  1. Apply the patch: http://drupal.org/files/issues/getid3.patch.
  2. Put the whole getid3 library in drupalroot/misc/lib/getid3/ (there will be misc/lib/getid3/getid3 inside this directory among other things; don't let that confuse you).
  3. At admin/settings/getid3, set the path to misc/lib/getid3/ and save.

#8

xjm - July 25, 2008 - 16:03

Whoops, sorry for changing your status; didn't realize you were the maintainer.

I do think the patch is OK, though. :P The only concern might be that the constant GETID3_VERSION wasn't interpreted properly for asb. It does work alright for me; I get Version 1.7.7 found.

 
 

Drupal is a registered trademark of Dries Buytaert.