Plugin:SimpleDJ:Queue MySQL

From ShoutIRC RadioBot Wiki
Jump to navigation Jump to search

This is a plugin for SimpleDJ which keeps your playlist and ID3 cache in a MySQL database. This plugin provides a few benefits over the memory queue, including less memory usage and easier integration with WebRequest systems.

Configuration

See the Configuration page.

Database Schema

Note: You do not need to create the table yourself, the plugin will do it automatically.
Here is the SQL query needed to create the AutoDJ table:

CREATE TABLE `AutoDJ` (
 `ID` int(10) unsigned NOT NULL,
 `Path` varchar(255) NOT NULL,
 `FN` varchar(255) NOT NULL,
 `mTime` int(11) NOT NULL,
 `LastPlayed` int(11) NOT NULL,
 `PlayCount` int(11) NOT NULL,
 `LastReq` int(11) NOT NULL,
 `ReqCount` int(11) NOT NULL,
 `Title` varchar(255) NOT NULL,
 `Artist` varchar(255) NOT NULL,
 `Album` varchar(255) NOT NULL,
 `Genre` varchar(255) NOT NULL,
 `SongLen` int(11) NOT NULL,
 PRIMARY KEY  (`ID`)
);

Field Descriptions

ID - The file ID.
 On Windows, this is the CRC of the full path and filename in lower case.
 On Linux/other, this is the CRC of the full path and filename, but not converted to lowercase first since those systems filesystems are case sensitive.
Path - The folder the file is in. 
FN - The filename of the file (without the path).
 Note: If you want the full path and filename in a query, you can use CONCAT(Path,FN)
mTime - The file's last modification time in standard C time() style. AutoDJ uses this to know whether it should re-read the file's meta tags.
LastPlayed - The timestamp of the last time the file was queued for playback.
PlayCount - The number of times the file has been queued for playback.
LastReq - This field will hold the last time the file was requested. Currently AutoDJ doesn't fill this in for !request, etc., but should in the future.
ReqCount - This field will hold how many times the file has been requested. Currently AutoDJ doesn't fill this in for !request, etc., but should in the future.
Title/Artist/Album/Genre - Holds the meta info read from the file, it should be obvious which is which.
SongLen - The length of the song in seconds, if available.


RadioBot vde

RadioBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuilt-In VariablesMulti Sound Server ModeUsername Character Restrictions
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin