Continued Modification for Snakeice64
-
OK Snakeice64, i’ve added the features you wanted, this is a continuation of the edits i suggested in this thread
!!!!! WARNING !!!!!
These edits will NOT work unless you have completed the edit in the above mentioned thread!!These edits add album art to the widgets (queued, recent, requested etc)
——————–=[ THE EDITS ]=——————–To get album art on the widgets, do these edits:
FILE: functions.php
FIND: function build_upcoming_tracks_query THEN FIND: $sanitized_sam_query = $samdb->prepare( "SELECT songlist.ID AS songid INLINE EDIT: AFTER: songlist.duration, ADD: songlist.picture, RESULT: songlist.artist, songlist.duration,songlist.picture, queuelist.requestID AS requestIDFIND: function build_recently_played_query THEN FIND: $sanitized_sam_query = $samdb->prepare( "SELECT songlist.ID AS songid INLINE EDIT: AFTER: songlist.duration, ADD: songlist.picture, RESULT: songlist.artist, songlist.duration, songlist.picture, historylist.requestID AS requestID,FIND:function prepare_widget_song( $song ) { EDIT: under $title = ''; ADD: //ADD ALBUM ART! $album = ''; $album = $song->picture; if ( empty( $album ) ) { $album = 'NA.gif'; } //End Album Art!CLOSE FILE
FILE: widgets.php
REPLACE:$output = $output.'<td>'.$song_info['artist'].'<br />'.$song_info['title']; REPLACE WITH:$output = $output.'<td><img src="/sam/'.$song_info['album'].'" height="30" width="30">'.$song_info['artist'].'<br />'.$song_info['title'];REPLACE:$output = $output.'<td>'.$song_info['artist'].'<br />'.$song_info['title'].'</td>'; REPLACE WITH:$output = $output.'<td><img src="/sam/'.$song_info['album'].'" height="30" width="30">'.$song_info['artist'].'<br />'.$song_info['title'].'</td>';REPLACE:$output = $output.'<td>'.( 0 == $row_number ? '<strong>' : '').$song_info['artist'].'<br />'.$song_info['title']; REPLACE WITH:$output = $output.'<td>'.( 0 == $row_number ? '<strong>' : '').'<img src="/sam/'.$song_info['album'].'" height="30" width="30">'.$song_info['artist'].'<br />'.$song_info['title'];I hope these edits work the way you wanted. You can customize the size of the album art in the widgets by changing teh 30 x 30 in each line of the widgets.php edits
Enjoy 🙂
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
The topic ‘Continued Modification for Snakeice64’ is closed to new replies.