afriend wrote: 
> I think there's a tiny misunderstanding the SQL code seems to be ok. It
> lists a list of decades to choose from. I've tried the above SQL code
> with SQLplaylist and DatabaseQuery and same there. Both return the
> decades list and SQLplaylist throws an error (only once instead of
> twice) but it also starts the playlist (which my plugin doesn't). 
> So the problem/error comes when I try to act on one of these values
> (execute).
> 
> Since the logs show that the -getNextDynamicPlayListTracks- function
> isn't even called yet (the error happens before) here's the content of
> the -getDynamicPlayLists- function for the 'rated by decade' playlist:
> 
> > 
Code:
--------------------
  >   > sub getDynamicPlayLists {
  >     my ($client) = @_;
  >     my %result = ();
  > 
  >     my %playlist3 = (
  >             'name' => 'Rated - by DECADE',
  >             'groups' => [['Ratings Light ']]
  >     );
  >     my %parameter2 = (
  >                     'id' => 2, # A number between 1-10
  >                     '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"
  >     );
  > 
  >     # PL3
  >     my %parametersPL3 = (
  >             1 => \%parameter2
  >     );
  >     $playlist3{'parameters'} = \%parametersPL3;
  >     $result{'ratingslight_rated-by_decade'} = \%playlist3;
  >     return \%result;
  > }
  > 
--------------------
> > 
> 
> Did I screw something up in there?

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.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
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