coherence.backends.axiscam_storage (module)¶
-
class
AxisCamItem
(id, obj, parent, mimetype, urlbase, UPnPClass, update=False)[source]¶ Bases:
coherence.backend.BackendItem
-
logCategory
= 'axis_cam_item'¶
-
get_child_count
()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
get_path
()[source]¶ Called by the MediaServer web.
- Returns
the filepath where to find the media file that this item does refer to.
-
get_name
()[source]¶ Called by the MediaServer web.
- Returns
the name of the item, it is always expected to be in unicode.
-
-
class
AxisCamStore
(server, **kwargs)[source]¶ Bases:
coherence.backend.BackendStore
-
logCategory
= 'axis_cam_store'¶
-
implements
= ['MediaServer']¶
-
get_by_id
(id)[source]¶ - Parameters
id (object) – is the id property of our DIDLLite item
- Returns
None when no matching item for that id is found,
a BackendItem,
or a Deferred
Called by the CDS or the MediaServer web.
Note
if this MediaServer implements containers that can share their content, like ‘all tracks’, ‘album’ and ‘album_of_artist’ (they all have the same track item as content), then the id may be passed by the CDS like this:
‘id@container’ or ‘id@container@container@container…’
therefore a
if isinstance(id, basestring): id = id.split('@',1) id = id[0]
may be appropriate as the first thing to do when entering this method.
-