X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fplayer.py;h=726b0b632c515de7798017245409c876dbad1ebf;hb=c660efb577c11bde6229d37550bf197fa6bae3e4;hp=c5c69f86a29f44f57eed9ee6b892a37c24a767f2;hpb=1cc879f39941fc302f9a841a532c9f749797cca4;p=mpd-sima.git diff --git a/sima/lib/player.py b/sima/lib/player.py index c5c69f8..726b0b6 100644 --- a/sima/lib/player.py +++ b/sima/lib/player.py @@ -3,20 +3,24 @@ # TODO: # Add decorator to filter through history? -from sima.lib.track import Track +# standart library import +import logging + +# local import +#from sima.lib.track import Track class Player(object): """Player interface to inherit from. - When querying palyer music library for tracks, Player instance *must* return + When querying player music library for tracks, Player instance *must* return Track objects (usually a list of them) """ def __init__(self): - self.state = {} - self.current = {} + super().__init__() + self.log = logging.getLogger('sima') def monitor(self): """Monitor player for change @@ -51,6 +55,17 @@ class Player(object): Returns a list of Track objects """ + def fuzzy_find(self, artist): + """ + Find artists based on a fuzzy search in the media library + >>> bea = player.fuzzy_find('beatles') + >>> print(bea) + >>> ['The Beatles'] + + Returns a list of strings (artist names) + """ + raise NotImplementedError + def disconnect(self): """Closing client connection with the Player """ @@ -63,4 +78,3 @@ class Player(object): # VIM MODLINE # vim: ai ts=4 sw=4 sts=4 expandtab -