I edited the coming, playing and recent php pages to show album art for types S, A, N & V.
However, some of these audios have no album art and when they play the default (type S) album image shows.
What would a PHP code look like to differentiate audio type and display different default album art based on type?
My PHP is a bit rusty... does the logic go kind of like this?
If song has picture, display it.
else If empty picture and song type A display defaultads.jpg
else If empty picture and song type N display defaultnews.jpg
else If empty picture and song type V display defaultinterviews.jpg
else display default.jpg (this will display for type S and any other type)
Am I close with how to format this? And if so, how would the php look like?
I imagine the file class.song.php is the one to edit? I only see the following in around line 367:
Code:
protected function set_picture($song) {
$picture = PICTURE_URL_NA;
if (!empty($song['PICTURE'])) {
$picture = PICTURE_URL . $song['PICTURE'];
$this->haspicture = true;
}
$this->picture = $picture;
}
No idea how to make this happen.
Any reply to guide me in the right direction is most appreciated.
Thank you.