X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fplayer.py;h=751e464ba7a3c551aabf3ff0dd2c974028fb3e82;hb=8ce90ac3;hp=726b0b632c515de7798017245409c876dbad1ebf;hpb=c660efb577c11bde6229d37550bf197fa6bae3e4;p=mpd-sima.git diff --git a/sima/lib/player.py b/sima/lib/player.py index 726b0b6..751e464 100644 --- a/sima/lib/player.py +++ b/sima/lib/player.py @@ -3,7 +3,7 @@ # TODO: # Add decorator to filter through history? -# standart library import +# standard library import import logging # local import @@ -16,6 +16,14 @@ class Player(object): When querying player music library for tracks, Player instance *must* return Track objects (usually a list of them) + + Player instance should expose the following immutable attributes: + * artists + * state + * current + * queue + * playlist + * """ def __init__(self): @@ -50,15 +58,25 @@ class Player(object): def find_album(self, artist, album): """ Find tracks by track's album name - >>> player.find_track('Nirvana', 'Nevermind') + >>> player.find_album('Nirvana', 'Nevermind') Returns a list of Track objects """ + raise NotImplementedError + + def find_albums(self, artist): + """ + Find albums by artist's name + >>> player.find_alums('Nirvana') + + Returns a list of string objects + """ + raise NotImplementedError - def fuzzy_find(self, artist): + def fuzzy_find_artist(self, artist): """ Find artists based on a fuzzy search in the media library - >>> bea = player.fuzzy_find('beatles') + >>> bea = player.fuzzy_find_artist('beatles') >>> print(bea) >>> ['The Beatles']