I know that recent LMS can be configured to ignore certain tracks for
scrobbling purposes - and that the definitions are comma separated lists
but can they be regex?


I found the code in Slim/Plugin/AudioScrobbler/Plugin.pm - and I think
it does not allow it


Code:
--------------------
    
        my @ignoreTitles  = split(/\s*,\s*/, $prefs->get('ignoreTitles'));
        my @ignoreAlbums  = split(/\s*,\s*/, $prefs->get('ignoreAlbums'));
        my @ignoreArtists = split(/\s*,\s*/, $prefs->get('ignoreArtists'));
        my @ignoreGenres  = split(/\s*,\s*/, $prefs->get('ignoreGenres'));
  
        if ( (scalar @ignoreGenres && $track->genre && grep { 
$track->genre->name =~ /\Q$_\E/i } @ignoreGenres )
                || (scalar @ignoreTitles && grep { $title =~ /\Q$_\E/i } 
@ignoreTitles)
                || (scalar @ignoreArtists && grep { ($track->artistName || 
$meta->{artist} || '') =~ /\Q$_\E/i } @ignoreArtists)
                || (scalar @ignoreAlbums && grep { ($track->albumname || 
$meta->{album} || '') =~ /\Q$_\E/i } @ignoreAlbums)
        ) {
                main::DEBUGLOG && $log->debug( sprintf("Ignoring %s, it's 
failing one of the ignored items tests: %s, %s, %s", $title, $track->artistName 
|| $meta->{artist}, $track->albumname || $meta->{album}, ($track->genre ? 
$track->genre->name : '')) );
                return;
        }
  
--------------------


However, I am not an expert on use of \Q and \E and what the contents of
$_ is at that point.

Reason:
I have some generated titles that are created by a .cue file that splits
up a radio show ... the spoken links have titles in general form of
show name - link number
e.g.
John Smith 2018/02/12 - 1
John Smith 2018/02/12 - 2
Fred 2018/02/12 - 1
Fred 2018/02/12 - 2
etc

and I would love to avoid scrobbling them.



Paul Webster
http://dabdig.blogspot.com
Author Radio France (FIP etc) plugin
------------------------------------------------------------------------
Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=109014

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to