coherence.backends.audiocd_storage (module)

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

Bases: coherence.backend.BackendItem

logCategory = 'audiocd'
get_item()[source]

Called by the CDS and the MediaServer web.

Returns

  • an UPnP ContentDirectoryServer DIDLLite object

  • or a Deferred

get_name()[source]

Called by the MediaServer web.

Returns

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

get_path()[source]

Called by the MediaServer web.

Returns

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

get_size()[source]
get_id()[source]
class AudioCDStore(server, **kwargs)[source]

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()[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.

extractAudioCdInfo()[source]

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

checkIfAudioCdStillPresent()[source]