Searchin devices is not consistent
Hello,
When I search devices several times, than sometimes the searched devices show as 'a' and sometimes as 'x' with --all parameter. Sometimes they are randomly missing too. ex:
python2 dlnap.py --all
Discovered devices:
[a] Kodi (LibreELEC) @ 192.168.1.20
[a] Volumio @ 192.168.1.29
[a] Marantz M-CR611 @ 192.168.1.26
python2 dlnap.py --all
Discovered devices:
[a] Kodi (LibreELEC) @ 192.168.1.20
[a] Volumio @ 192.168.1.29
[a] Marantz M-CR611 @ 192.168.1.26
python2 dlnap.py --all
Discovered devices:
[a] Marantz M-CR611 @ 192.168.1.26
[a] Volumio @ 192.168.1.29
[x] Kodi (LibreELEC) @ 192.168.1.20
python2 dlnap.py --all
Discovered devices:
[a] Volumio @ 192.168.1.29
[a] Marantz M-CR611 @ 192.168.1.26
[kamil@kamildesktop dlnap]$ python2 dlnap.py --all
Discovered devices:
[a] Marantz M-CR611 @ 192.168.1.26
[a] Volumio @ 192.168.1.29
[a] Kodi (LibreELEC) @ 192.168.1.20
Hi!
Thanks for using dlnap :)
It requires some time for devices to receive discover request and send response back to script, so it can happen that default timeout is not enough. You can easily increase discover timeout with --timeout argument.
By default dlnap.py discovers supported only devices via sending special request. Only devices with AVTransport feature are replying. In case of --all argument all devices sends their information back to script. Script extracts AVTransport information from device description xml. It is really magic for me now, but some devices (e.g my Samsung TV) misses such information sometime.
I'll try to investigate this issue when possible.
Thanks for reporting this :)
Didnt notice a parameter for it and was changeing inside the code :). With --timeout 3 I am getting about 100% of accuraccy. With timeout 1 about 20%. Maybe it should be higer by default?
Personally I never felt in timeout issue due to using --ip argument. Anyway it is a good idea to increase default timeout, I'll change it while next commit.