No description
Find a file
2019-11-01 21:50:25 +01:00
bin use argparse 2017-06-15 08:57:53 +02:00
debian discover/broadcast server location via mdns 2017-07-01 10:25:36 +03:00
pandora_client h264 high only supports 420p 2019-11-01 21:50:25 +01:00
config.example.json better extract and file locating 2012-01-04 12:31:43 +05:30
config.plugin_example.py - add option to customize path parsing 2013-04-24 15:21:21 +02:00
README.md use makrdown 2018-04-03 13:57:41 +05:30
setup.py new version 0.3.0 2017-11-26 13:25:05 +01:00

pandora_client - python client and libary to access a pan.do/ra instances

pandora client example:

import pandora_client #example config.json ''' { "url": "http://localhost:8000/api/", "username": "username", "password": "password", "cache": "/.ox/client.sqlite", "media-cache": "/.ox/media", "volumes": { "volumename": "/media/2010/Movies" } } ''' c = pandora_client.Client('config.json') c.scan() #scans all volumes for files and updates cache db c.sync() #syncs cached file info with site, and encodes and uploads requested media c.clean() #cleanup transcodes created druing sync to save disk space

just using the API:

api = pandora_client.API("http://localhost:8000/api/")
r = api.find(
    query={'conditions':[]},
    keys=['title', 'year'],
    range=[0, 100]
)
for i in r['data']['items']:
    ...

api documentation is available as python docstrings. i.e. in ipython: api.find? (alternatively you can open the api url in a browser to read further documentation)

Distributed encoding

pandora_client can distribute the encoding to multiple nodes on a local network or multiple encodings on the same host.

to do this you need to install additional dependencies: apt-get install python3-twisted python3-requests

now run one node in server mode:

pandora_client server

and start the other nodes with:

pandora_client client http://SERVER_IP:8789