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

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/m/e/mediadrop-HEAD/mediadrop/lib/players.py   mediadrop(Download)
from mediadrop.forms.admin import players as player_forms
from mediadrop.lib.compat import any
from mediadrop.lib.filetypes import AUDIO, VIDEO, AUDIO_DESC, CAPTIONS
from mediadrop.lib.i18n import N_
from mediadrop.lib.templating import render
                         | set(['xml', 'srt'])
#    supported_containers.add('youtube')
    supported_types = set([AUDIO, VIDEO, AUDIO_DESC, CAPTIONS])
    supported_schemes = set([HTTP, RTMP])
 
    def plugins(self):
        plugins = {}
        audio_desc = pick_uris(self.all_uris, type=AUDIO_DESC)
        captions = pick_uris(self.all_uris, type=CAPTIONS)
        if audio_desc:

src/m/e/mediadrop-HEAD/mediadrop/model/media.py   mediadrop(Download)
from mediadrop.lib.auth import Resource
from mediadrop.lib.compat import any
from mediadrop.lib.filetypes import AUDIO, AUDIO_DESC, VIDEO, guess_mimetype
from mediadrop.lib.players import pick_any_media_file, pick_podcast_media_file
from mediadrop.lib.util import calculate_popularity
        """
        type = self.type
        if type == AUDIO_DESC:
            type = AUDIO
        return guess_mimetype(self.container, type)

src/m/e/mediadrop-HEAD/mediadrop/model/tests/media_status_test.py   mediadrop(Download)
 
from mediadrop.model import DBSession, Media
from mediadrop.lib.filetypes import (guess_media_type_map, AUDIO, AUDIO_DESC, 
    CAPTIONS, VIDEO)
from mediadrop.lib.players import AbstractFlashPlayer, FlowPlayer
    def test_does_not_set_type_if_only_audio_description_files_are_attached(self, suffix):
        media = Media.example()
        assert_none(media.type)
        media_file = self.add_external_file(media, suffix)
        media_file.type = AUDIO_DESC