X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fplayer.py;h=cb562b5f9a3735d4a6edc2f72f3d6e15a6f1f0d1;hb=2eb13c85fe72ade75193b589748920615fbb22d2;hp=751e464ba7a3c551aabf3ff0dd2c974028fb3e82;hpb=8ce90ac30d1daa9bcf2ced0aa06c8c59302f71ca;p=mpd-sima.git diff --git a/sima/lib/player.py b/sima/lib/player.py index 751e464..cb562b5 100644 --- a/sima/lib/player.py +++ b/sima/lib/player.py @@ -1,17 +1,35 @@ # -*- 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? # standard library import import logging +from difflib import get_close_matches # local import -#from sima.lib.track import Track - +from .simastr import SimaStr +from ..utils.leven import levenshtein_ratio class Player(object): - """Player interface to inherit from. When querying player music library for tracks, Player instance *must* return @@ -23,7 +41,6 @@ class Player(object): * current * queue * playlist - * """ def __init__(self): @@ -40,6 +57,10 @@ class Player(object): """ raise NotImplementedError + def clean(self): + """Any cleanup necessary""" + pass + def remove(self, position=0): """Removes the oldest element of the playlist (index 0) """