Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Feb 2009
    Location
    Cambridge, UK
    Posts
    394

    embedded quotes truncated in FLAC+CUE tag

    hi all, would appreciate any comments, please.

    I use XLD on MacOS to rip to single FLAC + CUE.

    This setup means that XLD writes per-track tags only to the CUE file, as text, not also in the flac file's Vorbis comment block.

    XLD sometimes writes tags containing embedded quotes, presumably when the source DB's tags have them, but without any escapting, e.g:

    TITLE "Twelve duos for 2 Horns in C major, K. 496a/487 "Kegelduette": XI. Minuetto"

    It seems that LMS truncates these entries at the first embedded quote, taking that to be the end of the string (not unreasonably, perhaps), rather than reading to the end of the line. That results in an LMS tag of:

    Twelve duos for 2 Horns in C major, K. 496a/487

    dropping the remainder "Kegelduette": XI. Minuetto"


    I appreciate that FLAC+CUE is not a favourite method, but is there any way I can get LMS to preserve the quotes, i.e. strip of leading and trailing quote and use everything that's left?

    Or do I need to manually change all these entries in my CUE files? It's a hundred or so entries, so I'm putting off some scripting to see if it can be done.

    Alternatively, can LMS cope with embedded quotes in CUE tags, if they are escaped?

    thanks very much

  2. #2
    Senior Member
    Join Date
    Feb 2009
    Location
    Cambridge, UK
    Posts
    394
    Quote Originally Posted by cdmackay View Post
    Alternatively, can LMS cope with embedded quotes in CUE tags, if they are escaped?
    meant to add: I tried escaping the quotes:

    TITLE "blah "bzz""

    with the inner quotes escaped with \ (which I can't show above), but that merely produced:

    blah \

    as the tag. So quotes can't be escaped with \, at least.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    15
    Yes, it works (at least on 7.9.2)

  4. #4
    Senior Member
    Join Date
    Feb 2009
    Location
    Cambridge, UK
    Posts
    394
    Quote Originally Posted by sok View Post
    Yes, it works (at least on 7.9.2)
    thanks for the reply. How do you mean, "it works"? I am running 7.9.2…

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,122
    I think that this routine in CUE.pm could be changed to remove the final quote and possible any spaces after it instead of removing everything from the 2nd quote

    Perhaps from ...
    Code:
    sub _removeQuotes {
    	my $line	= shift;
    
    	$line =~ s/^\"(.*?)\".*/$1/i;
    	return $line;
    }
    to ...
    Code:
    sub _removeQuotes {
    	my $line	= shift;
    
    	$line =~ s/^\"(.*?)\"( )*$/$1/i;
    	return $line;
    }
    Although there is probably a better way to handle optional trailing whitespace.
    I have no idea if letting embedded quotation marks into the database will mess up something else though.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  6. #6
    Junior Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    15
    Quote Originally Posted by cdmackay View Post
    thanks for the reply. How do you mean, "it works"? I am running 7.9.2Â…
    Sorry, I meant that quotes within FLAC tags do work, but that was not your question. Nevertheless it could be part of the solution.

    I have CDs ripped as one flac file with embedded cue sheets. If I remember correctly, metaflac does simply add the start und end information of the tracks to the flac file but no further information the cue sheet file might contain. That's when I stumbled over http://flactag.sourceforge.net/ It tags the flac files via the Musicbrainz database. That's so much better than editing the cue files yourself or to use cue sheet databases on the internet.

    I do not know if there is a MAC OS X Client available but it's packaged with Debian and works like a charm. You will find several posts in this forum on it.

  7. #7
    Senior Member
    Join Date
    Feb 2009
    Location
    Cambridge, UK
    Posts
    394
    Quote Originally Posted by sok View Post
    Sorry, I meant that quotes within FLAC tags do work, but that was not your question. Nevertheless it could be part of the solution.

    I have CDs ripped as one flac file with embedded cue sheets. If I remember correctly, metaflac does simply add the start und end information of the tracks to the flac file but no further information the cue sheet file might contain. That's when I stumbled over http://flactag.sourceforge.net/ It tags the flac files via the Musicbrainz database. That's so much better than editing the cue files yourself or to use cue sheet databases on the internet.

    I do not know if there is a MAC OS X Client available but it's packaged with Debian and works like a charm. You will find several posts in this forum on it.
    thanks! and to Paul…

    yes, i've often wondered whether my use of Cue files is hampering things that would otherwise work better. I just find it easier to do manual adjustments to a cue file, with a text editor, than faff about with some faoncy app (or even cmdline metaflac) to edit the Vorbis comment section.

    I use XLD to create the flac+cue, and it uses MusicBrainz to write the tags, so it ought to be OK, but, as noted, it results in embedded quotes, which LMS clearly doesn't like.

    If that's bad, I can raise a bug with XLD, but the response might be that LMS is at fault, of course.

    thanks again for the comments, and the cue parser code suggestions.

  8. #8
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    1,122
    I use .cue files as well but for a different reason.
    For me it is to break up multi-hour radio show into tracks and links (mp3 source).
    It does have a problem with the player sometimes showing one track behind what is playing - which I think might be related to using it along with DSTM but I haven't researched it yet.

    If you are not running on Windows then you should be able to find that Perl module and make the change and restart LMS.
    I think it will work for you.
    If it does - then I could submit a PR to official LMS to try to get it (or something like it) included in official code.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  9. #9
    Senior Member
    Join Date
    Feb 2009
    Location
    Cambridge, UK
    Posts
    394
    Quote Originally Posted by Paul Webster View Post
    I use .cue files as well but for a different reason.
    For me it is to break up multi-hour radio show into tracks and links (mp3 source).
    It does have a problem with the player sometimes showing one track behind what is playing - which I think might be related to using it along with DSTM but I haven't researched it yet.

    If you are not running on Windows then you should be able to find that Perl module and make the change and restart LMS.
    I think it will work for you.
    If it does - then I could submit a PR to official LMS to try to get it (or something like it) included in official code.
    Thanks again Paul.

    Yes, I also use CUE files to split up multi-album CD bargain boxes, esp where the orig albums separate on a non-CD boundary. I've never seen a problem with the track showing wrong.

    I'll give that CUE.pm change a test; I'm running LMS on Debian, and if it works, we can ask Michael nicely . The concern will be what it might break, perhaps…

Posting Permissions

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