platypush/plugins/music/mpd/__init__.py
def add(self, resource, position=None):
        """
        Add a resource (track, album, artist, folder etc.) to the current playlist

        :param resource: Resource path or URI
        :type resource: str

        :param position: Position where the track(s) will be inserted (default: end of the playlist)
        :type position: int
        """

        if isinstance(resource, list):
            for r in resource:
                r = self._parse_resource(r)
                try:
                    if position is None:
                        self._exec('add', r)
                    else:
                        self._exec('addid', r, position)
                except Exception as e:
                    self.logger.warning('Could not add {}: {}'.format(r, e))

            return self.status().output

        r = self._parse_resource(resource)

        if position is None:
            return self._exec('add', r)
        return self._exec('addid', r, position)

        Add a resource (track, album, artist, folder etc.) to the current playlist

        :param resource: Resource path or URI
        :type resource: str

        :param position: Position where the track(s) will be inserted (default: end of the playlist)
        :type position: int
        
Add a resource (track, album, artist, folder etc.) to the current playlist
Add a resource ( track album artist folder etc . ) to the current playlist
def add(self, resource, position=None):
        if isinstance(resource, list):
            for r in resource:
                r = self._parse_resource(r)
                try:
                    if position is None:
                        self._exec('add', r)
                    else:
                        self._exec('addid', r, position)
                except Exception as e:
                    self.logger.warning('Could not add {}: {}'.format(r, e))
            return self.status().output
        r = self._parse_resource(resource)
        if position is None:
            return self._exec('add', r)
        return self._exec('addid', r, position)
def add ( self , resource , position = None ) : if isinstance ( resource , list ) : for r in resource : r = self . _parse_resource ( r ) try : if position is None : self . _exec ( 'add' , r ) else : self . _exec ( 'addid' , r , position ) except Exception as e : self . logger . warning ( 'Could not add {}: {}' . format ( r , e ) ) return self . status ( ) . output r = self . _parse_resource ( resource ) if position is None : return self . _exec ( 'add' , r ) return self . _exec ( 'addid' , r , position )
Add a resource (track, album, artist, folder etc.)
Add a resource ( track album artist folder etc . )
"""
        Add a resource (track, album, artist, folder etc.) to the current playlist

        :param resource: Resource path or URI
        :type resource: str

        :param position: Position where the track(s) will be inserted (default: end of the playlist)
        :type position: int
        """
self
resource
Resource path or URI
Resource path or URI
position
Position where the track(s) will be inserted (default: end of the playlist)
Position where the track ( s ) will be inserted ( default : end of the playlist )