Music Format DB change.

For the Music DB, I’d essentially lifted the logic, and the MySQL db format from Michael Simmons’ iTunes Watcher.

Since I’m finally getting near a stable release, and most of this data is worthless to myself, I’ve trimmed down the table a bit, the format is:

TABLE `$dbmusic` ( `number` int(3) NOT NULL auto_increment, `date` text NOT NULL, `title` text NOT NULL, `artist` text NOT NULL, `album` text NOT NULL, `composer` text NOT NULL, `time` text NOT NULL, `bitrate` text NOT NULL, KEY `number` (`number`), KEY `number_2` (`number`) );

The protocol is just as simple as Michael’s initial setup, pass each of these variables, as well as a simple password hash in a POST request to the appropriate file, and should your data be valid, it’ll be posted into the DB.

Note that I have yet to code or even TEST anything for WinAmp, although it should be simple enough.

The logic of the parsing is currently lacking – due to no real globalized means of testing or knowledge between players, I defaulted to the logic as such: I check to see if there is a set bitrate, and if so, and the time (length of song) value is missing, it is assumed to be a stream of bitrate. If both time and bitrate are missing, it has to be a wierdo stream – there’s no file which I know of which doesn’t have an arbitrary speed, even VBR. Otherwise, it figures it to be a local song.

Currently, the format for this is static – it might be one of the first things I convert to smarty.