Browse Source

skip .ts's for now.. and map mp4 and ts to video/mpeg..

[git-p4: depot-paths = "//depot/": change = 730]
replace/5b80aeb26dc425aaddcd5182126c969e5cc04cbb
John-Mark Gurney 19 years ago
parent
commit
2745f4e9a0
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      pymediaserv

+ 6
- 3
pymediaserv View File

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


Loading…
Cancel
Save