MC Foo - Data Structures

Top

THIS PAGE IS OBSOLETE. The current implementation is a lot more Pythonic, and achieves persistence through the Twisted framework.

Profiles

profiles/<profilename>.cdb includes key and value -pairs like
include -> <profile> <profile> <profile>
   score:artist:<artistname> -> <preference>
   score:song:<song-id> -> <preference>
   score:album:<albumname> -> <preference>
   score:category:pop -> +1
   score:category:rock -> +1
   score:category:dance -> +1
   score:category:gabber -> +1
   score:category:classical -> -3
   score:category:country -> -9999

The profile symlink profiles/read points to is initially included in the active read profile. Same goes for profiles/write.

Media backends

(e.g. "file" (hd, cdrom, nfs etc), "http")

Existence of media/<backend>/<mount-point-munged>/cache means files should be cached on local disk before playing. Cache should be a symlink to the cache directory to use.

file

media/file/<collection-path-munged>/current contains information like
n -> <number of songs>
    <n> -> <relative pathname to mp3>
    title:<pathname> -> <title>
    artist:<pathname> -> <artist>
    album:<pathname> -> <album>
    year:<pathname> -> <year>
    genre:<pathname> -> <genre>
    volume:<pathname> -> <volume>
    import-date:<pathname> -> <import>
    category:<pathname> -> <category>

media/file/<collection-path-munged>/path is an absolute symlink pointing to the real location.

removable media

Existence of media/file/<collection-path-munged>/removable means the path points to a removable media. removable is either a directory storing the labels that can be mounted at this path, or a symbolic link for labels that can be shared between many mounts.

file/<collection-path-munged>/current is a symlink to removable/<label-munged-or-some-id>.cdb.

http

media/http/<identifier>/current contains information like
n -> <number of songs>
    <n> -> <url of mp3>
    title:<url> -> <title>
    artist:<url> -> <artist>
    album:<url> -> <album>
    year:<url> -> <year>
    genre:<url> -> <genre>
    volume:<url> -> <volume>
    import-date:<url> -> <import>
    category:<url> -> <category>

--Tv
Last Modified 02-24-2002 12:19.