1 # -*- coding: utf-8 -*-
4 # Add decorator to filter through history?
7 #from sima.lib.track import Track
12 """Player interface to inherit from.
14 When querying player music library for tracks, Player instance *must* return
15 Track objects (usually a list of them)
23 """Monitor player for change
25 * database player media library has changed
26 * playlist playlist modified
27 * options player options changed: repeat mode, etc…
28 * player player state changed: paused, stopped, skip track…
30 raise NotImplementedError
32 def remove(self, position=0):
33 """Removes the oldest element of the playlist (index 0)
35 raise NotImplementedError
37 def find_track(self, artist, title=None):
39 Find tracks for a specific artist or filtering with a track title
40 >>> player.find_track('The Beatles')
41 >>> player.find_track('Nirvana', title='Smells Like Teen Spirit')
43 Returns a list of Track objects
45 raise NotImplementedError
47 def find_album(self, artist, album):
49 Find tracks by track's album name
50 >>> player.find_track('Nirvana', 'Nevermind')
52 Returns a list of Track objects
56 """Closing client connection with the Player
58 raise NotImplementedError
61 """Connect client to the Player
63 raise NotImplementedError
66 # vim: ai ts=4 sw=4 sts=4 expandtab