From d1a42d95f1802c02a8633b70095cfbff541e2aa4 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 30 Oct 2012 09:56:26 +0100 Subject: [PATCH] Add Album.date attribute --- docs/changes.rst | 3 +++ mopidy/models.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index c88027bd..94779cc0 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -67,6 +67,9 @@ backends: it completed the calibration first, and then quit, which could take more than 15 seconds. +- Added :attr:`mopidy.models.Album.date` attribute. It has the same format as + the existing :attr:`mopidy.models.Track.date`. + **Bug fixes** - :issue:`213`: Fix "streaming task paused, reason not-negotiated" errors diff --git a/mopidy/models.py b/mopidy/models.py index a8edfde2..77561fe3 100644 --- a/mopidy/models.py +++ b/mopidy/models.py @@ -120,6 +120,8 @@ class Album(ImmutableObject): :type artists: list of :class:`Artist` :param num_tracks: number of tracks in album :type num_tracks: integer + :param date: album release date (YYYY or YYYY-MM-DD) + :type date: string :param musicbrainz_id: MusicBrainz ID :type musicbrainz_id: string """ @@ -136,6 +138,9 @@ class Album(ImmutableObject): #: The number of tracks in the album. Read-only. num_tracks = 0 + #: The album release date. Read-only. + date = None + #: The MusicBrainz ID of the album. Read-only. musicbrainz_id = None