gharris999 wrote:
> But here's the thing: if the scanner scans a file with
> André_George_Previn_the_conductor_or_composer -after- it scans a file
> with André_George_Previn_the_album_artist, then the contributor.namesort
> field is always going to be overwritten with the default LMS generated
> ANDRé GEORGE PREVIN namesort data. So bye, bye namesort == PREVIN ANDRE
> GEORGE.
>
> Doesn't this explain the semi-random sort results you've been seeing?
> I.e. whether or not your preferred namesort data gets munged is largely
> luck-of-the-draw in terms of what files get scanned in what order?
Thanks for that. It is what I tried to say earlier in the thread.
So, knowing no perl at all I tried to track the scanner code and
eventually found Contributor.pm. Whilst much of the syntax is
impenetrable to me, I found an interesting fix for bug #3096. Tracking
this down the fix was made to prevent exactly the problem I have. And
it used to work. It doesn't work now because at some point the default
Sort form (where not from ArtistSort) was changed to include accents
whereas the Search form still does not.
I did a temporary fix late last night, which on inspection this morning
has worked, so I'll raise a bug report. A slightly better fix than mine
will be needed, but at least I can say with confidence which line of
code needs changing.
The existing code at line 155 is:
Code:
--------------------
# Bug 3069: update the namesort only if it's different
than namesearch
if ( $search ne $sort ) {
$sth = $dbh->prepare_cached('UPDATE
contributors SET namesort = ? WHERE id = ?');
$sth->execute( $sort, $id );
}
--------------------
$search and $sort used to be the same by default, even with accents, but
they aren't any more. So a 'bodge' fix to test the idea is:
Code:
--------------------
# Bug 3069: update the namesort only if it's different
than namesearch
if ( substr($search,0,3) ne substr($sort,0,3) ) {
$sth = $dbh->prepare_cached('UPDATE
contributors SET namesort = ? WHERE id = ?');
$sth->execute( $sort, $id );
}
--------------------
Just by checking the first bit of the name, that usually doesn't have
accents, the default namesort is now updated by the proper ArtistSort.
A proper fix needs knowledge of precisely how the 'search' form and
'sort' forms are derived (in many different languages) so that $sort and
$search can be properly compared and seen to be equal or not.
I hope that makes sense!
LMS 7.9 on VortexBox Midi, Xubuntu 14.04, FLACs 16->24 bit,
44.1->192kbps. LMS & Squeeze2upnp to MF M1 CLiC (to MF amp & ESLs) &
Marantz CR603 UPnP renderers. Minimserver (server) & upplay (control
point) to same renderers & to upmpdcli/mpd PC renderers. Squeezelite to
Meridian USB Explorer DAC to speakers/phones. Wireless Xubuntu 14.04
laptop with firefox/upplay or Android 'phone with
Squeeze-Commander/BubbleUPnP controls LMS/Minimserver. Have a Touch
with EDO, and a spare, but don't use.
------------------------------------------------------------------------
PasTim's Profile: http://forums.slimdevices.com/member.php?userid=41642
View this thread: http://forums.slimdevices.com/showthread.php?t=103454
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta