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

# coherence.backends.audiocd_storage (module)

class `TrackItem`(device_name='/dev/cdrom', track_number=1, artist='Unknown', title='Unknown')

  Bases: `coherence.backend.BackendItem`

  `logCategory` = 'audiocd'
  `get_item`()

    Called by the CDS and the MediaServer web.

    Returns: | an UPnP ContentDirectoryServer DIDLLite object or a Deferred

  `get_name`()

    Called by the MediaServer web.

    Returns: | the name of the item, it is always expected to be in unicode.

  `get_path`()

    Called by the MediaServer web.

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

  `get_size`()
  `get_id`()

class `AudioCDStore`(server, **kwargs)

  Bases: `coherence.backend.AbstractBackendStore`

  `logCategory` = 'audiocd'
  `implements` = ['MediaServer']
  `description` = ('audioCD', '', None)
  `options` = [{'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': 'device_name', 'text': 'device name for audio CD:', 'type': 'string', 'help': 'device name containing the audio cd.'}]
  `disc_title` = None
  `cdrom` = None
  `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.

  `extractAudioCdInfo`()

    extract the CD info (album art + artist + tracks), and construct the UPnP items

  `checkIfAudioCdStillPresent`()