示例#1
0
 public function doGet(JsonResponse $response, $track_id, $artist, $album)
 {
     $scrobbler = new AudioScrobbler();
     $cover = $scrobbler->getAlbumCover($artist, $album);
     if ($cover->nonEmpty()) {
         $response->write(Songs::changeCover($track_id, $cover->get()));
     } else {
         throw new ControllerException("Artwork not found");
     }
 }