Hi,

I am trying to use kaa.beacon and have the following quick questions.

1. Is there a way to connect to a kaa.beacon server that is not
running on the local machine. The kaa.beacon.connect() does not have
any parameters so I don't think there is a way to pass the IP address
to connect to it. Or is there another way to connect?

2. The reason I am asking is because I have two media center PCs. One
of them has a TV tuner and all the hard drives connected. While the
other is like a dummy terminal. I have SMB server running on the main
PC and the dummy terminal has directories mapped from the main PC to
the dummy in the same structure. So I am using a common local_conf.py
file for both. But the problem is the beacon on dummy PC is very slow
on some file formats like RM since it reads the whole file over the
network (samba folder). Since the data is already collected in the
main PC, I think this is redundant and I am hoping if I can use the
same db for both assuming of course that the directory structure of
the items is same for all the PCs.

3. I found that if beacon is busy monitoring a file like RM trying to
read the whole file over network, my query gets blocked. For example
the following code gets blocked after printing "getting File object"
(if beacon is busy monitoring a file over network).

from kaa import beacon
from kaa.beacon import ConnectError
try:
    beacon.connect()
except ConnectError:
    print "\nCould not connect to beacon."
    print "Please start beacon by running ", "'beacon --start'\n"
    import sys
    sys.exit(1)

filename = "/mnt/store1"
print "monitoring"
beacon.monitor(filename)
print "getting File object"
dirItem = beacon.get(filename = filename)
print "getting dir list"
query = dirItem.list()
print "iterating"
for item in query:
    print item
import sys
sys.exit(0)

Is there a way to make it work in background and allow queries even if
it is busy on a single file.

4. How can I get a sorted list of files using beacon? I would like the
files to be sorted such that directories come first and then files.
And the sorting should be case insensitive.

Thanks
Chandan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to