|
|
@@ -35,25 +35,28 @@ class ContentDirectoryControl(UPnPPublisher): |
|
|
|
# Required actions |
|
|
|
|
|
|
|
def soap_GetSearchCapabilities(self, *args, **kwargs): |
|
|
|
"""Return the searching capabilities supported by the device.""" |
|
|
|
"""Required: Return the searching capabilities supported by the device.""" |
|
|
|
|
|
|
|
log.msg('GetSearchCapabilities()') |
|
|
|
return { 'SearchCapabilitiesResponse': { 'SearchCaps': '' }} |
|
|
|
|
|
|
|
def soap_GetSortCapabilities(self, *args, **kwargs): |
|
|
|
"""Return the CSV list of meta-data tags that can be used in |
|
|
|
"""Required: Return the CSV list of meta-data tags that can be used in |
|
|
|
sortCriteria.""" |
|
|
|
|
|
|
|
log.msg('GetSortCapabilities()') |
|
|
|
return { 'SortCapabilitiesResponse': { 'SortCaps': '' }} |
|
|
|
|
|
|
|
def soap_GetSystemUpdateID(self, *args, **kwargs): |
|
|
|
"""Return the current value of state variable SystemUpdateID.""" |
|
|
|
"""Required: Return the current value of state variable SystemUpdateID.""" |
|
|
|
|
|
|
|
log.msg('GetSystemUpdateID()') |
|
|
|
return { 'SystemUpdateIdResponse': { 'Id': 5 }} |
|
|
|
|
|
|
|
BrowseFlags = ('BrowseMetaData', 'BrowseDirectChildren') |
|
|
|
|
|
|
|
def soap_Browse(self, *args): |
|
|
|
"""Incrementally browse the native heirachy of the Content |
|
|
|
"""Required: Incrementally browse the native heirachy of the Content |
|
|
|
Directory objects exposed by the Content Directory Service.""" |
|
|
|
|
|
|
|
(ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, |
|
|
@@ -68,7 +71,13 @@ class ContentDirectoryControl(UPnPPublisher): |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
if ObjectID == '0\\Music\\': |
|
|
|
if ObjectID == '0': |
|
|
|
c = Container('media', '0', 'All media') |
|
|
|
c.childCount = 5 |
|
|
|
c.searchable = 0 |
|
|
|
didl.addItem(c) |
|
|
|
|
|
|
|
elif ObjectID == '0\\Music\\': |
|
|
|
|
|
|
|
c = Container('0\\Music\\Spotty\\', '0\\Music\\', 'Spotty') |
|
|
|
c.childCount = 6 |
|
|
@@ -81,7 +90,7 @@ class ContentDirectoryControl(UPnPPublisher): |
|
|
|
didl.addItem(c) |
|
|
|
|
|
|
|
|
|
|
|
if ObjectID == '0\\Music\\Spotty\\': |
|
|
|
elif ObjectID == '0\\Music\\Spotty\\': |
|
|
|
|
|
|
|
m = MusicTrack('0\\Music\\media\\foo.mp3', '0\\Music\\', 'foo.mp3') |
|
|
|
|
|
|
|