iTunes Stats is a simple PHP system for reporting on the data captured by iTunes. There is a drop-in reports system to easily allow you to create your own reports. Enjoy!
Grab the code or fork as needed on GitHub.
iTunes Stats is a simple PHP system for reporting on the data captured by iTunes. There is a drop-in reports system to easily allow you to create your own reports. Enjoy!
Grab the code or fork as needed on GitHub.
I was wondering about creating actual queries, similar to iTunes for my database. I have very little mySQL experience, so it’s probably a easy solution. What is needed to do a sql search, and display the results? Don’t worry, I’m hoping to by an O’reilly mySQL book soon.
I would love to see you just insert every xml key into the song table. I don’t really see why you stopped where you did, having more data would allow for things like summing up sizes, times, are they compilations, even linking for shared across a network.
An Update to this would be simply awesome.
thanks for making this, it saves me from creating one myself 🙂
i had to modify the truncate query in the index.php file. it didn’t include the $database_table_prefix so it wasn’t emptying the tables whenever the xml file is loaded into the database.
line 40-42 i changed it to the following
$result = mysql_query(“TRUNCATE TABLE `”.$database_table_prefix.”artist`”);
$result = mysql_query(“TRUNCATE TABLE `”.$database_table_prefix.”album`”);
$result = mysql_query(“TRUNCATE TABLE `”.$database_table_prefix.”song`”);
if you can incorporate this into wordpress as a plugin w/ an upload page, it would be great 🙂
re: your note starting at line 69 in index.php. A better way to do that would be simply:
$song->$next = (string) $property;
though I’m not sure if this would work in php4.
Also, did anyone have any problems with unicode characters in the library.xml file? they show up as gibberish in mysql. I’ve started by modifying install.php to include:
ENGINE=MyISAM DEFAULT CHARSET=utf8
after all the tables, but it’s still messed up and i can trace it back to the simplexml_load_file function. Any ideas?
I’d like to use this code to track changes in the iTunes database by processing the xml nightly and recording differences.
Anyone done work in this area?
[…] Zeit an einem kleineren Projekt gearbeitet. Basierend auf dem “iTunes Stats”-Skript von Alex King habe ich ein kleines Tool geschrieben, das ein angenehmes Durchsuchen meiner iTunes-Bibliothek […]
[…] received a note from someone interesting in doing more with my iTunes Stats script. As a response, I committed the latest code to GitHub – forks are welcome.AKPC_IDS += […]