Hi,

I have toyed around with kaa.beacon a little bit; this is really great
stuff!  It's an incredibly confortable basis for my movie database
project because it automatically recognizes and indexes so many media
types (discs, .avi, .ts, authored DVD directories on hd, ...) which is
one of the great features I like Freevo for.

However, I have a lot of more or less small problems that I'd like to
report in the following:

1) beacon-search does not terminate properly (obviously hangs on
sys.exit), easily reproducable here even with --help.

2) beacon-search always finishes with this error when connected to the
daemon (e.g. with --info, --list-media, simple search):
2008-10-04 21:35:40,691 [ERROR] rpc(284): Socket closed before authentication 
completed

3) since only /dev/cdrom is in /etc/fstab, and /dev/cdrom is symlink
to hdc, beacon-daemon reports:
2008-10-04 21:33:45,780 [ERROR] callback(192): mount: Konnte /dev/hdc nicht 
in /etc/fstab oder /etc/mtab finden

3a) this is likely related; when I eject the disc, I am getting:
2008-10-05 18:40:48,940 [ERROR] async(391): Unhandled InProgress exception:
AttributeError: Exception raised asynchronously; traceback follows:
  File "/usr/lib/python2.5/site-packages/kaa/rpc.py", line 404, in 
_handle_packet_after_auth
    result = self._callbacks[function](*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/hwmon/client.py", 
line 132, in _device_remove
    self.handler.media_removed(self._db.medialist.get_by_media_id(id))
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/server.py", line 
228, in media_removed
    self._db.signals['changed'].emit([media._beacon_id])
AttributeError: 'NoneType' object has no attribute '_beacon_id'

4) when I terminate beacon-daemon (using ctrl-C; I started it with --fg), I 
got:
2008-10-05 18:44:00,158 [ERROR] async(391): Unhandled InProgress exception:
Traceback (most recent call last):
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 288, 
in _step
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 92, 
in _process
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/crawl.py", line 
474, in _scan
    yield async
AsyncException: Exception raised asynchronously; traceback follows:
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 288, 
in _step
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 93, 
in _process
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/parser.py", line 
331, in _parse
    mtime=0, metadata=track)
  File "/usr/lib/python2.5/site-packages/kaa/beacon/server/db.py", line 208, 
in add_object
    result = self._db.add_object(type, **kwargs)
  File "/usr/lib/python2.5/site-packages/kaa/db.py", line 868, in add_object
    query, values = self._make_query_from_attrs("add", attrs, object_type)
  File "/usr/lib/python2.5/site-packages/kaa/db.py", line 695, in 
_make_query_from_attrs
    raise ValueError, "Reference to undefined attribute '%s' for type '%s'" % 
(key, type_name)
ValueError: Reference to undefined attribute 'mtime' for type 'track_dvd'
Beacon done.

(I have a DVD burndir with AUDIO/VIDEO_TS subdirs in the indexed tree
which may cause this?)

5) I have worked around problem 3 by modifying /etc/fstab and
replacing /dev/cdrom with /dev/hdc to be able to index discs.  Then, I
have inserted a disc that I tried before, but although the media was
reported by --list-media, the movie from the disc was not in the DB,
so I wanted to --del-media in case the DB already contained a wrong,
empty list of contents.  However, after --del-media, I am not getting:

[2] [EMAIL PROTECTED]:~/Filme -> beacon-search --list-media
2008-10-05 18:47:46,755 [ERROR] async(391): Unhandled InProgress exception:
Traceback (most recent call last):
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 288, 
in _step
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 92, 
in _process
  File "/usr/lib/python2.5/site-packages/kaa/beacon/client.py", line 364, in 
_connected
    m = yield self._db.medialist.add(id, prop)
AsyncException: Exception raised asynchronously; traceback follows:
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 288, 
in _step
  File "../base/build/lib.linux-i686-2.5/kaa/notifier/coroutine.py", line 93, 
in _process
  File "/usr/lib/python2.5/site-packages/kaa/beacon/media.py", line 92, in 
update
    prop['beacon.content'] = media['content']
TypeError: 'NoneType' object is unsubscriptable

Obviously, the DB has become inconsistent (at least from beacon's
POV)?  Further indexing does not seem to work anymore; I am getting
the same traceback when I insert new media.

6) When I delete everything from ~/.beacon except 'config', and I
restart `beacon-dameon --fg`, I am getting kaa.beacon.root in
--list-media twice (IDs 1 and 2).  Also, I am getting the same
--del-media behavior as in 5), so this is reproducable and obviously
not related to the former problem 3.

7) --del-media should support media names, not only integers; I have
tried to write a simple patch (attached) to do so, but it does not
work.  This is very strange because it *does* find the correct entry
in the DB and the variable 'media' is set to the very same integer
value as if I had specified it directly on the command line, so the
only reason I see why this fails (it simply does not seem to do
anything) may be that `break`ing from the query loop:
    for m in (yield kaa.beacon.query(type='media', media='ignore')):
does not clean up something, so that the db record is not properly
deleted?!  I must confess that I never used this yield-syntax (or kaa
notifier, for that matter) before, so I may not fully understand
what's going on here..

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
Index: beacon/bin/beacon-search
===================================================================
--- beacon/bin/beacon-search	(Revision 3579)
+++ beacon/bin/beacon-search	(Arbeitskopie)
@@ -226,14 +226,21 @@
      
 
     if mode == 'del-media':
+        media = args.pop(0)
         try:
-            media = int(args.pop(0))
-        except:
-            print 'media must be an int'
-            sys.exit(1)
+            media = int(media)
+        except ValueError:
+            for m in (yield kaa.beacon.query(type='media', media='ignore')):
+                if m['name'] == media:
+                    media = m['id']
+                    break
+            if isinstance(media, str):
+                print 'media must be an int or a valid media identifier'
+                sys.exit(1)
         if media == 0:
             print 'media 0 can\'t be deleted'
             sys.exit(1)
+        print 'removing media %r...' % media
         kaa.beacon.delete_media(media)
         sys.exit(0)
       

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
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