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

# coherence.backends.yamj_storage (module)

class `MovieItem`(movie, store, title=None, url=None)

  Bases: `coherence.backend.BackendItem`

  `get_item`()

    Called by the CDS and the MediaServer web.

    Returns: | an UPnP ContentDirectoryServer DIDLLite object or a Deferred

  `get_path`()

    Called by the MediaServer web.

    Returns: | the filepath where to find the media file that this item does refer to.

  `get_id`()

class `YamjStore`(server, **kwargs)

  Bases: `coherence.backend.AbstractBackendStore`

  `logCategory` = 'yamj_store'
  `implements` = ['MediaServer']
  `description` = ('YAMJ', 'exposes the movie/TV series data files and metadata from a given YAMJ (Yet Another Movie Jukebox) library.', 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': 'refresh', 'text': 'Refresh period', 'type': 'string'}, {'option': 'yamj_url', 'text': 'Library URL:', 'type': 'string', 'help': 'URL to the library root directory.'}]
  `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.

  `retrieveCategories`(parent)
  `retrieveIndexMovies`(parent, name, root_name, per_page=10, page=0, offset=0)