1 # -*- coding: utf-8 -*-
4 # Add decorator to filter through history?
6 from sima.lib.track import Track
11 """Player interface to inherit from.
13 When querying palyer music library for tracks, Player instance *must* return
14 Track objects (usually a list of them)
22 """Monitor player for change
24 * database player media library has changed
25 * playlist playlist modified
26 * options player options changed: repeat mode, etc…
27 * player player state changed: paused, stopped, skip track…
29 raise NotImplementedError
31 def remove(self, position=0):
32 """Removes the oldest element of the playlist (index 0)
34 raise NotImplementedError
36 def find_track(self, artist, title=None):
38 Find tracks for a specific artist or filtering with a track title
39 >>> player.find_track('The Beatles')
40 >>> player.find_track('Nirvana', title='Smells Like Teen Spirit')
42 Returns a list of Track objects
44 raise NotImplementedError
46 def find_album(self, artist, album):
48 Find tracks by track's album name
49 >>> player.find_track('Nirvana', 'Nevermind')
51 Returns a list of Track objects
55 """Closing client connection with the Player
57 raise NotImplementedError
60 """Connect client to the Player
62 raise NotImplementedError
65 # vim: ai ts=4 sw=4 sts=4 expandtab