erland wrote: 
> Parameter2 id needs to be 1 so it matches the key in parametersPL3 hash.
> 
> Not sure if that’s the problem but it’s definitely incorrect.

I think that could be it.
But I'm not sure I understand how these IDs work. 
Which IDs do I choose if I want to have *multiple* playlists with
*multiple* parameters - and in a certain order in which they are asked?
Would would the IDs and the parameters hash look like for these PLs?

Example:

Code:
--------------------
        my %parameter1 = (
                        'id' => 1,
                        'type' => 'genre',
                        'name' => 'Select genre'
        );
        my %parameter2 = (
                        'id' => 2,
                        'type' => 'custom',
                        'name' => 'Select decade',
                        'definition' => "select cast(((tracks.year/10)*10) as 
int),case when tracks.year>0 then cast(((tracks.year/10)*10) as int)||'s' else 
'Unknown' end from tracks where tracks.audio=1 group by 
cast(((tracks.year/10)*10) as int) order by tracks.year desc"
        );
        my %parameter3 = (
                        'id' => 3,
                        'type' => 'list',
                        'name' => 'Select percentage of TOP Rated Songs',
                        'definition' => 
'0:0%,10:10%,20:20%,30:30%,40:40%,50:50%,60:60%,70:70%,80:80%,90:90%,100:100%'
        );
  
        # PL2 - a playlist with rated songs with a certain percentage of songs 
rated >= 3 stars
        my %parametersPL2 = (
                1 => \%parameter3
        );
        $playlist2{'parameters'} = \%parametersPL2;
        $result{'ratingslight_rated-with_top_percentage'} = \%playlist2;
  
        # PL3 - a playlist with rated songs by decade
        my %parametersPL3 = (
                1 => \%parameter2
        );
        $playlist3{'parameters'} = \%parametersPL3;
        $result{'ratingslight_rated-by_decade'} = \%playlist3;
  
        # PL4 - a playlist with rated songs by genre with a certain percentage 
of songs rated >= 3 stars
        my %parametersPL4 = (
                1 => \%parameter2,
                2 => \%parameter3
        );
        $playlist4{'parameters'} = \%parametersPL4;
        $result{'ratingslight_rated-by_decade_with_top_percentage'} = 
\%playlist4;
  
        # PL5 - a playlist with rated songs by genre and decade with a certain 
percentage of songs rated >= 3 stars
        my %parametersPL5 = (
                1 => \%parameter1,
                2 => \%parameter2,
                3 => \%parameter3
        );
        $playlist5{'parameters'} = \%parametersPL5;
        $result{'ratingslight_rated-by_genre_and_decade_with_top_percentage'} = 
\%playlist5;
--------------------


------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=113344

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

Reply via email to