mherger wrote: 
> 
> And don't forget that you'd have to do the same for all kinds of file 
> formats supporting various date tags.
> 

The MP3 format module already does this and makes assumptions about
which date is preferred. (Though, and my perl may be rusty, I think the
comment is incorrect.)


Code:
--------------------
        
  # prefer release date over recording time etc.
  if (!$tags->{YEAR}) {
        my $year;
        foreach ( qw(TDOR XDOR TDRC TYER TDAT) ) {
                $year ||= $tags->{$_};
                delete $tags->{$_};
        }
        $tags->{YEAR} ||= $year if $year;
  }
  
--------------------


To me, this says checking TDOR, XDOR, TDRC, TYER and TDAT in this order,
use whichever has a value first as the year.

What I found online for each tag is:

> 
> TDOR
> The 'Original release time' frame contains a timestamp describing when
> the original recording of the audio was released. Timestamp format is
> described in the ID3v2 structure document [ID3v2-strct].
> 
> XDOR
> A MusicBrainz extension for the full original release date, since TORY
> only contains the year of original release. In ID3 v2.4 this frame
> became TDOR.
> 
> TDRC
> The 'Recording time' frame contains a timestamp describing when the
> audio was recorded. Timestamp format is described in the ID3v2 structure
> document [ID3v2-strct].
> 
> TYER
> The 'Year' frame is a numeric string with a year of the recording. This
> frames is always four characters long (until the year 10000).
> 
> TDAT
> The 'Date' frame is a numeric string in the DDMM format containing the
> date for the recording. This field is always four characters long.
> 

So, if my understanding of the code is correct than, if present, the
first thing used for the year would be "'Original release time' ... a
timestamp describing when the original recording of the audio was
released" which is what I would like used for FLAC, Original Release
Date or Original Release Year.


------------------------------------------------------------------------
jbodnar's Profile: http://forums.slimdevices.com/member.php?userid=28907
View this thread: http://forums.slimdevices.com/showthread.php?t=111520

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to