-
Notifications
You must be signed in to change notification settings - Fork 0
CoverArt
You can use this class to fetch cover art urls from a musicBrainz release or release group ID
This class is included in Title class fetchData() so it will return image urls as well
It can also be used as stand alone class to fetch only cover image urls
$music = new \Music\Cover();
This will fetch cover urls from release or release group ID
@param $id (string) release or release group ID
@param $group (boolean) true: fetches release group urls, false: fetches release urls
Caching can be used, set cache to true in config
Cover Art image urls will be re directed!
Cover Art image urls are converted from http to https to prevent browser warnings
$results = $music->fetchCoverArt($id, false);
@return array (the array is the same for release and release group
[front] => (array) Front coverArt [id] => (string) ID [originalUrl] => (string) Untouched image url [thumbUrl] => (string) thumb image url 250px [mediumUrl] => (string) medium image url 500px [back] => (array) Back coverArt [id] => (string) ID [originalUrl] => (string) Untouched image url [thumbUrl] => (string) thumb image url 250px [mediumUrl] => (string) medium image url 500px