On Freitag 10 Oktober 2008, Dirk Meyer wrote: > Dirk Meyer wrote: > > Hans Meine wrote: > >> So the bug must be somewhere else. Anyhow, it sounded as if Dischi > >> had a plan how to fix this. > > > > What was the bug again? The strange media bugs?
Yes, I meant that --del-media does not work, and that I had kaa.beacon.root
twice in the db (i.e. in --list-media's output).
> OK, I updated some media code. Please test.
It seems that I only get kaa.beacon.root once now, but --del-media still does
not work at all. :-(
BTW: Attached is the updated beacon-search patch that I'd like to eventually
commit in order to be able to delete media by name instead of id.
--
Ciao, / / .o.
/--/ ..o
/ / ANS ooo
Index: bin/beacon-search
===================================================================
--- bin/beacon-search (Revision 3622)
+++ 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:
+ found = (yield kaa.beacon.query(
+ type = 'media', media = 'ignore', name = media))
+ if not found:
+ print 'media must be an int or a valid media identifier'
+ sys.exit(1)
+ media = found[0]['id']
+ del found
if media == 0:
print 'media 0 can\'t be deleted'
sys.exit(1)
+ print 'removing media #%r...' % media # TODO: remove debug output
kaa.beacon.delete_media(media)
sys.exit(0)
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 [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
