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_album('Nirvana', 'Nevermind')
55 Returns a list of Track objects
57 raise NotImplementedError
59 def find_albums(self, artist):
61 Find albums by artist's name
62 >>> player.find_alums('Nirvana')
64 Returns a list of string objects
66 raise NotImplementedError
68 def fuzzy_find(self, artist):
70 Find artists based on a fuzzy search in the media library
71 >>> bea = player.fuzzy_find('beatles')
75 Returns a list of strings (artist names)
77 raise NotImplementedError
80 """Closing client connection with the Player
82 raise NotImplementedError
85 """Connect client to the Player
87 raise NotImplementedError
90 # vim: ai ts=4 sw=4 sts=4 expandtab