Commit c6fdc5cb authored by ZEN's avatar ZEN

Minor fixes

parent 13ba7494
......@@ -8,10 +8,7 @@ from . import protocol
from . import exceptions
from time import sleep
try:
from Queue import Queue, Empty
except:
from queue import Queue, Empty
from queue import Queue, Empty
from collections import defaultdict
__all__ = ['client', 'protocol', 'exceptions']
......@@ -42,17 +39,19 @@ class FileTags(object):
def __ne__(self, other):
return not self.__eq__(other)
def __bool__(self):
if self.artist and self.title:
return True
return False
def __str__(self):
if self:
album = ''
if len(self.album):
album = '(%s)' % self.album
artist = ''
if len(self.artist):
artist = '%s -' % self.artist
return ' '.join([artist, self.title, album]).strip()
else:
return 'None'
album = ''
if len(self.album):
album = '(%s)' % self.album
artist = ''
if len(self.artist):
artist = '%s -' % self.artist
return ' '.join([artist, self.title, album]).strip()
def __repr__(self):
return '<Track: %s>' % self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment