Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(0)  |  Derive(3)  |  Import(0)
MpdPlaylist is a list of song.  
Use it to create a mapping between your player and the fictive mpd
server.

Some methods must be implemented, otherwise, NotImplementedError
is raised.

To bind a playlist to this class, use overide
`handlePlaylist` method.

src/p/y/pyscmpd-HEAD/extlib/python-mpd-server/examples/mpd_server_example.py   pyscmpd(Download)
class MpdPlaylist(mpdserver.MpdPlaylist):
    playlist=[mpdserver.MpdPlaylistSong(file='file0',songId=0)]
    # How to get song position from a song id in your playlist
    def songIdToPosition(self,i):
        for e in self.playlist:

src/p/y/pyscmpd-HEAD/src/pyscmpd/scmpd.py   pyscmpd(Download)
class MpdPlaylist(mpdserver.MpdPlaylist):
 
	def songIdToPosition(self, id):
 
		return ScMpdServerDaemon.player.getIdPosInPlaylist(id, ScMpdServerDaemon.player.children)

src/p/y/pyscmpd-HEAD/test-src/coreplayer.py   pyscmpd(Download)
class MpdPlaylist(mpdserver.MpdPlaylist):
 
    def songIdToPosition(self, songId):
 
		logging.info("Request to convert Id [%d] to position" % songId)