Commit 06fb0bb 1 parent 851dab2 commit 06fb0bb Copy full SHA for 06fb0bb
File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ Module.register('MMM-Sonos', {
8
8
defaults : {
9
9
showStoppedRoom : true ,
10
10
showAlbumArt : true ,
11
+ albumArtLocation : 'right' ,
11
12
showRoomName : true ,
12
13
animationSpeed : 1000 ,
13
14
updateInterval : 0.5 , // every 0.5 minutes
@@ -96,7 +97,10 @@ Module.register('MMM-Sonos', {
96
97
return {
97
98
flip : this . data . position . startsWith ( 'left' ) ,
98
99
loaded : this . loaded ,
99
- showAlbumArt : this . config . showAlbumArt ,
100
+ showAlbumArtRight :
101
+ this . config . showAlbumArt && this . config . albumArtLocation !== 'left' ,
102
+ showAlbumArtLeft :
103
+ this . config . showAlbumArt && this . config . albumArtLocation === 'left' ,
100
104
showRoomName : this . config . showRoomName ,
101
105
showStoppedRoom : this . config . showStoppedRoom ,
102
106
roomList : this . roomList ,
Original file line number Diff line number Diff line change 5
5
{% if room .state == ' PLAYING' or showStoppedRoom %}
6
6
<li >
7
7
<div >
8
+ {% if showAlbumArtLeft %}
9
+ <div class =" art" >
10
+ <img src =" {{ room.albumArt }}" />
11
+ </div >
12
+ {% endif %}
8
13
<div class =" name normal medium" >
9
14
<div >{{ room .artist }} </div >
10
15
<div >{{ room .track }} </div >
11
16
</div >
12
- {% if showAlbumArt %}
17
+ {% if showAlbumArtRight %}
13
18
<div class =" art" >
14
19
<img src =" {{ room.albumArt }}" />
15
20
</div >
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ You also can set some options to hide different parts of the module.
55
55
| ---| ---| ---|
56
56
| ` showStoppedRoom ` | Trigger the visualization of stopped rooms.| ` true ` |
57
57
| ` showAlbumArt ` | Trigger the visualization of the album art.| ` true ` |
58
+ | ` albumArtLocation ` | Specifies on which side of the text the album art is rendered. Possible values: ` left ` , ` right ` .| ` right ` |
58
59
| ` showRoomName ` | Trigger the visualization of the room name.| ` true ` |
59
60
60
61
### Known Issues
You can’t perform that action at this time.
0 commit comments