Merge pull request #2 from codenift/artwork

Artwork
This commit is contained in:
Codenift 2019-09-20 13:38:46 -04:00 committed by GitHub
commit 9f3badd1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 913 additions and 173 deletions

View file

@ -126,10 +126,29 @@ function updatePlaybar(){
}
if (currentSong !== null && !master_dj_on_air && !live_dj_on_air){
if (currentSong.record == "1")
if (currentSong.record == "1") {
$('#current').html("<span style='color:red; font-weight:bold'>"+$.i18n._("Recording:")+"</span>"+currentSong.name+",");
else
} else {
$('#current').text(currentSong.name+",");
if (currentSong.metadata.artwork_data) {
var check_current_song = Cookies.get('current_track');
var loaded = Cookies.get('loaded');
if (check_current_song != currentSong.name) {
$('#now-playing-artwork_containter').html("<img height='75' width='75' class'artwork' src='"+ currentSong.metadata.artwork_data +"' />");
Cookies.remove('current_track');
Cookies.set('current_track', currentSong.name);
}
// makes sure it stays updated with current track if page loads
if (loaded != UNIQID) {
Cookies.remove('current_track');
Cookies.remove('loaded');
Cookies.set('loaded', UNIQID);
}
}
}
}else{
if (master_dj_on_air) {
if (showName) {