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:
committed by
Nick Craig-Wood
parent
8d1fff9a82
commit
1107da7247
@@ -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/"` +
|
||||
|
||||
Reference in New Issue
Block a user