Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    7,818
    Quote Originally Posted by mherger View Post
    > Hmm I see in the comments for the pull request that Michael wasn't
    > totally convinced of the logic behind it and said it would be easy to
    > revoke if it caused issues. It has caused issues.


    Please define "issues", and some number to allow for the plural :-).

    If the issue is a change in behaviour which per-se is correct, but some
    don't like because it means work for them, and if it took half a year
    for a person or two to eventually hit that issue, then I'd consider it a
    non-issue. But that's just my opinion.
    It seems to solve an issue for one person which nobody had complained about previously. The originator doesn't say how many of his albums were affected but only one is mentioned. If it took more than twenty years for the original issue to be noticed maybe that was a non-issue .

    Sent from my Pixel 3a using Tapatalk

  2. #12
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,529
    Quote Originally Posted by mherger View Post
    > Hmm I see in the comments for the pull request that Michael wasn't
    > totally convinced of the logic behind it and said it would be easy to
    > revoke if it caused issues. It has caused issues.


    Please define "issues", and some number to allow for the plural :-).

    If the issue is a change in behaviour which per-se is correct, but some
    don't like because it means work for them, and if it took half a year
    for a person or two to eventually hit that issue, then I'd consider it a
    non-issue. But that's just my opinion.
    Your opinion carries infinitely more weight than mine, of course. And everything you say is true. If I truly am the only one affected by this, then you're right to consider this a "won't fix" complaint.

    There have been several changes to the lms code over the years that have fixed/broken behavior that I rely on to keep my library in order. This one will just join the other mods I apply to my local git clone as I run my own fork of lms.

    fixcue.sh
    Code:
    #!/bin/bash
    
    
    lms_cust_cue(){
    
    	CUEFIX='/usr/local/share/lms/server/Slim/Formats/Playlists/CUE.pm'
    
    	CURDIR="$(pwd)"
    	FIXDIR="$(dirname "$CUEFIX")"
    
    	cd "$FIXDIR"
    
    	if [ "$(pwd)" != "$FIXDIR" ]; then
    		echo "Error: could not access ${FIXDIR}"
    		return 1
    	fi
    
    	if [ ! -e "${CUEFIX}.org" ]; then
    		cp -p "$CUEFIX" "${CUEFIX}.org"
    	fi
    
    	# Do we need to patch?
    	if [ $(grep -c "if (defined(\$cuesheet->{'ALBUMARTIST'}) && \$cuesheet->{'ALBUMARTIST'} ne \$performer) {" "$CUEFIX") -gt 0 ]; then
    		echo "${CUEFIX} already patched.."
    		return 0
    	fi
    
    	echo "Patching ${CUEFIX}"
    	# diff -rupN -ZbwB "$CUEFIX" "${CUEFIX}.mine"
    
    patch -p0 --verbose --ignore-whitespace << 'CUE_EOP'
    --- CUE.pm      2021-09-24 09:31:31.317230236 -0600
    +++ CUE.pm      2021-09-24 10:11:05.000000000 -0600
    @@ -414,6 +414,16 @@ sub parse {
                            $track->{'ARTIST'}      = $performer;
                            $track->{'TRACKARTIST'} = $performer;
    
    +            # Automatically flag a compilation album
    +            # since we are setting the artist.
    +
    +            if (defined($cuesheet->{'ALBUMARTIST'}) && $cuesheet->{'ALBUMARTIST'} ne $performer) {
    +                    $cuesheet->{'COMPILATION'} = '1';
    +                    # Deleted the condition on 'defined', it could be defined
    +                    # but equal NO, N, 0,... or what else.
    +                    # we want it to be = 1 in this case.
    +            }
    +
                    }
    
                    # Songwriter is the standard command for composer
    CUE_EOP
    
    
    	# Are we patched?
    	if [ $(grep -c "if (defined(\$cuesheet->{'ALBUMARTIST'}) && \$cuesheet->{'ALBUMARTIST'} ne \$performer) {" "$CUEFIX") -gt 0 ]; then
    		echo "${CUEFIX} patch successful!"
    	else
    		echo "${CUEFIX} NOT patched successfully!"
    		return 1
    	fi
    
    }
    
    
    lms_cust_cue
    Last edited by gharris999; 2021-09-24 at 12:21.

  3. #13
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,529
    Quote Originally Posted by philchillbill View Post
    Not commenting on the sanity/desirability of the requirement to do so, but if you need to add a single line of text to hundreds of files then a 3-line script in e.g bash/Perl/Python will do it in a jiffy. No need to do it by hand.
    Not quite. All the cuesheets are embedded in the flacs. The script would have to extract all the cuesheets from 6,670 flac files via metaflac, presumably -- and that would involve extracting ALL the VORBIS_COMMENT tags, and then determining which VORBIS_COMMENT is the embedded cuesheet, then scanning those extracted cuesheets for album PERFORMER tags != to track PERFORMER tags, adding the REM COMPILATION 1 line to the extracted cuesheets, and finally re-embedding the cuesheets.

    Yes, doable in a script, but not as trivial as you suggest.

  4. #14
    Senior Member philchillbill's Avatar
    Join Date
    Jan 2019
    Location
    The Netherlands
    Posts
    821
    Quote Originally Posted by gharris999 View Post
    Not quite. All the cuesheets are embedded in the flacs. The script would have to extract all the cuesheets from 6,670 flac files via metaflac, presumably -- and that would involve extracting ALL the VORBIS_COMMENT tags, and then determining which VORBIS_COMMENT is the embedded cuesheet, then scanning those extracted cuesheets for album PERFORMER tags != to track PERFORMER tags, adding the REM COMPILATION 1 line to the extracted cuesheets, and finally re-embedding the cuesheets.

    Yes, doable in a script, but not as trivial as you suggest.
    Aha, indeed more complex. What's the advantage of embedding a cue-sheet in a flac rather than just regular tags?

  5. #15
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,529
    Quote Originally Posted by philchillbill View Post
    Aha, indeed more complex. What's the advantage of embedding a cue-sheet in a flac rather than just regular tags?
    This is an increasingly less popular format: whole CDs ripped to a single flac with all the metadata (track list cuesheet, album art, liner notes & etc.) embedded in the flac file as vorbis comments. So the advantage is: 1 CD == 1 file.

    In the early slimdevices / squeeze center days, there were influential users who were strong advocates for the format and LMS's audio scan has supported the format from early on. Support for the format probably peaked when Andy Grundman added code to remove the need for an external flac process to transcode embedded cuesheet flacs on playback and added code to fully support gapless playback with embedded cuesheets.

    Popularity of the format is probably waning since it's supported by only a few other packages & applications, notably FB2K, EZ-CDAC, deadbeef, etc. Support on Apple platforms is especially thin.

    I'm married to the format, as I've been ripping my library that way for 16 years now and I've become set in my ways in my dotage.

    Name:  PXL_20210927_162924799.jpg
Views: 39
Size:  188.7 KB

Posting Permissions

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