Skip to content

Commit

Permalink
added artist name swapping
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed May 5, 2024
1 parent b3812e0 commit 7febded
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/Playlists.php
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,11 @@ public function emitTopPlays() {
$topPlays = Engine::api(IPlaylist::class)->getTopPlays(0, $days, $limit);
Engine::api(ILibrary::class)->markAlbumsReviewed($topPlays);

foreach($topPlays as &$entry) {
if($entry['tag'] && substr($entry['artist'], 0, 7) != "[coll]:")
$entry['artist'] = PlaylistEntry::swapNames($entry['artist']);
}

$this->setTemplate('airplay.html');
$this->addVar('days', $days);
$this->addVar('limit', $limit);
Expand Down

0 comments on commit 7febded

Please sign in to comment.