fix repeated automatic attempts to cast to a device

This commit is contained in:
dkanada 2019-06-19 05:02:21 -07:00
parent b61a5b53e5
commit abd0b0130f
2 changed files with 37 additions and 92 deletions

View file

@ -919,14 +919,10 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
events.trigger(self, 'pairing');
promise.then(function () {
events.trigger(self, 'paired');
setCurrentPlayerInternal(player, targetInfo);
}, function () {
events.trigger(self, 'pairerror');
if (currentPairingId === targetInfo.id) {
currentPairingId = null;
}