Skip to content

Commit

Permalink
Bugfix where zones_seek_changed empties cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Floris Jan Galesloot committed Jul 28, 2020
1 parent 399ac18 commit 07a7b77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion roon-mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ var roon = new RoonApi({
//var regex = '';
if ( zonename ) {
zonename = zonename.replace(/ \+.*/,'');
roon_zones[zonename] = JSON.parse(JSON.stringify(zonedata));
if ( zoneevent !='zones_seek_changed' ) {
// zones_seek_changed only passes seek/queue position. Do not refresh zone cache
roon_zones[zonename] = JSON.parse(JSON.stringify(zonedata));
} else {
roon_zones[zonename].queue_time_remaining = zonedata.queue_time_remaining;
roon_zones[zonename].seek_position = zonedata.seek_position;
}
if ( debug ) { console.log('*** publising(if needed) to zone %s: %s', zonename, JSON.stringify(zonedata)); }
mqtt_publish_JSON( 'roon/'+zonename, mqtt_client, zonedata);
}
Expand Down

0 comments on commit 07a7b77

Please sign in to comment.