coherence.backends.banshee_storage (module)¶
-
class
SQLiteDB(database)[source]¶ Bases:
coherence.log.LogAblePython DB API 2.0 backend support.
Connect to a db backend hosting the given database.
-
logCategory= 'sqlite'¶
-
-
class
Container(id, parent_id, name, children_callback=None, store=None, play_container=False)[source]¶ Bases:
coherence.backend.BackendItem-
get_path= None¶
-
get_child_count()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
get_item()[source]¶ Called by the CDS and the MediaServer web.
- Returns
an UPnP ContentDirectoryServer DIDLLite object
or a Deferred
-
-
class
Artist(*args, **kwargs)[source]¶ Bases:
coherence.backend.BackendItem-
get_child_count()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
-
class
Album(*args, **kwargs)[source]¶ Bases:
coherence.backend.BackendItemdefinition for an album
-
mimetype= 'directory'¶
-
get_path= None¶
-
get_child_count()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
get_item()[source]¶ Called by the CDS and the MediaServer web.
- Returns
an UPnP ContentDirectoryServer DIDLLite object
or a Deferred
-
-
class
BasePlaylist(*args, **kwargs)[source]¶ Bases:
coherence.backend.BackendItemdefinition for a playlist
-
id_type= 'baseplaylist'¶
-
mimetype= 'directory'¶
-
get_path= None¶
-
db_id¶ Should be implemented in subclass
-
get_child_count()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
-
class
MusicPlaylist(*args, **kwargs)[source]¶ Bases:
coherence.backends.banshee_storage.BasePlaylist-
id_type= 'musicplaylist'¶
-
db_id¶ Should be implemented in subclass
-
-
class
MusicSmartPlaylist(*args, **kwargs)[source]¶ Bases:
coherence.backends.banshee_storage.BasePlaylist-
id_type= 'musicsmartplaylist'¶
-
db_id¶ Should be implemented in subclass
-
-
class
VideoPlaylist(*args, **kwargs)[source]¶ Bases:
coherence.backends.banshee_storage.MusicPlaylist-
id_type= 'videoplaylist'¶
-
-
class
VideoSmartPlaylist(*args, **kwargs)[source]¶ Bases:
coherence.backends.banshee_storage.MusicSmartPlaylist-
id_type= 'videosmartplaylist'¶
-
-
class
BaseTrack(*args, **kwargs)[source]¶ Bases:
coherence.backend.BackendItemdefinition for a track
-
get_child_count()[source]¶ Called by the CDS.
- Returns
the number of its childs - len(childs)
or a Deferred
-
get_path()[source]¶ Called by the MediaServer web.
- Returns
the filepath where to find the media file that this item does refer to.
-
-
class
BansheeDB(path=None)[source]¶ Bases:
coherence.log.LogAble-
logCategory= 'banshee_db'¶
-
-
class
BansheeStore(server, **kwargs)[source]¶ Bases:
coherence.backend.BackendStore,coherence.backends.banshee_storage.BansheeDBChanged in version 0.9.0: Migrated from louie/dispatcher to EventDispatcher
-
logCategory= 'banshee_store'¶
-
implements= ['MediaServer']¶
-
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.
-
release()[source]¶ If anything needs to be cleaned up upon shutdown of this backend, this is the place for it. Should be overwritten in subclass.
-
get_by_id(item_id)[source]¶ - Parameters
id (object) – is the id property of our DIDLLite item
- Returns
None when no matching item for that id is found,
a BackendItem,
or a Deferred
Called by the CDS or the MediaServer web.
Note
if this MediaServer implements containers that can share their content, like ‘all tracks’, ‘album’ and ‘album_of_artist’ (they all have the same track item as content), then the id may be passed by the CDS like this:
‘id@container’ or ‘id@container@container@container…’
therefore a
if isinstance(id, basestring): id = id.split('@',1) id = id[0]
may be appropriate as the first thing to do when entering this method.
-