track index in dsf files

Think you found a bug in getID3()? Post here with details.
Post Reply
lyapounov
User
Posts: 7
Joined: Sat Sep 17, 2016 4:02 am
Are you a spambot?: no

track index in dsf files

Post by lyapounov » Sat Sep 17, 2016 4:08 am

Hello

this is my first post here, so hope to be in the right place

First of all bravo for this huge extraordinary piece of software.

Now that I can rip my sacd, I have notices something regarding dsf files, after the CopyTagsToComments

the track number in dsf file is in ['comments_html']['track_number'] while on a flac file it is ['comments_html']['tracknumber']

Is it a bug or on purpose ?

I am using the very last version getID3-master (the 1.9.12 does not recognize dsf)

Many thanks

Best regards

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

Re: track index in dsf files

Post by James Heinrich » Sat Sep 17, 2016 6:52 pm

Not intentional, although not quite sure I'd call it a bug either.
Various file formats and tagging schemes have different names for equivalent fields.

However, in the interest of making life easy for the user, it makes sense to attempt to standardize the output, so the output from CopyTagsToComments() should now be standardized to "track_number" in all formats:
https://github.com/JamesHeinrich/getID3 ... 185ff97d12

lyapounov
User
Posts: 7
Joined: Sat Sep 17, 2016 4:02 am
Are you a spambot?: no

Re: track index in dsf files

Post by lyapounov » Tue Sep 20, 2016 10:00 am

Thank you very much !

In the same order, the discnumber is called 'discnumber' in flac files, and 'part_of_a_set' in dsf files ;-))

My code is now this :
$tg = array (
'album' => $ttra['album'][0],
'traname' => htmlspecialchars_decode($ttra['title'][0]),
'tranumber' => isset($ttra['tracknumber'][0]) ? $ttra['tracknumber'][0] : $ttra['track_number'][0],
'numcd' => isset($ttra['discnumber'][0]) ? $ttra['discnumber'][0] : $ttra['part_of_a_set'][0],
'encoding' => $thisTrack['encoding']
);

But again, what a brilliant job !

One question if I may : I have 66000 files, only in flac or dsf, and I notice that the time to analyze hugely vary from one file to the other, between 1/10 sec to 2-3 seconds, one album being around 10 second per file.

What does make such a big difference ?

Best

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

Re: track index in dsf files

Post by James Heinrich » Tue Sep 20, 2016 1:23 pm

The file format and parseable metadata will have a big impact on the speed of parsing a file. The more tags and metadata content the longer it takes, naturally. Depending on the speed of the system 0.1s-0.5s is probably typical to parse most files, 10 seconds per file seems abnormally long. You may want to check that no errors or warnings are being generated when parsing those files (sometimes getID3 can work around some known errors at the expense of additional parsing time).

Post Reply