coherence.backends.playlist_storage (module) — Cohen3 0.8.0 documentation

# coherence.backends.playlist_storage (module)

class `PlaylistItem`(title, stream_url, mimetype, **kwargs)

  Bases: `coherence.backend.BackendItem`

  `logCategory` = 'playlist_store'
  `get_id`()
  `get_item`()

    Called by the CDS and the MediaServer web.

    Returns: | an UPnP ContentDirectoryServer DIDLLite object or a Deferred

  `get_url`()

class `PlaylistStore`(server, **kwargs)

  Bases: `coherence.backend.AbstractBackendStore`

  Changed in version 0.9.0: Migrated from louie/dispatcher to EventDispatcher

  `logCategory` = 'playlist_store'
  `implements` = ['MediaServer']
  `wmc_mapping` = {'16': 1000}
  `description` = ('Playlist', 'exposes the list of video/audio streams from a m3u playlist (e.g. web TV listings published by french ISPs such as Free, SFR...).', 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': 'playlist_url', 'text': 'Playlist file URL:', 'type': 'string', 'help': 'URL to the playlist file (M3U).'}]
  `playlist_url` = None
  `append`(obj, parent)
  `upnp_init`()

    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.

  `retrievePlaylistItems`(url, parent_item)