コード例 #1
0
ファイル: content_directory.py プロジェクト: msfrank/Higgins
 def getMatches(startingIndex, requestedCount, qset):
     # don't return more than 100 items
     total_matches = len(qset)
     if requestedCount > 100 or requestedCount == 0:
         requestedCount = 100
     if startingIndex >= total_matches:
         raise UPNPError(402, "startingIndex %i is out of range" % startingIndex)
     if startingIndex + requestedCount > total_matches:
         requestedCount = total_matches - startingIndex
     matches = qset[startingIndex:startingIndex + requestedCount]
     number_returned = len(matches)
     retval = (matches, total_matches, number_returned)
     logger.log_debug("getMatches: %s" % str(retval))
     return retval
コード例 #2
0
ファイル: __init__.py プロジェクト: msfrank/Higgins
 def stopService(self):
     logger.log_debug("stopped mediaserver service")
     return UPNPDevice.stopService(self)
コード例 #3
0
ファイル: __init__.py プロジェクト: msfrank/Higgins
 def startService(self):
     UPNPDevice.startService(self)
     logger.log_debug("started mediaserver service")