better default order
This commit is contained in:
parent
d37992e292
commit
910a44ea1f
1 changed files with 6 additions and 7 deletions
|
@ -48,11 +48,11 @@ from collections import OrderedDict
|
||||||
from aioupnp.constants import SSDP_DISCOVER, SSDP_HOST
|
from aioupnp.constants import SSDP_DISCOVER, SSDP_HOST
|
||||||
|
|
||||||
SEARCH_TARGETS = [
|
SEARCH_TARGETS = [
|
||||||
'ssdp:all'
|
|
||||||
'urn:schemas-upnp-org:device:InternetGatewayDevice:1',
|
|
||||||
'upnp:rootdevice',
|
'upnp:rootdevice',
|
||||||
|
'urn:schemas-upnp-org:device:InternetGatewayDevice:1',
|
||||||
'urn:schemas-wifialliance-org:device:WFADevice:1',
|
'urn:schemas-wifialliance-org:device:WFADevice:1',
|
||||||
'urn:schemas-upnp-org:device:WANDevice:1',
|
'urn:schemas-upnp-org:device:WANDevice:1',
|
||||||
|
'ssdp:all'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,16 +69,15 @@ def format_packet_args(order: list, **kwargs):
|
||||||
def packet_generator():
|
def packet_generator():
|
||||||
for st in SEARCH_TARGETS:
|
for st in SEARCH_TARGETS:
|
||||||
order = ["HOST", "MAN", "MX", "ST"]
|
order = ["HOST", "MAN", "MX", "ST"]
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
|
||||||
yield format_packet_args(order, Host=SSDP_HOST, Man=SSDP_DISCOVER, MX=1, ST=st)
|
|
||||||
yield format_packet_args(order, Host=SSDP_HOST, Man='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
yield format_packet_args(order, Host=SSDP_HOST, Man='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
yield format_packet_args(order, Host=SSDP_HOST, Man=SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
|
||||||
order = ["HOST", "MAN", "ST", "MX"]
|
order = ["HOST", "MAN", "ST", "MX"]
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
|
||||||
order = ["HOST", "ST", "MAN", "MX"]
|
order = ["HOST", "ST", "MAN", "MX"]
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
|
||||||
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN='"%s"' % SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
yield format_packet_args(order, HOST=SSDP_HOST, MAN=SSDP_DISCOVER, MX=1, ST=st)
|
||||||
|
|
Loading…
Reference in a new issue