Serviio is a free UPnP/DLNA media streaming server that has a auto library refresh. But who wants to wait for the library to refresh or manually refresh every time you download something.
Code: Select all
#!/usr/bin/env python
import httplib
connection = httplib.HTTPConnection("localhost",23423)
body_content = '<action><name>forceLibraryRefresh</name></action>'
headers = { "Content-type": "text/xml" }
connection.request('POST', '/rest/action' , body_content , headers)
result = connection.getresponse()
if result.status == 200:
print "Updated Serviio Library",
else :
print "Update Failed",
print result.status,
If you have a Serviio bounded IP address change the connection line.
example:
connection = httplib.HTTPConnection('1.2.3.4:23423')
Tell me what you think?
J03