platypush/plugins/music/mpd/__init__.py
def searchaddplaylist(self, name):
        """
        Search and add a playlist by (partial or full) name

        :param name: Playlist name, can be partial
        :type name: str
        """

        playlists = list(map(lambda _: _['playlist'],
                             filter(lambda playlist:
                                    name.lower() in playlist['playlist'].lower(),
                                    self._exec('listplaylists', return_status=False))))

        if len(playlists):
            self._exec('clear')
            self._exec('load', playlists[0])
            self._exec('play')
            return {'playlist': playlists[0]}

        Search and add a playlist by (partial or full) name

        :param name: Playlist name, can be partial
        :type name: str
        
Search and add a playlist by (partial or full) name
Search and add a playlist by ( partial or full ) name
def searchaddplaylist(self, name):
        playlists = list(map(lambda _: _['playlist'],
                             filter(lambda playlist:
                                    name.lower() in playlist['playlist'].lower(),
                                    self._exec('listplaylists', return_status=False))))
        if len(playlists):
            self._exec('clear')
            self._exec('load', playlists[0])
            self._exec('play')
            return {'playlist': playlists[0]}
def searchaddplaylist ( self , name ) : playlists = list ( map ( lambda _ : _ [ 'playlist' ] , filter ( lambda playlist : name . lower ( ) in playlist [ 'playlist' ] . lower ( ) , self . _exec ( 'listplaylists' , return_status = False ) ) ) ) if len ( playlists ) : self . _exec ( 'clear' ) self . _exec ( 'load' , playlists [ 0 ] ) self . _exec ( 'play' ) return { 'playlist' : playlists [ 0 ] }
Search and add a playlist by (partial or full) name
Search and add a playlist by ( partial or full ) name
"""
        Search and add a playlist by (partial or full) name

        :param name: Playlist name, can be partial
        :type name: str
        """
self
name
Playlist name, can be partial
Playlist name can be partial