Ok, after having some free time to fly through the database I decided to
write a little PHP script to poll my Trackstat database.

Have a look at the attached picture to get an idea of what I'm talking
about.

What you need is Cacti (http://www.cacti.net/), PHP, and of course the
Squeezecenter with Erlands Trackstat Plugin (Many thanks for this,
makes me happy every day! :-)).

I'm using Ubuntu Linux as Server OS.
As database I'm using my own MySQL Database (not the embedded one).
(Guide: http://wiki.slimdevices.com/index.php/ExistingMySQLInstance)

Attached to the post you'll find all the necessary files.
Just rename the txt files. Insert your database password at
"yourpasswordhere" in the ss_squeeze_played.php file and move it to
/usr/share/cacti/site/scripts/ (Ubuntu Linux, see manual for other
distris).
Now you can import the xml files with cactis graphical interface.
Thats it!

I would be happy to get feedback!
Especially with the SQL query... I'm not completely sure what it does
with NULL's but as you can see till now it works fine.

Known "bug" is that only different songs are counted, means if you play
the same song over and over again count will always be 1.

The graph shows how it works.
"Songs played within 24h" are the number of songs played within 24h..
sounds pretty logical :-)
The "Rating within 24h" is the Average rating for the Songs you played
within 24h.
"Tracks played today" are the number of songs played since midnight.


+-------------------------------------------------------------------+
|Filename: ss_squeeze_played.php.txt                                |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=7103|
+-------------------------------------------------------------------+

-- 
Blu3IcE

System: Ubuntu, SqueezeCenter-Version: 7.3
Player: Squeezebox v3 @ Bose LifeStyle Series III
Plugins: TrackStat, SugarCube, Dynamic Playlists, AutoDim
------------------------------------------------------------------------
Blu3IcE's Profile: http://forums.slimdevices.com/member.php?userid=13792
View this thread: http://forums.slimdevices.com/showthread.php?t=61105

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

Reply via email to