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

# coherence.backends.iradio_storage (module)

A ShoutCast radio media server for the Cohen3 UPnP Framework.

Warning

You need your own api key!!!

class `PlaylistStreamProxy`(uri)

  Bases: `coherence.upnp.core.utils.ReverseProxyUriResource`

  proxies audio streams published as M3U playlists (typically the case for shoutcast streams)

  `logCategory` = 'PlaylistStreamProxy'
  `requestFinished`(result)

    self.connection is set in utils.ReverseProxyResource.render

  `render`(request)

    Render a request by forwarding it to the proxied server.

class `IRadioItem`(parent_id, item_id, urlbase, **kwargs)

  Bases: `coherence.backends.models.items.BackendAudioItem`

  A backend audio item object which represents an Shoutcast Radio. This class will hold all information regarding the radio stream.

  Changed in version 0.8.3: Refactored using the class `BackendAudioItem`

  `is_proxy` = False
  `proxy_cls`

    alias of `PlaylistStreamProxy`

  `item_cls`

    alias of `coherence.upnp.core.DIDLLite.AudioBroadcast`

class `IRadioStore`(server, **kwargs)

  Bases: `coherence.backend.AbstractBackendStore`

  `logCategory` = 'iradio'
  `implements` = ['MediaServer']
  `genre_parent_items` = {}
  `append_genre`(parent, genre)
  `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.

  `retrieveItemsForGenre`(parent, genres, per_page=1, offset=0, page=0)
  `retrieveGenreList`()