@scrypted/chromecast
Advanced tools
Comparing version 0.1.33 to 0.1.34
{ | ||
"name": "@scrypted/chromecast", | ||
"version": "0.1.33", | ||
"version": "0.1.34", | ||
"description": "Send video, audio, and text to speech notifications to Chromecast and Google Home devices", | ||
@@ -5,0 +5,0 @@ "author": "Scrypted", |
@@ -471,5 +471,13 @@ import util from 'util'; | ||
const host = (service.data as any).target; | ||
let arec = response.additionals.find(check => check.name === host && check.type === 'A'); | ||
if (!arec) | ||
arec = response.additionals.find(check => check.name === host && check.type === 'AAAA'); | ||
if (!arec) { | ||
console.warn('no A/AAAA record found for', additional.name); | ||
continue; | ||
} | ||
const ip = arec.data as string; | ||
const port = (service.data as any).port; | ||
this.onDiscover(id, name, model, host, port); | ||
this.onDiscover(id, name, model, ip, port); | ||
} | ||
@@ -482,3 +490,3 @@ } | ||
onDiscover(id: string, name: string, model: string, host: string, port: number) { | ||
onDiscover(id: string, name: string, model: string, ip: string, port: number) { | ||
@@ -509,3 +517,3 @@ const interfaces = [ | ||
castDevice.device = device; | ||
castDevice.host = host; | ||
castDevice.host = ip; | ||
castDevice.port = port; | ||
@@ -512,0 +520,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
271674
526