OK Michael,

I butchered you algorithm a bit, and now it's sort-of working...or it
seems to be...

This is what I did (don't laugh, I'm blundering around like a blind man
at night, going by touch and wearing mittens...)

for my $track ( @{$searchResult->{tracks}->{items}} ) {
#next unless $track->{performer} && $track->{id}
&& $track->{title};

my $artist = '';

$artist = $track->{album}->{composer}->{name} if
$track->{album} && $track->{album}->{composer};
$artist = $track->{composer}->{name} if $artist
!~ /\Q$searchArtist\E/i;

next unless $artist;

next if $prefs->get('playSamples');

push @$candidates, {
title  => $track->{title},
artist => $artist,
url    =>
Plugins::Qobuz::ProtocolHandler->getUrl($track),
};

It sometimes takes 2-3 tries to get a genre-radio going (still
investigating) but once it does start it works passably well. Occasional
"Baby Classics" or terribly piano arrangements do happen, but that is to
be expected, and it did also happen with Spotify and SmartMix when I
used that combination. I'm not sure what the "composer" tags I added
actually do, but it's the best I can manage. If you ever have time to
look into this, then I'm sure you'll find a much better solution, but at
least I have something I can use for now...at least I hope it will
continue working... ;)


------------------------------------------------------------------------
CommanderROR's Profile: http://forums.slimdevices.com/member.php?userid=59408
View this thread: http://forums.slimdevices.com/showthread.php?t=97146

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

Reply via email to