Browse Source

readd back the custom mime-types.. these are necessary on MacOSX

as these are missing..  I thought I committed this already, guess
I didn't (or submitted the wrong file)..

[git-p4: depot-paths = "//depot/": change = 843]
v0.3
John-Mark Gurney 19 years ago
parent
commit
08205e5989
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      pymediaserv

+ 16
- 0
pymediaserv View File

@@ -100,6 +100,22 @@ root.putChild('root-device.xml', RootDevice())
root.putChild('content', content)


# Purely to ensure some sane mime-types. On MacOSX I need these.
medianode = static.File('pymediaserv')
medianode.contentTypes.update( {
'.wmv': 'video/x-ms-wmv',
#'.ts': 'video/mp2t',
'.ts': 'video/mpeg', # we may want this instead of mp2t
'.m2t': 'video/mpeg',
'.mp4': 'video/mp4',
#'.mp4': 'video/mpeg',
'.dat': 'video/mpeg', # VCD tracks
'.ogm': 'application/ogg',
'.vob': 'video/mpeg',
#'.m4a': 'audio/mp4', # D-Link can't seem to play AAC files.
})
del medianode

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



Loading…
Cancel
Save