I didn't see anything in the gui to do this, and not in Live365API.pm,
either.

I was thinking of doing something like putting a text file with
genres I want (or at least strings I want genres or their parents
to match), sticking each line of the file into an array, and doing
something like this:

sub validateGenre{
my $test = shift;

foreach my $genre (@acceptableGenres){
        if($test =~ /$genre/){
            return 1;
        }
}

return 0;
}

Then doing something like the following:

# code to modify in sub genreListLoadSub

        foreach my $g ( @tmpGenres ) {
                if ( $g->{Parent_ID} != 0 ) {
                        my $baseName = $parentNameCache{ $g->{Parent_ID} }
                                ||= ( grep { $g->{Parent_ID} == $_->{ID} } 
@tmpGenres
)[0]->{Display_Name};
                        $g->{Display_Name} = "$baseName $g->{Display_Name}";
                }
                if(! validateGenre(genre->{Display_Name}){
                    push @list, [ $g->{Display_Name}, $g->{Name} ];
                }
        }

What do people think?


-- 
totoro
------------------------------------------------------------------------
totoro's Profile: http://forums.slimdevices.com/member.php?userid=5935
View this thread: http://forums.slimdevices.com/showthread.php?t=24823

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

Reply via email to