Player instance inheriting from MPDClient (python-musicpd).
Some methods are overridden to format objects as
sima.lib.track.Trackfor instance, other are calling parent class directly through super(). cf. MPD.__getattr__
find methods are looking for exact match of the object provided attributes in MPD music library
search methods are looking for exact match + fuzzy match.
Overriding MPD’s add method to accept Track objects
Clean blocking event (idle) and pending commands
Overriding explicitly MPDClient.connect()
Overriding explicitly MPDClient.disconnect()
- Find tracks for a specific artist or album
>>> player.find_tracks(Artist('Nirvana')) >>> player.find_tracks(Album('In Utero', artist=Artist('Nirvana'))
Monitor player for change Returns a list a events among:
database player media library has changed
playlist playlist modified
options player options changed: repeat mode, etc…
player player state changed: paused, stopped, skip track…
skipped current track skipped
Override deprecated MPD playlist command
Find potential albums for “artist”
Fetch all albums for “AlbumArtist” == artist → falls back to “Artist” == artist when no “AlbumArtist” tag is set
Tries to filter some mutli-artists album For instance an album by Artist_A may have a track by Artist_B. Then looking for albums for Artist_B wrongly returns this album.
Fuzzy search of title by an artist