Ticket #237: samsung.patch

File samsung.patch, 1.7 kB (added by simonsocke, 3 years ago)

patch to get avi, divx and quicktime to work with samsung using dlna

  • Coherence/coherence/upnp/core/DIDLLite.py

    old new  
    178178        additional_info = ['*'] 
    179179    if content_format == 'video/x-ms-wmv': 
    180180        additional_info = ['DLNA.ORG_PN=WMV_BASE']+simple_dlna_tags 
     181    if content_format in ['video/avi', 'video/divx']: 
     182        additional_info = ['DLNA.ORG_PN=AVI']+simple_dlna_tags 
     183    if content_format == 'video/quicktime': 
     184        additional_info = ['DLNA.ORG_PN=QUICKTIME']+simple_dlna_tags 
    181185    if content_format == '*': 
    182186        additional_info = simple_dlna_tags 
    183187 
  • Coherence/coherence/backends/fs_storage.py

    old new  
    2121mimetypes.add_type('video/mp4', '.mp4') 
    2222mimetypes.add_type('video/mpegts', '.ts') 
    2323mimetypes.add_type('video/divx', '.divx') 
     24mimetypes.add_type('video/divx', '.avi') 
    2425 
    2526from urlparse import urlsplit 
    2627 
     
    741742                         'http-get:*:video/mpeg:*', 
    742743                         'internal:%s:video/avi:*' % self.server.coherence.hostname, 
    743744                         'http-get:*:video/avi:*', 
     745                         'internal:%s:video/divx:*' % self.server.coherence.hostname, 
     746                         'http-get:*:video/divx:*', 
    744747                         'internal:%s:video/quicktime:*' % self.server.coherence.hostname, 
    745748                         'http-get:*:video/quicktime:*', 
    746749                         'internal:%s:image/gif:*' % self.server.coherence.hostname,