Tunez_Replacement main page

Database Controller

This controller provides an API-like functionality to the Player controller and the Client.

Exposed Functionality

  • Search
    • You can search by title, artist, album, owner, recently added, most played
    • Optional parameter is random song number, returns that many random songs.
    • If you don't provide any parameters, this will return 1 random song.
    • NOTE: searches should be cached somehow, b/c when someone votes, the current page will be refreshed, meaning their search is run again.
  • Get file path from id
    • possibly kerberos restricted down the road, will basically return the file metadata, including path information (on AFS, for example)
  • Update
    • Ask the database to update your directory. Your information will be pulled from kerberos and only your music directory will be scanned.
    • You will NOT need to supply a directory to upload, all music should be in /afs/acm/media/music/<netid>/

Components

Database Schema details

TABLEcolumns
albumsid, title, artist_id, genre, cover_path, num_tracks
artistsid, name
songsid, artist_id, album_id, tracknum, title, year, length, puid
genresid, name
filesid, song_id, path, owner_id, bitrate, length, format, etc...
usersid, netid, music_dir, last_updated

Library Manager

This will handle library updates. This includes:

  • adding songs to the database
  • removing deleted songs from the database
  • making sure duplicates are not displayed (but still kept in afs, and possibly in the database tagged as a duplicate and hidden)
  • responds to "report this song" links (for duplicates)
  • the ability to upload directly without scp-ing to AFS - talk to admin about this (njriley's idea)
  • convert to mp3 if not already in that format (or whatever is best)

Metadata stuff

  • normal stuff like artist, album, genre, etc. uses musicnds
  • lyrics from musicbrainz somehow

http://en.wikipedia.org/wiki/MusicDNS

NOTE: Optimally we'll use MusicDNS for this to get high-quality metadata and keep the database clean of horrible id3 tags. This also keeps phony songs to a minimum (replacing your songs with rick astley).