Browse Source

mark functions as required... and comment out in the xml, the Search

function until we support it...

[git-p4: depot-paths = "//depot/": change = 728]
replace/5b80aeb26dc425aaddcd5182126c969e5cc04cbb
John-Mark Gurney 19 years ago
parent
commit
d17a40c84a
2 changed files with 22 additions and 7 deletions
  1. +15
    -6
      ContentDirectory.py
  2. +7
    -1
      content-directory-scpd.xml

+ 15
- 6
ContentDirectory.py View File

@@ -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')



+ 7
- 1
content-directory-scpd.xml
File diff suppressed because it is too large
View File


Loading…
Cancel
Save