use mdns for local peer discovery
This commit is contained in:
parent
bea7c57515
commit
417195cfd1
7 changed files with 132 additions and 259 deletions
|
|
@ -40,7 +40,10 @@ class Tasks(Thread):
|
|||
self.queue('scan')
|
||||
import item.scan
|
||||
from item.models import sync_metadata, get_preview, get_cover
|
||||
from user.models import export_list, update_user_peering
|
||||
from user.models import (
|
||||
export_list, update_user_peering,
|
||||
add_local_info, remove_local_info,
|
||||
)
|
||||
shutdown = False
|
||||
while not shutdown:
|
||||
p, m = self.q.get()
|
||||
|
|
@ -68,6 +71,10 @@ class Tasks(Thread):
|
|||
update_user_peering(*data)
|
||||
elif action == 'ping':
|
||||
trigger_event('pong', data)
|
||||
elif action == 'addlocalinfo':
|
||||
add_local_info(data)
|
||||
elif action == 'removelocalinfo':
|
||||
remove_local_info(data)
|
||||
elif action == 'scan':
|
||||
item.scan.run_scan()
|
||||
elif action == 'scanimport':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue