Dr Lovegrove Wrote: > On 26/05/06, erland > <erland.28fetn1148666102 (AT) no-mx (DOT) forums.slimdevices.com> > wrote: > > > > I'm thinking about adding CLI commands to TrackStat for reading the > > statistic lists viewed in the TrackStat web ui today. > > > > Would you be interested in adding possibility to view statistic > > information through Moose ? > > Yeah, it would certainly be a handy addition.. I can see it fitting in > better as a library feature than a 'now playing' feature, in which > case > reading values directly from the mysql might be easier.. Is the data > stored in the database ? > > -- > - Dr Lovegrove > http://www.rusticrhino.com/drlovegrove
The core data is in the database but the actual statistics are calculated in runtime using SQL statements that joins different tables and uses "max", "min", "avg", "count", "group by" and "having" functions. Track statistics is quite simple, such as: - Most played tracks - Top rated tracks - Last played tracks Album, artist, genre, year, recently played statistics is more complicated. The information is stored in two tables: track_statistics: A single row for each track where statistics is stored, it contains columns for "rating", "lastplayed", "added", "playcount". track_history: A row for each time a track has been played, a specific track can be on several rows. Contains columns for "played"(lastplayed) and "rating" If you want to look at the SQL statements you will find them in the *.pm files in the Statistics directory inside the TrackStat zip file. I can't promise the table structure will be the same forever so if you want a stable interface I think some sort of CLI interface would be preferable. But I can agree that it feels more like a "library" functionallity than "now playing" functionality. My idea for the CLI interface is that the command would request which type of statistics(for example "topratedalbums") and the answer would be a list of item id/urls together with the statistic data. Tell me if you are interested in more details or feel that you will be interested in a CLI interface. -- erland Erland Isaksson 'My homepage' (http://erland.homeip.net) 'My download page' (http://erland.homeip.net/download) (Developer of 'TrackStat' (http://erland.homeip.net/download/do/viewapplication?name=slimserver-trackstat) , 'SQLPlayList' (http://tinyurl.com/pptqy) and 'DynamicPlayList' (http://tinyurl.com/kfrgs) plugins) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=24197 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
