Hi Hans,

On Wed, 2008-10-01 at 16:11 +0200, Hans Meine wrote:
> 1) reads in contents of removable discs and stores them in a DB, indexed by 
> the CD/DVD title
> 2) allows me to edit/enhance the CD/DVD title to let it match the discs' 
> label 
> and make it possible to find it (e.g. add a disc number / similar under which 
> I filed it in a box)
> 3) makes it possible to show a list of movies, preferably with metadata 
> (media 
> type, format, length, language, etc.) and tells me which disc the movie is on

First let me say that while I wrote the underlying database code used by
beacon (kaa.db), dischi wrote beacon itself.  So dischi, step in if I
say anything wrong about beacon.


> Is it possible to query movies as well as removable media?

Yes.

The database arranges objects in a parent/child relationship,
corresponding to the filesystem hierarchy.  All objects have a media
object as their top-most ancestor.  There is a built-in media object
called kaa.beacon.root which represents / on the filesystem.  Any object
accessible on non-removable media that can be expressed
by /an/absolute/path will have kaa.beacon.root media object as its
top-most ancestor.

Files on removable media will have a different media object as its top
ancestor that represents the CD, DVD, USB drive, etc.

You can therefore search the whole set of movies (or audio files, or
images, or whatever) regardless of which media object is its ancestor.
Or, you can search for the set of movies on a given media.

(dischi, it might be convenient if there was an 'available' attr of the
media object which is True if the media is mounted currently.  Or is
there some alternate means of getting that info?)


> IIRC it is possible to add additional fields to the DB schema, e.g. in order 
> to customize the disc labels (step 2)?

Yes.

One of the design goals for kaa.db was to allow plugins to extend the
database at runtime by adding custom attributes.  This is generally
transparent to other plugins using the same database (except with
respect to potential name collisions).

beacon, which builds on kaa.db, exposes much[*] of this flexibility.
Your requirements in 2) can be satisfied by extending the media object
by allowing a user-editable label and disk number.  This can be
accomplished by calling (on the client side):

    # This can safely be called more than once.
        kaa.beacon.register_file_type_attrs('media',
           user_label = (unicode, ATTR_SEARCHABLE | ATTR_IGNORE_CASE | 
ATTR_INVERTED_INDEX, 'keywords')
           user_id = (int, ATTR_SIMPLE)
        )

The above creates two new attributes for the media object.  user_label
is a unicode and can be searched on directly (because it is a column in
the media objects table), and as well gets mapped to the 'keywords'
inverted index, which means that any keyword searches which match words
in the user_label would include the media object.

[*] dischi, there doesn't seem to be a way to create new inverted
indexes.


> Also, my impression of kaa.beacon is that it's a indexing and caching system.

I suppose that's a pretty simple description of it.  It also takes care
of thumbnail generation.


> While it should be feasible to write export/import functionality to backup 
> its index (or maybe even import 3rd party indexes as wished by Sylvain in the 
> above thread), I thought about making user-generated data more visible and 
> permanent by writing it to .fxd files.  Would that make sense?
> Are .fxd files still "en vogue"?

I don't know if freevo 2 does away with fxds.  Dischi?  I suppose fxds
could still be used as an overlay on top of beacon.  But they may
overlap too much in function to make that ideal.

dischi and I were talking last week about reviving kaa.webinfo.  Whether
we take that or start something new, I think we agree that we need some
way of fetching metadata from internet sources like imdb, amazon,
thetvdb, etc.  That metadata could be fed into beacon.


> It would be a cool Freevo feature if movies from removable discs could be 
> accessed in a "library" section that allows browsing the covers etc. using 
> these .fxd files, and tells the user to "insert the disc labeled 'foo'".  
> This is not my primary goal, but I'd like to know how far-fetched this is.

Based on what I said above, it's not far fetched at all, and should be
possible now with beacon.  

Cheers,
Jason.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to