From 2745f4e9a005cffa98377872b10a2fda97d3d4f6 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 10 Feb 2006 00:46:38 -0800 Subject: [PATCH] skip .ts's for now.. and map mp4 and ts to video/mpeg.. [git-p4: depot-paths = "//depot/": change = 730] --- pymediaserv | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pymediaserv b/pymediaserv index 7212625..ceeeef5 100755 --- a/pymediaserv +++ b/pymediaserv @@ -79,9 +79,10 @@ from MediaServer import MediaServer medianode = static.File('media') medianode.contentTypes.update( { '.wmv': 'video/x-ms-wmv', - '.ts': 'video/mp2t', - #'.ts': 'video/mpeg', # we may want this instead of mp2t - '.mp4': 'video/mp4', + #'.ts': 'video/mp2t', + '.ts': 'video/mpeg', # we may want this instead of mp2t + #'.mp4': 'video/mp4', + '.mp4': 'video/mpeg', }) root.putChild('media', medianode) @@ -95,6 +96,8 @@ for i in os.listdir('media'): log.msg('skipping: %s' % fpath) continue fn, ext = os.path.splitext(i) + if ext == '.ts': + continue mt = medianode.contentTypes[ext] ty = mt.split('/')[0] if ty == 'video':