Page 1 of 1

Music cdart size always 1000

Posted: Wed Nov 04, 2015 7:27 pm
by stef.an
Hello again, I'm currently checking if i can make use of the V3 API :)
My script retrieves cdart for Kodi and optionally replaces cdart (and other) in the user's filesystem if it is of lower size than the ones available here.
It looks like the V3 API always returns size="1000" even if the image is smaller? Is this a bug or do I misunderstand the size element?

Thanks!

Example:

http://webservice.fanart.tv/v3/music/4b ... ea77431553
Where size is 1000 but the image delivered is only 450px.

Code: Select all

...
"2bc02541-210d-35bf-b465-eb27a1e65c30": {
	"albumcover": [
		{
			"id": "144499",
			"url": "http://assets.fanart.tv/fanart/music/4bd95eea-b9f6-4d70-a36c-cfea77431553/albumcover/nothing-safe-the-best-of-the-box-5495fdc3dc92d.jpg",
			"likes": "1"
		}
	],
	"cdart": [
		{
			"id": "1462",
			"url": "http://assets.fanart.tv/fanart/music/4bd95eea-b9f6-4d70-a36c-cfea77431553/cdart/nothing-safe-the-best-of-the-box-4dd4290c8b794.png",
			"likes": "0",
			"disc": "1",
			"size": "1000"
		}
	]
},
...

Re: Music cdart size always 1000

Posted: Wed Nov 04, 2015 8:28 pm
by Kode
A bit of both from the looks of the code, that was added years ago and it looks like the code checks to see if the image needs replacing (all the small images were marked as need replacing when imported) that label has since been reused and if it's not reporting the smaller ones as need replacing I guess the tag has been accidentally removed (maybe from all of them, not sure), on the new site I have added the size for every image so it wont be an issue, but that doesn't help much right now...