1 # -*- coding: utf-8 -*-
3 def fanarttv_albumart(data
):
9 for mbid
, art
in data
['albums'].items():
10 if 'albumcover' in art
:
11 for thumb
in art
['albumcover']:
13 thumbdata
['image'] = thumb
['url']
14 thumbdata
['preview'] = thumb
['url'].replace('/fanart/', '/preview/')
15 thumbdata
['aspect'] = 'thumb'
16 thumbs
.append(thumbdata
)
18 for cdart
in art
['cdart']:
20 extradata
['image'] = cdart
['url']
21 extradata
['preview'] = cdart
['url'].replace('/fanart/', '/preview/')
22 extradata
['aspect'] = 'discart'
23 extras
.append(extradata
)
24 # support for multi-disc albums
27 multidata
['image'] = cdart
['url']
28 multidata
['preview'] = cdart
['url'].replace('/fanart/', '/preview/')
29 multidata
['aspect'] = 'discart%s' % num
31 discs
[num
] = [multidata
]
33 discs
[num
].append(multidata
)
35 albumdata
['thumb'] = thumbs
36 # only return for multi-discs, not single discs
38 for k
, v
in discs
.items():
42 albumdata
['extras'] = extras