Skip to content

Commit 8825a2f

Browse files
authored
Merge pull request #117 from joalla/artists_sort
Add attribute artists_sort to Release class
2 parents a3736e3 + dc6ed5b commit 8825a2f

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

discogs_client/models.py

+26-19
Original file line numberDiff line numberDiff line change
@@ -483,26 +483,33 @@ def __repr__(self):
483483

484484

485485
class Release(PrimaryAPIObject):
486-
id = SimpleField()
487-
title = SimpleField()
488-
year = SimpleField()
489-
thumb = SimpleField()
490-
data_quality = SimpleField()
491-
status = SimpleField()
492-
genres = SimpleField()
493-
images = SimpleField()
494-
country = SimpleField()
495-
notes = SimpleField()
496-
formats = SimpleField()
497-
styles = SimpleField()
498-
url = SimpleField(key='uri')
499-
videos = ListField('Video')
500-
tracklist = ListField('Track')
486+
"""An object describing a Discogs release."""
487+
id = SimpleField() #:
488+
title = SimpleField() #:
489+
year = SimpleField() #:
490+
thumb = SimpleField() #:
491+
data_quality = SimpleField() #:
492+
status = SimpleField() #:
493+
genres = SimpleField() #:
494+
images = SimpleField() #:
495+
country = SimpleField() #:
496+
notes = SimpleField() #:
497+
formats = SimpleField() #:
498+
styles = SimpleField() #:
499+
url = SimpleField(key='uri') #:
500+
videos = ListField('Video') #:
501+
tracklist = ListField('Track') #:
502+
#: A list of ``Artist`` objects. Even though a release could be by one
503+
#: artist only, this will always be a list.
501504
artists = ListField('Artist')
502-
credits = ListField('Artist', key='extraartists')
503-
labels = ListField('Label')
504-
companies = ListField('Label')
505-
community = ObjectField("communitydetails")
505+
#: On multi-artist releases this attribute provides a string containing
506+
#: artists joined together with keywords like "And", "Feat", "Vs", ...
507+
#: Eg. "DJ ABC Feat MC Z".
508+
artists_sort = SimpleField()
509+
credits = ListField('Artist', key='extraartists') #:
510+
labels = ListField('Label') #:
511+
companies = ListField('Label') #:
512+
community = ObjectField("communitydetails") #:
506513

507514
def __init__(self, client, dict_):
508515
super(Release, self).__init__(client, dict_)

0 commit comments

Comments
 (0)