Retrieve version number

Locked
WaldoMonster
getID3() contributor
Posts: 112
Joined: Mon Apr 01, 2002 12:20 am
Location: Netherlands
Contact:

Retrieve version number

Post by WaldoMonster » Fri Jul 20, 2007 9:51 pm

Is it possible to retrieve the GETID3_VERSION without parsing a file?

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Fri Jul 20, 2007 10:28 pm

The global constant GETID3_VERSION has been made a class constant in 2.x.

You can access it through getid3::VERSION

WaldoMonster
getID3() contributor
Posts: 112
Joined: Mon Apr 01, 2002 12:20 am
Location: Netherlands
Contact:

Post by WaldoMonster » Sat Jul 21, 2007 5:42 am

I'm not so familiar with classes.
I assume that this is correct syntax?

Code: Select all

if (defined('getid3::VERSION')) echo getid3::VERSION;

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Sat Jul 21, 2007 8:59 am

WaldoMonster wrote:I'm not so familiar with classes.
I assume that this is correct syntax?

Code: Select all

if (defined('getid3::VERSION')) echo getid3::VERSION;
Actually I have no idea. I never use the defined() function.

However this should work:

Code: Select all

include "getid3.php";
echo getid3::VERSION;

WaldoMonster
getID3() contributor
Posts: 112
Joined: Mon Apr 01, 2002 12:20 am
Location: Netherlands
Contact:

Post by WaldoMonster » Sat Jul 21, 2007 8:54 pm

Allan thanks for the feedback.

PS
On the main website http://www.getid3.org/ I read that:
v2.0.0-b4 cannot write any tags (yet)
And in the change log from getID3() 2.0.0b4 I read:
Tag writing support: ID3v1
Tag writing support: APEtag
Tag writing support: FLAC
Tag writing support: Ogg Vorbis
Tag writing support: Lyrics3
Isn't it time to update the main site?

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Mon Jul 23, 2007 3:05 pm

WaldoMonster wrote: Isn't it time to update the main site?
It is. We are slow...

Locked