GetID3 Lite?

The place for "I can't figure out how to..." questions.
Post Reply
Axel
User
Posts: 3
Joined: Tue Jul 03, 2007 12:35 pm
Location: The Lost Coast

GetID3 Lite?

Post by Axel » Tue Jul 03, 2007 12:54 pm

I'm using Lewis Smith's playlist_generator.php file to create a playlist for Fabricio Zuardi's Web Music Player. When I tried uploading what appeared to be the MP3 related only files, I had 2 problems. The playlist was created ok, and the player worked ok, but it didn't get the ID3 information from the MP3's. Then because of the fact that PHP's require_once() command doesn't work with url's, I can't put the GetID3 files into a common folder and link to it from all the albums I set up.

That will force me to put a copy of all the GetID3 files in each band's folder, and that will start to add up if I were to add a lot of albums. Not so much in terms of space used, but in total files. My host used to have a 10,000 file limit. So since I don't need any other formats, I was wondering if there is an MP3 only version? If not can someone tell me how to remove the other format files and still allow the program to work?

Thanks in advance...

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Post by James Heinrich » Wed Jul 04, 2007 1:55 am

It would be preferable to figure out some way of having a commonly-accessible directory and keeping only one copy of getID3 around.

But to your question, you will need:
  • getid3.php
  • getid3.lib.php
  • module.audio.mp3.php
  • module.tag.id3v2.php
  • module.tag.id3v1.php
  • module.tag.apetag.php
  • module.tag.lyrics3.php

The tag modules (id3v2, id3v1, ape, lyrics3) are optional, but of course are required to retrieve those tag elements. Also they will give more accurate playtime and bitrate results if those tags are in the files, as well as avoiding potential false error messages (depending on the encoder used).

Axel
User
Posts: 3
Joined: Tue Jul 03, 2007 12:35 pm
Location: The Lost Coast

Post by Axel » Wed Jul 04, 2007 8:46 am

Believe me, I have tried to figure out a way to only have one set of these files. Many hair pulling hours worth... I have tried everything I can think of to make require_once() work with a directory that is higher up the directory tree than the directory the file it is in is located in, and it just won't do it.

I read somewhere that you can do it this way...

Code: Select all

require_once($_SERVER["DOCUMENT_ROOT"].'/common/getid3/getid3.php');
But of course I couldn't get that to work. Or any other tricks I heard about either. So I have to have a separate copy for each band I set up, because the files have to be at or below the same level. Which I suppose isn't that big of a deal, given the size of most websites these days. My website has 400gb of space, so that isn't the problem. It's that 10,000 file limit that they used to have, but I'm not sure if they still do.

Naturally, every time I call them I have to wait forever to talk to someone who doesn't know much more than the answers to very basic questions, so then I have to wait again while I get transfered to the level 2 tech support. So I decided it was better to just try and keep my number of files as small as possible.

But thank you for telling me which files I needed. That works and reduces the number of files considerably. There were 61 files in the folder, and if I can get by with 7 instead, that is much better. To be able to use 7 period would be even better, but what can you do? To have 7 files per band is far better than 61.

Thanks for that, and for GetID3 as well... It is most excellent.

Axel
User
Posts: 3
Joined: Tue Jul 03, 2007 12:35 pm
Location: The Lost Coast

Post by Axel » Wed Jul 04, 2007 10:13 am

Well, I guess I forgot the #1 rule about dealing with PHP... When you've tried everything and nothing works, go back to the first thing you tried and try it again paying closer attention to what you're doing that time around, and you just might figure it out.

As I said, this didn't work...

Code: Select all

require_once($_SERVER ["DOCUMENT_ROOT"].'/common/getid3/getid3.php');
And I am quite embarased to say it, but I know I will remember it better if I do, this does...

Code: Select all

require_once($_SERVER["DOCUMENT_ROOT"].'/jukebox/common/getid3/getid3.php');
Well, the upside is it works the way I wanted it to now, and thanks to your input, James, there will be even less files than I expected to have with just one set of files, and the miracle of the day is that I might still have some hair left tomorrow! Yeehaw...

Thanks again! Image

Post Reply