mherger wrote:
> > 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 one 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
--------------------
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=115184
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta