Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Return the most likely media type based on the container or embed site.

:param extension: The file extension without a preceding period.
:param default: Default to video if we don't have any other guess.
:returns: AUDIO, VIDEO, CAPTIONS, or None

        def guess_media_type(extension=None, default=VIDEO):
    """Return the most likely media type based on the container or embed site.

    :param extension: The file extension without a preceding period.
    :param default: Default to video if we don't have any other guess.
    :returns: AUDIO, VIDEO, CAPTIONS, or None

    """
    return guess_media_type_map.get(extension, default)
        


src/m/e/mediadrop-HEAD/mediadrop/lib/storage/remoteurls.py   mediadrop(Download)
 
from mediadrop.forms.admin.storage.remoteurls import RemoteURLStorageForm
from mediadrop.lib.filetypes import guess_container_format, guess_media_type
from mediadrop.lib.i18n import N_, _
from mediadrop.lib.storage.api import (EmbedStorageEngine, StorageEngine,
 
        return {
            'type': guess_media_type(ext),
            'container': container,
            'display_name': u'%s.%s' % (name, container or ext),

src/m/e/mediadrop-HEAD/mediadrop/lib/storage/api.py   mediadrop(Download)
from mediadrop.lib.compat import defaultdict, SEEK_END
from mediadrop.lib.decorators import memoize
from mediadrop.lib.filetypes import guess_container_format, guess_media_type
from mediadrop.lib.i18n import _
from mediadrop.lib.thumbnails import (create_thumbs_for, has_thumbs,
 
        return {
            'type': guess_media_type(container),
            'container': container,
            'display_name': u'%s.%s' % (name, container or ext),