Open Media Library
OML Download (ZIP)
Installation help
OML is written in PHP (ver >4, last checked with 8.2.0), uses MariaDB SQL database (compatible with MySQL) and can be run in small networks. That means you can access the database and the songs from all devices in the network. Initially, it was based on PostgreSQL which is no longer supported. Those files can be found here: OML Postgres
Important: It only works if your filename is structured Artist - Title.mp3 with all files in one big directory.
Features:
OML can
- rank songs
- store additional values for speed, annoyance, party factor etc
- search the MusicBrainz database for the publishing year (even in a batch mode for experts but you have to configure the script mbquery-all.php for that)
- sort songs
- produce playlists from these parameters
- play the songs in the web browser (HTML5 with MP3 required, checked with Chrome and Firefox)
- update the database with new songs by one click
Very rough installation guide:
- Install XAMPP a package from apachefriends.org which contains the Apache server, PHP and MariaDB
- extract OML.zip to a subfolder like c:/xampp/htdocs/oml
- Download and unzip GetID3 in a subfolder like c:/xampp/htdocs/oml/getID3
- create a database called oml with tables oml and style (code below, you can use the pre-installed phpMyAdmin from the XAMPP control panel by clicking Admin for MariaDB)
- configure the xampp/apache/conf/httpd.conf (sample code below) with a text editor according to your MP3 directory
- uncomment the line extension=php_curl.dll in xampp/php/php.ini (remove the semicolons)
- optional: configure server local IP and SQL password in oml.ini
- start the XAMPP apache server via the control panel
- type localhost/oml in your browser (or use the IP of the PC running the server like 192.168.1.100/oml for remote access). The OML start menu should show up.
- just opening the htm with file://... as URL won't get you to the database
- add files
SQL code to create the OML database
CREATE DATABASE IF NOT EXISTS `oml`;
USE `oml`;
CREATE TABLE `oml` (
`fi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`dt` varchar(10) DEFAULT NULL,
`ti` varchar(8) DEFAULT NULL,
`quality` varchar(2) DEFAULT NULL,
`party` varchar(1) DEFAULT NULL,
`annoy` varchar(1) DEFAULT NULL,
`yr` varchar(4) DEFAULT NULL,
`bitrate` smallint(6) DEFAULT NULL,
`size` int(11) DEFAULT NULL,
`style` varchar(3) DEFAULT NULL,
`popularity` varchar(1) DEFAULT NULL,
`utime` int(11) DEFAULT NULL,
`ratetime` int(11) DEFAULT NULL,
`radio` varchar(1) DEFAULT NULL,
`lyrics` varchar(1) DEFAULT NULL,
`cmt` varchar(1024) DEFAULT NULL,
`yearmb` varchar(4) DEFAULT NULL,
`yearall` varchar(4) DEFAULT NULL,
`speed` varchar(1) DEFAULT NULL,
`la` varchar(3) DEFAULT NULL,
`album` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `style` (
`style` varchar(3) NOT NULL,
`descr` varchar(128) NOT NULL,
`comment` varchar(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
configuration of c:/xampp/apache/conf/httpd.conf
(exchange the D:/mp3/ path with your directory where mp3's are stored)
insert:
Alias /mp3 "D:/mp3/"
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
Order allow,deny
Allow from all
back to Radiovibrations.com start page