Skip to content

Commit

Permalink
Merge pull request #117 from joalla/artists_sort
Browse files Browse the repository at this point in the history
Add attribute artists_sort to Release class
  • Loading branch information
JOJ0 authored Sep 25, 2022
2 parents a3736e3 + dc6ed5b commit 8825a2f
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions discogs_client/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,26 +483,33 @@ def __repr__(self):


class Release(PrimaryAPIObject):
id = SimpleField()
title = SimpleField()
year = SimpleField()
thumb = SimpleField()
data_quality = SimpleField()
status = SimpleField()
genres = SimpleField()
images = SimpleField()
country = SimpleField()
notes = SimpleField()
formats = SimpleField()
styles = SimpleField()
url = SimpleField(key='uri')
videos = ListField('Video')
tracklist = ListField('Track')
"""An object describing a Discogs release."""
id = SimpleField() #:
title = SimpleField() #:
year = SimpleField() #:
thumb = SimpleField() #:
data_quality = SimpleField() #:
status = SimpleField() #:
genres = SimpleField() #:
images = SimpleField() #:
country = SimpleField() #:
notes = SimpleField() #:
formats = SimpleField() #:
styles = SimpleField() #:
url = SimpleField(key='uri') #:
videos = ListField('Video') #:
tracklist = ListField('Track') #:
#: A list of ``Artist`` objects. Even though a release could be by one
#: artist only, this will always be a list.
artists = ListField('Artist')
credits = ListField('Artist', key='extraartists')
labels = ListField('Label')
companies = ListField('Label')
community = ObjectField("communitydetails")
#: On multi-artist releases this attribute provides a string containing
#: artists joined together with keywords like "And", "Feat", "Vs", ...
#: Eg. "DJ ABC Feat MC Z".
artists_sort = SimpleField()
credits = ListField('Artist', key='extraartists') #:
labels = ListField('Label') #:
companies = ListField('Label') #:
community = ObjectField("communitydetails") #:

def __init__(self, client, dict_):
super(Release, self).__init__(client, dict_)
Expand Down

0 comments on commit 8825a2f

Please sign in to comment.