Skip to content

Commit

Permalink
Improve error handling in playLineIn()
Browse files Browse the repository at this point in the history
Signed-off-by: Karel Goderis <[email protected]>
  • Loading branch information
kgoderis committed Feb 7, 2015
1 parent 69a755e commit b490af2
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,18 +1245,21 @@ public void playLineIn(Command command) {
ZonePlayerHandler coordinatorHandler = getHandlerByName(coordinatorUDN);
ZonePlayerHandler remoteHandler = getHandlerByName(remotePlayerName);

// stop whatever is currently playing
coordinatorHandler.stop();
if(coordinatorHandler!=null && remoteHandler!=null) {

// set the URI
coordinatorHandler.setCurrentURI("x-rincon-stream:"
+ remoteHandler.getConfig().get(UDN), "");
// stop whatever is currently playing
coordinatorHandler.stop();

// take the system off mute
coordinatorHandler.setMute(OnOffType.OFF);
// set the URI
coordinatorHandler.setCurrentURI("x-rincon-stream:"
+ remoteHandler.getConfig().get(UDN), "");

// start jammin'
coordinatorHandler.play();
// take the system off mute
coordinatorHandler.setMute(OnOffType.OFF);

// start jammin'
coordinatorHandler.play();
}
}
}

Expand Down

0 comments on commit b490af2

Please sign in to comment.