Browse Source

remove some unnecessary debugging statements now that it's working..

[git-p4: depot-paths = "//depot/": change = 731]
replace/5b80aeb26dc425aaddcd5182126c969e5cc04cbb
John-Mark Gurney 19 years ago
parent
commit
9f465bb73f
3 changed files with 1 additions and 7 deletions
  1. +0
    -2
      ContentDirectory.py
  2. +0
    -1
      SSDP.py
  3. +1
    -4
      pymediaserv

+ 0
- 2
ContentDirectory.py View File

@@ -108,8 +108,6 @@ class ContentDirectoryControl(UPnPPublisher, dict):
try:
if BrowseFlag == 'BrowseDirectChildren':
ch = self.getchildren(ObjectID)[StartingIndex: StartingIndex + RequestedCount]
log.msg(ch)
log.msg(dict.__repr__(self))
filter(lambda x, s = self, d = didl: d.addItem(s[x.id]) and None, ch)
else:
didl.addItem(self[ObjectID])


+ 0
- 1
SSDP.py View File

@@ -48,7 +48,6 @@ class SSDPServer(DatagramProtocol):

# Break up message in to command and headers

log.msg('respond to: %s:%d' % (host, port))
header, payload = data.split('\r\n\r\n')
lines = header.split('\r\n')
cmd = string.split(lines[0], ' ')


+ 1
- 4
pymediaserv View File

@@ -12,7 +12,6 @@ import random
import socket
import string
import sys
import traceback
from twisted.python import log
from twisted.internet import reactor

@@ -88,12 +87,10 @@ root.putChild('media', medianode)

# Set up media files
allmedia = cds.addContainer('0', 'All Media')
log.msg('allmedia: %s' % repr(allmedia))
for i in os.listdir('media'):
fpath = os.path.join('media', i)
try:
if not os.path.isfile(fpath):
log.msg('skipping: %s' % fpath)
continue
fn, ext = os.path.splitext(i)
if ext == '.ts':
@@ -113,7 +110,7 @@ for i in os.listdir('media'):
cds[item].res = Resource('%smedia/%s' % (urlbase, i), 'http-get:*:%s:*' % mt)
cds[item].res.size = os.path.getsize(fpath)
except KeyError:
traceback.print_exc(file=log.logfile)
pass

site = server.Site(root)
reactor.listenTCP(listenPort, site)


Loading…
Cancel
Save