core: Add last_modified to track model

This commit is contained in:
Thomas Adamcik 2013-05-19 23:47:53 +02:00
parent bdbe2b32ae
commit b3b41240a1

View File

@ -231,6 +231,8 @@ class Track(ImmutableObject):
:type bitrate: integer
:param musicbrainz_id: MusicBrainz ID
:type musicbrainz_id: string
:param last_modified: integer representing last modifcation time
:type last_modified: integer
"""
#: The track URI. Read-only.
@ -263,6 +265,10 @@ class Track(ImmutableObject):
#: The MusicBrainz ID of the track. Read-only.
musicbrainz_id = None
#: Integer representing when the track was last modified, exact meaning
#: depends on source of track.
last_modified = 0
def __init__(self, *args, **kwargs):
self.__dict__['artists'] = frozenset(kwargs.pop('artists', []))
super(Track, self).__init__(*args, **kwargs)