1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

dlna: specify SSDP interface names from command line

This commit is contained in:
Simon Bos
2022-08-08 18:48:36 +02:00
committed by Nick Craig-Wood
parent 8d1fff9a82
commit 1107da7247
4 changed files with 39 additions and 12 deletions

View File

@@ -47,13 +47,17 @@ func listInterfaces() []net.Interface {
var active []net.Interface
for _, intf := range ifs {
if intf.Flags&net.FlagUp != 0 && intf.Flags&net.FlagMulticast != 0 && intf.MTU > 0 {
if isAppropriatelyConfigured(intf) {
active = append(active, intf)
}
}
return active
}
func isAppropriatelyConfigured(intf net.Interface) bool {
return intf.Flags&net.FlagUp != 0 && intf.Flags&net.FlagMulticast != 0 && intf.MTU > 0
}
func didlLite(chardata string) string {
return `<DIDL-Lite` +
` xmlns:dc="http://purl.org/dc/elements/1.1/"` +