Thanks again Erland - yes whilst "inside" the Now Playing section - I
get that message, but have discovered it is also updating the trackstat
data; very strange indeed!
On the SQL front, here is one of my SQL playlists:
> -- PlaylistName:Random songs Limited Rating (no Xmas)
> -- PlaylistGroups:
> create temporary table randomweightedratingslow select tracks.url from
> tracks
> left join dynamicplaylist_history on
> tracks.id=dynamicplaylist_history.id
> left join track_statistics on
> tracks.url=track_statistics.url
> where
> audio=1
> and ifnull(track_statistics.rating,0)<80
> and dynamicplaylist_history.id is null
> and not exists (select * from tracks t2,genre_track,genres
> where
> t2.id=tracks.id and
>
> tracks.id=genre_track.track and
>
> genre_track.genre=genres.id and
> genres.name in
> ('Childrens Music','Holiday','Books & Spoken'))
> order by rand()
> limit 30;
>
>
> create temporary table randomweightedratingshigh select tracks.url from
> tracks
> left join dynamicplaylist_history on
> tracks.id=dynamicplaylist_history.id
> left join track_statistics on
> tracks.url=track_statistics.url
> where
> audio=1
> and track_statistics.rating>=80
> and dynamicplaylist_history.id is null
> and not exists (select * from tracks t2,genre_track,genres
> where
> t2.id=tracks.id and
>
> tracks.id=genre_track.track and
>
> genre_track.genre=genres.id and
> genres.name in
> ('Childrens Music','Holiday','Books & Spoken'))
> order by rand()
> limit 70;
>
> create temporary table randomweightedratingscombined as
> SELECT * FROM randomweightedratingslow
> UNION
> SELECT * from randomweightedratingshigh;
>
> SELECT * from randomweightedratingscombined
> ORDER BY rand()
> limit 10;
>
> DROP TABLE randomweightedratingshigh;
> DROP TABLE randomweightedratingslow;
> DROP TABLE randomweightedratingscombined;
>
>
And here is the error message (a bit long I am afraid!):
> Error: near "select": syntax error
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> near "select": syntax error [for Statement "create temporary table
> randomweightedratingslow select tracks.url from tracks left join
> dynamicplaylist_history on tracks.id=dynamicplaylist_history.id left
> join track_statistics on tracks.url=track_statistics.url where audio=1
> and ifnull(track_statistics.rating,0)<80 and dynamicplaylist_history.id
> is null and not exists (select * from tracks t2,genre_track,genres where
> t2.id=tracks.id and tracks.id=genre_track.track and
> genre_track.genre=genres.id and genres.name in ('Childrens
> Music','Holiday','Books & Spoken')) order by rand() limit 30;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> near "select": syntax error
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> near "select": syntax error [for Statement "create temporary table
> randomweightedratingshigh select tracks.url from tracks left join
> dynamicplaylist_history on tracks.id=dynamicplaylist_history.id left
> join track_statistics on tracks.url=track_statistics.url where audio=1
> and track_statistics.rating>=80 and dynamicplaylist_history.id is null
> and not exists (select * from tracks t2,genre_track,genres where
> t2.id=tracks.id and tracks.id=genre_track.track and
> genre_track.genre=genres.id and genres.name in ('Childrens
> Music','Holiday','Books & Spoken')) order by rand() limit 70;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> no such table: randomweightedratingshigh
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> no such table: randomweightedratingshigh [for Statement "create
> temporary table randomweightedratingscombined as SELECT * FROM
> randomweightedratingslow UNION SELECT * from
> randomweightedratingshigh;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> no such table: randomweightedratingscombined
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> no such table: randomweightedratingscombined [for Statement "SELECT *
> from randomweightedratingscombined ORDER BY rand() limit 10;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> no such table: randomweightedratingshigh
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> no such table: randomweightedratingshigh [for Statement "DROP TABLE
> randomweightedratingshigh;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> no such table: randomweightedratingslow
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> no such table: randomweightedratingslow [for Statement "DROP TABLE
> randomweightedratingslow;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
> no such table: randomweightedratingscombined
> Carp::Clan::__ANON__(): DBI Exception: DBD::SQLite::db prepare failed:
> no such table: randomweightedratingscombined [for Statement "DROP TABLE
> randomweightedratingscombined;"] at
> /usr/lib/perl5/vendor_perl/Slim/Schema/Storage.pm line 126
Does any of that make sense to you?!!
Nic
------------------------------------------------------------------------
DrNic's Profile: http://forums.slimdevices.com/member.php?userid=92
View this thread: http://forums.slimdevices.com/showthread.php?t=96614
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins