lucOS 2.0
Other Technologies used: SQLite, AJAX, node.js, HTML5, Offline manifests,
My Contribution: All of it.
This project follows on from lucOS 1. As I developed the project more and more, I found it getting slower and more bloated. Everything was loaded at once, which was just too much if I only wanted to do one thing. Also, I'd just started a job as a Web Developer using PHP and didn't want to end up doing more PHP in my spare time.
lucOS 2.0 breaks everything down into modules. Each module is self-contained, but interacts with other modules and APIs. Modules are written in whatever language I felt like trying out that day.
Media Manager
The media manager keeps track of what music I'm listening to right now, including whether it's paused and the current volume. It also stores a playlist of the next few tracks in memory and when it's running out of tracks, it requests more from the Media Selector. The Media Manager also polls VLC to make sure music isn't playing when I'm trying to watch something. It is written in Java and runs a http server so that other modules can communicate with it.
Media Player
The media player is a simple html page which esentially consists of a video element. It does long poll requests to the Media Manager to find out what it should be playing and how loud. It also reports back to the Media Manager to let it know the track's progress. If a track is audio only, the Media Player can also show some artwork.
Media Selector
The media selector works out what I should listen to. It takes a random selection tracks from my music sqlite database based on a weighting. It is written in perl and runs a http server so that other modules can communicate with it. It also has a simple web UI to make it easier to update track metadata.
Media Fingerprinter
This is a C program which fingerprints all the media in my collection using the Chromaprint library. It then writes this into a myslite database. By associating metadata with a fingerprint rather than a file path, I am free to move files about as much as I want. Rerunning the program will update all the paths in the database without disturbing the metadata.Media metadata
I currently have four ways of updating metadata in my media library (well, five if you include manually editing the database):- A python script which reads id3 (or similar) tags.
- A python script which looks up the acoustic fingerprints using the Acoustid web API.
- A C program which lets me add metadata to a directory of files recursively.
- The web UI part of the Media Selector which lets me edit data on a file by file basis.