From 42efd2a7618f8ce3dc5056e906164d334d713615 Mon Sep 17 00:00:00 2001 From: Tai Lee Date: Sat, 8 Jun 2013 00:32:40 +1000 Subject: [PATCH] Change log for #316 and code style tweaks. --- beetsplug/beatport.py | 17 ++++++++--------- docs/changelog.rst | 4 ++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/beetsplug/beatport.py b/beetsplug/beatport.py index 8a80fb5ac..158cec09c 100644 --- a/beetsplug/beatport.py +++ b/beetsplug/beatport.py @@ -68,7 +68,7 @@ class BeatportSearch(object): release_type = None def __unicode__(self): - return u"".format( + return u''.format( self.release_type, self.query, len(self.results)) def __init__(self, query, release_type='release', details=True): @@ -97,10 +97,9 @@ class BeatportRelease(BeatportObject): artist_str = ", ".join(x[1] for x in self.artists) else: artist_str = "Various Artists" - return u"".format( - artist_str, self.name, - self.catalog_number - ) + return u"".format(artist_str, + self.name, + self.catalog_number) def __init__(self, data): BeatportObject.__init__(self, data) @@ -131,8 +130,8 @@ class BeatportTrack(BeatportObject): def __unicode__(self): artist_str = ", ".join(x[1] for x in self.artists) - return u"".format( - artist_str, self.name, self.mix_name) + return u"".format(artist_str, self.name, + self.mix_name) def __init__(self, data): BeatportObject.__init__(self, data) @@ -143,8 +142,8 @@ class BeatportTrack(BeatportObject): if 'length' in data: self.length = timedelta(milliseconds=data['lengthMs']) if 'slug' in data: - self.url = "http://beatport.com/track/{0}/{1}".format( - data['slug'], data['id']) + self.url = "http://beatport.com/track/{0}/{1}".format(data['slug'], + data['id']) @classmethod def from_id(cls, beatport_id): diff --git a/docs/changelog.rst b/docs/changelog.rst index d18cca9a7..e7b361a07 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -29,6 +29,10 @@ customize the way that matches are selected: component. The recommendation will be downgraded if a penalty is being applied to the specified field. +And some bug fixes: + +* Python 2.6 compatibility for :doc:`/plugins/beatport`. Thanks Wesley Bitter. + 1.2.0 (June 5, 2013) --------------------