This commit is contained in:
crusader 2018-10-13 03:39:25 +09:00
parent cb1265d4e6
commit 9c26a774bc
2 changed files with 14 additions and 3 deletions

View File

@ -31,6 +31,10 @@ var (
"urn:schemas-upnp-org:device:MediaRenderer:3": omm.MetaHostTypeEnumMediaServer, "urn:schemas-upnp-org:device:MediaRenderer:3": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaServer:4": omm.MetaHostTypeEnumMediaServer, "urn:schemas-upnp-org:device:MediaServer:4": omm.MetaHostTypeEnumMediaServer,
"urn:schemas-upnp-org:device:MediaRenderer:4": omm.MetaHostTypeEnumMediaServer, "urn:schemas-upnp-org:device:MediaRenderer:4": omm.MetaHostTypeEnumMediaServer,
"urn:dial-multiscreen-org:device:dial:1": omm.MetaHostTypeEnumMultiScreen,
"urn:dial-multiscreen-org:device:dial:2": omm.MetaHostTypeEnumMultiScreen,
"urn:schemas-upnp-org:device:ScreenDevice:1": omm.MetaHostTypeEnumMultiScreen,
"urn:schemas-upnp-org:device:ScreenDevice:2": omm.MetaHostTypeEnumMultiScreen,
} }
) )

View File

@ -710,6 +710,13 @@ func (ds *ofDiscoverySession) addtionalHost(discoveredBy *omm.MetaDiscovererType
} }
} }
if "" != h.HostVendor && "" != h.HostModel {
if "Synology" == h.HostVendor && strings.Contains(h.HostModel, "DS") {
h.HostType = omm.MetaHostTypeEnumNAS.String()
modified = true
}
}
return return
} }
@ -727,9 +734,9 @@ func (ds *ofDiscoverySession) addtionalHostMDNS(host *omd.Host, meta map[string]
if ok || "" != _model { if ok || "" != _model {
h.HostModel = _model h.HostModel = _model
// if "Synology" == _vendor && strings.Contains(_model, "DS1817+") { // if "Synology" == _vendor && strings.Contains(_model, "DS1817+") {
if "Synology" == _vendor && strings.Contains(_model, "DS") { // if "Synology" == _vendor && strings.Contains(_model, "DS") {
h.HostType = omm.MetaHostTypeEnumNAS.String() // h.HostType = omm.MetaHostTypeEnumNAS.String()
} // }
modified = true modified = true
} }