intel / dleyna-control

dLeyna-control is a Digital Media Player written in python to demonstrate how to use the dleyna DMS APIs. It detects Digital Media Servers on the local area network and allows users to browse, search and play their contents.
https://01.org/dleyna/
GNU Lesser General Public License v2.1
8 stars 12 forks source link

[UPnP] Call found_server callback on GetServers() results #29

Closed jku closed 11 years ago

jku commented 11 years ago

This was not needed before as GetServers() results were always handled in init() -- so no callbacks could yet exist. Now with asynchronous GetServers() handling this is no longer true.

Signed-off-by: Jussi Kukkonen jussi.kukkonen@intel.com

markdryan commented 11 years ago

I realise I've already pushed this commit but there is a problem with it. Sometimes I end up with the same server twice in my server's list. This happens if a server is discovered by dleyna-server-service during a call to GetServers, i.e., the server is returned once by GetServers and once by notification. To fix this we could either check the key in self.__append_server_list_row or not register for notifications until GetServer has returned.

jku commented 11 years ago

On 19 March 2013 15:17, markdryan notifications@github.com wrote:

I realise I've already pushed this commit but there is a problem with it. Sometimes I end up with the same server twice in my server's list. This happens if a server is discovered by dleyna-server-service during a call to GetServers, i.e., the server is returned once by GetServers and once by notification. To fix this we could either check the key in self.__append_server_list_row or not register for notifications until GetServer has returned.

Thanks, I'll take a look.