1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 11:36:52 +00:00

Setting Friendlyname for DMS and SAT>IP, define Quad,Quattro settings

This commit is contained in:
mvoelkel
2016-06-16 13:26:38 +02:00
parent 80ae9dab69
commit 33277bb1f2
7 changed files with 299 additions and 102 deletions

View File

@@ -80,15 +80,25 @@ function LoadFile(fname)
return t
end
function GetBoxName()
local boxname = "OctopusNet"
local tmp = io.open("/config/boxname")
if tmp then
boxname = tmp:read("*l")
tmp:close()
end
return boxname
end
upnp:SetDebug(true)
local port = 8080
-- local RootLocation = "http://10.0.4.31:8080/dms.xml"
local uuid,sernbr,myip = upnp:SystemParameters("f0287290-e1e1-11e2-9a21-000000000000")
local friendlyname = GetBoxName().." DMS"
local Desc = LoadFile("dms.xml")
Desc = string.gsub(Desc,"##(%a+)##",{ UUID = uuid, SERNBR = sernbr, HOST = myip })
Desc = string.gsub(Desc,"##(%a+)##",{ UUID = uuid, SERNBR = sernbr, HOST = myip, FRIENDLYNAME = friendlyname })
if DisableDLNA then
Desc = string.gsub(Desc,"(%<dlna:.+DOC%>)","")

View File

@@ -6,7 +6,7 @@
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>OctopusNet DMS</friendlyName>
<friendlyName>##FRIENDLYNAME##</friendlyName>
<manufacturer>Digital Devices GmbH</manufacturer>
<manufacturerURL>http://www.digitaldevices.de</manufacturerURL>
<modelDescription>OctopusNet</modelDescription>