1 # -*- coding: utf-8 -*-
4 # Add decorator to filter through history?
6 # standart library import
10 #from sima.lib.track import Track
15 """Player interface to inherit from.
17 When querying player music library for tracks, Player instance *must* return
18 Track objects (usually a list of them)
23 self.log = logging.getLogger('sima')
26 """Monitor player for change
28 * database player media library has changed
29 * playlist playlist modified
30 * options player options changed: repeat mode, etc…
31 * player player state changed: paused, stopped, skip track…
33 raise NotImplementedError
35 def remove(self, position=0):
36 """Removes the oldest element of the playlist (index 0)
38 raise NotImplementedError
40 def find_track(self, artist, title=None):
42 Find tracks for a specific artist or filtering with a track title
43 >>> player.find_track('The Beatles')
44 >>> player.find_track('Nirvana', title='Smells Like Teen Spirit')
46 Returns a list of Track objects
48 raise NotImplementedError
50 def find_album(self, artist, album):
52 Find tracks by track's album name
53 >>> player.find_track('Nirvana', 'Nevermind')
55 Returns a list of Track objects
58 def fuzzy_find(self, artist):
60 Find artists based on a fuzzy search in the media library
61 >>> bea = player.fuzzy_find('beatles')
65 Returns a list of strings (artist names)
67 raise NotImplementedError
70 """Closing client connection with the Player
72 raise NotImplementedError
75 """Connect client to the Player
77 raise NotImplementedError
80 # vim: ai ts=4 sw=4 sts=4 expandtab