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

# coherence.backends.lastfm_storage (module)

class `LastFMUser`(user, passwd)

  Bases: `coherence.log.LogAble`

  `logCategory` = 'lastFM_user'
  `host` = 'ws.audioscrobbler.com'
  `basepath` = '/radio'
  `sessionid` = None
  `parent` = None
  `getting_tracks` = False
  `tracks` = []
  `user` = None
  `passwd` = None
  `login`()
  `get_tracks`()
  `update`(item)

class `LFMProxyStream`(uri, parent)

  Bases: `coherence.upnp.core.utils.ReverseProxyResource`, `coherence.log.LogAble`

  `logCategory` = 'lastFM_stream'
  `render`(request)

    Render a request by forwarding it to the proxied server.

class `LastFMItem`(id, obj, parent, mimetype, urlbase, UPnPClass, update=False)

  Bases: `coherence.log.LogAble`

  `logCategory` = 'LastFM_item'
  `remove`()
  `add_child`(child, update=False)
  `remove_child`(child)
  `get_children`(start=0, request_count=0)
  `get_child_count`()
  `get_id`()
  `get_update_id`()
  `get_path`()
  `get_name`()
  `get_parent`()
  `get_item`()
  `get_xml`()

class `LastFMStore`(server, **kwargs)

  Bases: `coherence.backend.Backend`

  This is a backend to the LastFM.

  Changed in version 0.9.0:

  - Migrated from louie/dispatcher to EventDispatcher

  - Introduced `Backend`’s inheritance

  `logCategory` = 'lastFM_store'
  `implements` = ['MediaServer']
  `append`(obj, parent)
  `remove`(item)
  `len`()
  `get_by_id`(id)
  `getnextID`()
  `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.

`main`()