Switch to unified view

a/src/mediaserver/cdplugins/tidal/tidalapi/models.py b/src/mediaserver/cdplugins/tidal/tidalapi/models.py
...
...
28
    def __init__(self, **kwargs):
28
    def __init__(self, **kwargs):
29
        self.__dict__.update(kwargs)
29
        self.__dict__.update(kwargs)
30
30
31
31
32
class Album(Model):
32
class Album(Model):
33
    upnpclass = "object.container.album.musicAlbum"
33
    artist = None
34
    artist = None
34
    artists = []
35
    artists = []
35
    num_tracks = -1
36
    num_tracks = -1
36
    duration = -1
37
    duration = -1
37
    release_date = None
38
    release_date = None
...
...
40
    def image(self, width=512, height=512):
41
    def image(self, width=512, height=512):
41
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='albumid')
42
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='albumid')
42
43
43
44
44
class Artist(Model):
45
class Artist(Model):
46
    upnpclass = "object.container.person.musicArtist"
45
    role = None
47
    role = None
46
48
47
    @property
49
    @property
48
    def image(self, width=512, height=512):
50
    def image(self, width=512, height=512):
49
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='artistid')
51
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='artistid')
50
52
51
53
52
class Playlist(Model):
54
class Playlist(Model):
55
    upnpclass = "object.container.album"
53
    description = None
56
    description = None
54
    creator = None
57
    creator = None
55
    type = None
58
    type = None
56
    is_public = None
59
    is_public = None
57
    created = None
60
    created = None
...
...
63
    def image(self, width=512, height=512):
66
    def image(self, width=512, height=512):
64
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='uuid')
67
        return IMG_URL.format(width=width, height=height, id=self.id, id_type='uuid')
65
68
66
69
67
class Track(Model):
70
class Track(Model):
71
    upnpclass = "object.item.audioItem.musicTrack"
68
    duration = -1
72
    duration = -1
69
    track_num = -1
73
    track_num = -1
70
    disc_num = 1
74
    disc_num = 1
71
    popularity = -1
75
    popularity = -1
72
    artist = None
76
    artist = None