coherence.backends.miroguide_storage (module)

class VideoItem(name, description, url, thumbnail_url, store)[source]

Bases: coherence.backend.BackendItem

get_item()[source]

Called by the CDS and the MediaServer web.

Returns

  • an UPnP ContentDirectoryServer DIDLLite object

  • 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_id()[source]
class MiroGuideStore(server, **kwargs)[source]

Bases: coherence.backend.AbstractBackendStore

logCategory = 'miroguide_store'
implements = ['MediaServer']
description = ('Miro Guide', 'connects to the MIRO Guide service and exposes the podcasts catalogued by the service. ', None)
options = [{'option': 'name', 'text': 'Server Name:', 'type': 'string', 'default': 'my media', 'help': 'the name under this MediaServer shall show up with on other UPnP clients'}, {'option': 'version', 'text': 'UPnP Version:', 'type': 'int', 'default': 2, 'enum': (2, 1), 'help': 'the highest UPnP version this MediaServer shall support', 'level': 'advance'}, {'option': 'uuid', 'text': 'UUID Identifier:', 'type': 'string', 'help': 'the unique (UPnP) identifier for this MediaServer, usually automatically set', 'level': 'advance'}, {'option': 'language', 'text': 'Language:', 'type': 'string', 'default': 'English'}, {'option': 'refresh', 'text': 'Refresh period', 'type': 'string'}, {'option': 'proxy_mode', 'text': 'Proxy mode:', 'type': 'string', 'enum': ('redirect', 'proxy', 'cache', 'buffered')}, {'option': 'buffer_size', 'text': 'Buffering size:', 'type': 'int'}, {'option': 'cache_directory', 'text': 'Cache directory:', 'type': 'dir', 'group': 'Cache'}, {'option': 'cache_maxsize', 'text': 'Cache max size:', 'type': 'int', 'group': 'Cache'}]
appendCategory(name, category_id, parent)[source]
appendLanguage(name, language_id, parent, sort='name', count=0)[source]
appendChannel(name, channel_id, parent)[source]
upnp_init()[source]

This method gets called after the device is fired, here all initializations of service related state variables should happen, as the services aren’t available before that point.

retrieveChannels(parent, filter, filter_value, per_page=100, page=0, offset=0, count=0, sort='name')[source]
retrieveChannelItems(parent, channel_id)[source]