X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fplayer.py;h=6b6d2cba4dec19ff4cd19039f9a1ac4c3c8ced9e;hb=78a694ddcd2a6ecc8b2b1fd3c74ee2d938707305;hp=ea84a648632a2ae76b36811a651517e69dc5d62d;hpb=ab9952e0258426133f6bb0fe6395ec7464dfdd33;p=mpd-sima.git diff --git a/sima/lib/player.py b/sima/lib/player.py index ea84a64..6b6d2cb 100644 --- a/sima/lib/player.py +++ b/sima/lib/player.py @@ -1,9 +1,27 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2009-2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# # TODO: # Add decorator to filter through history? -# standart library import +# standard library import import logging # local import @@ -11,11 +29,18 @@ import logging class Player(object): - """Player interface to inherit from. 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): @@ -65,10 +90,10 @@ class Player(object): """ 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']