diff --git a/common.py b/common.py index 33d0a35..fbaa1a9 100644 --- a/common.py +++ b/common.py @@ -13,6 +13,8 @@ CAMERA_CONFIG = { 'default': {'desc_file': os.path.join('dlna_web_root', 'samsungautobackupdesc.ini')}, + 'SAMSUNG EX2': {'desc_file': os.path.join('dlna_web_root', + 'SAMSUNGAutoBackupDESC.ini')}, 'SAMSUNG DV300': {'desc_file': os.path.join('DLNA_WEB_ROOT', 'SAMSUNGAutoBackupDESC.ini')}, 'SAMSUNG WB150': {'desc_file': os.path.join('DLNA_WEB_ROOT', @@ -28,11 +30,11 @@ DESC_SERVER_NAME = re.compile(r'friendlyName\s*=\s*(.*)') DESC_UUID = re.compile(r'UDN\s*=\s*uuid:(.*)') -DESC_INI = '''MacAddr=%(mac_address)s -UDN=uuid:%(uuid)s -friendlyName=%(server_name)s -WOLSupport=1 -ServerFlag=1 +DESC_INI = '''MacAddr=%(mac_address)s\r +UDN=uuid:%(uuid)s\r +friendlyName=%(server_name)s\r +WOLSupport=1\r +ServerFlag=1\r ''' LOG_DATE_FMT = '[%m/%d/%Y %I:%M %p]' diff --git a/ssdp.py b/ssdp.py index 7c95c6a..f4146d5 100644 --- a/ssdp.py +++ b/ssdp.py @@ -65,7 +65,7 @@ location, 'SERVER: MS-Windows/XP UPnP/1.0 PROTOTYPE/1.0', 'ST: urn:schemas-upnp-org:device:MediaServer:1', - 'USN: %s::urn:schemas-upnp-org:device:MediaServer:1' % uuid] + 'USN: uuid:%s::urn:schemas-upnp-org:device:MediaServer:1' % uuid] elif response_type == 'notify': response = ['NOTIFY * HTTP/1.1', 'HOST: 239.255.255.250:1900', @@ -78,6 +78,7 @@ response.append('CONTENT-LENGTH: 0') response.append('') + response.append('') return '\r\n'.join(response) def ParseSSDPDiscovery(self, datagram):