mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 15:03:22 +01:00
Change log for #316 and code style tweaks.
This commit is contained in:
parent
0009c51577
commit
42efd2a761
2 changed files with 12 additions and 9 deletions
|
|
@ -68,7 +68,7 @@ class BeatportSearch(object):
|
|||
release_type = None
|
||||
|
||||
def __unicode__(self):
|
||||
return u"<BeatportSearch for {0} \"{1}\" with {2} results>".format(
|
||||
return u'<BeatportSearch for {0} "{1}" with {2} results>'.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"<BeatportRelease: {0} - {1} ({2})>".format(
|
||||
artist_str, self.name,
|
||||
self.catalog_number
|
||||
)
|
||||
return u"<BeatportRelease: {0} - {1} ({2})>".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"<BeatportTrack: {0} - {1} ({2})>".format(
|
||||
artist_str, self.name, self.mix_name)
|
||||
return u"<BeatportTrack: {0} - {1} ({2})>".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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
--------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue