Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 def stopService(self):
     logger.log_debug("stopped mediaserver service")
     return UPNPDevice.stopService(self)
Exemplo n.º 3
0
 def startService(self):
     UPNPDevice.startService(self)
     logger.log_debug("started mediaserver service")