Example #1
0
 private function getSearchQuery(TrackInfo $info)
 {
     $addArtistName = function ($artistNames, Artist $artist) {
         return $artistNames . $artist->getName();
     };
     $artistNames = array_reduce($info->getArtists(), $addArtistName, '');
     return $info->getName() . ' ' . $artistNames;
 }
Example #2
0
 public function onProgress($current, $total, TrackInfo $currentItem)
 {
     echo sprintf("[%s/%s] Syncing %s \n", $current, $total, $currentItem->toString());
 }