Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute artists_sort to Release class #117

Merged
merged 2 commits into from
Sep 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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