|
|
@@ -83,6 +83,7 @@ def doRecallgen(defer, fun, *args, **kwargs): |
|
|
|
class ContentDirectoryControl(UPnPPublisher, dict): |
|
|
|
"""This class implements the CDS actions over SOAP.""" |
|
|
|
|
|
|
|
updateID = property(lambda x: x['0'].updateID) |
|
|
|
urlbase = property(lambda x: x._urlbase) |
|
|
|
|
|
|
|
def getnextID(self): |
|
|
@@ -172,7 +173,7 @@ class ContentDirectoryControl(UPnPPublisher, dict): |
|
|
|
"""Required: Return the current value of state variable SystemUpdateID.""" |
|
|
|
|
|
|
|
log.msg('GetSystemUpdateID()') |
|
|
|
return { 'SystemUpdateIdResponse': { 'Id': self['0'].updateID }} |
|
|
|
return { 'SystemUpdateIdResponse': { 'Id': self.updateID }} |
|
|
|
|
|
|
|
BrowseFlags = ('BrowseMetaData', 'BrowseDirectChildren') |
|
|
|
|
|
|
@@ -224,12 +225,14 @@ class ContentDirectoryControl(UPnPPublisher, dict): |
|
|
|
didl.addItem(self[ObjectID]) |
|
|
|
total = 1 |
|
|
|
|
|
|
|
result = {'BrowseResponse': {'Result': didl.toString() , |
|
|
|
'NumberReturned': didl.numItems(), |
|
|
|
'TotalMatches': total, |
|
|
|
'UpdateID': self[ObjectID].updateID }} |
|
|
|
r = { 'Result': didl.toString(), 'TotalMatches': total, |
|
|
|
'NumberReturned': didl.numItems(), } |
|
|
|
result = { 'BrowseResponse': r } |
|
|
|
|
|
|
|
#log.msg('Returning: %s' % result) |
|
|
|
if hasattr(self[ObjectID], 'updateID'): |
|
|
|
r['UpdateID'] = self[ObjectID].updateID |
|
|
|
else: |
|
|
|
r['UpdateID'] = self.updateID |
|
|
|
|
|
|
|
return result |
|
|
|
|
|
|
|