Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    16

    Getting the year right with Musicbrainz Picard

    I've recently started using Musicbrainz Picard to clean up my audio tags. Any new music I rip is encode in FLAC and there are tags for Date, Original Release Date and Original Release Year. LMS is using Date when it picks up new music so things like reissues appear to be newer than they actually are.

    Can somebody point me to the place in the code where LMS reads the tags and sets the year in the database? I'd be happy to submit a patch to use Original Release Date or Original Release Year if they are available.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,365

    Getting the year right withMusicbrainz Picard

    > when it picks up new music so things like reissues appear to be newer
    > than they actually are.


    I guess that's more of a point of view than a given fact... Topic for a
    non-technical discussion. I bet if we changed the behaviour many would
    shout out to ask for the current behaviour again.

    > Can somebody point me to the place in the code where LMS reads the tags
    > and sets the year in the database? I'd be happy to submit a patch to use


    Would probably be in Slim::Format::FLAC.

    --

    Michael

  3. #3
    Junior Member
    Join Date
    Mar 2009
    Posts
    16
    Looks like I just need to add a new tagMapping to FLAC.pm:

    Code:
    'ORIGINALYEAR'              => 'YEAR',

  4. #4
    Junior Member
    Join Date
    Mar 2009
    Posts
    16
    Quote Originally Posted by mherger View Post
    > when it picks up new music so things like reissues appear to be newer
    > than they actually are.


    I guess that's more of a point of view than a given fact... Topic for a
    non-technical discussion. I bet if we changed the behaviour many would
    shout out to ask for the current behaviour again.
    So should there be a configuration option? Is this something that can be turned into a plugin?

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,365

    Getting the year right withMusicbrainz Picard

    > So should there be a configuration option? Is this something that can be
    > turned into a plugin?


    I believe technically this could be wrapped in a plugin. But it would be
    a bit of a hack, reaching out far into existing code.

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

    --

    Michael

  6. #6
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    4,501
    The non technical discussion would unboubtedly end up with different people having different interpretations and different requirements.

    The whole question of year of release goes right back to when records were first produced in mass market format.
    My copy of Sgt. Peppers quite clearly says 1967 on it but I know that itĺs actually an early 70s pressing. If I bought a 180g modern day reissue I suspect it still says 1967!

    I always tag CDs with original release date unless itĺs a known dated remastering in which case it appears as Sgt. Peppers (2001 Remaster).
    VB2.4 storage QNAP TS419p (NFS)
    Living Room - Joggler & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  7. #7
    Junior Member
    Join Date
    Mar 2009
    Posts
    16
    Quote Originally Posted by mherger View Post
    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.

  8. #8
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,365

    Getting the year right withMusicbrainz Picard

    > 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.)


    Great find!

    > 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.


    Perfect. Then changing the FLAC module probably is good enough (until
    somebody needs the same for one of the remaining few formats...)

    --

    Michael

  9. #9

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •