]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/player.py
Add copyright headers & clean-up
[mpd-sima.git] / sima / lib / player.py
index 726b0b632c515de7798017245409c876dbad1ebf..ddba0a9bea46357e94ec2f5bc6a1ebef7b19f6fd 100644 (file)
@@ -1,9 +1,27 @@
 # -*- coding: utf-8 -*-
+# Copyright (c) 2009-2014 Jack Kaliko <jack@azylum.org>
+#
+#  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 <http://www.gnu.org/licenses/>.
+#
+#
 
 # TODO:
 # Add decorator to filter through history?
 
-# standart library import
+# standard library import
 import logging
 
 # local import
@@ -16,6 +34,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 +76,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']