Exemplo n.º 1
0
def successful_clip(state_dict, title='Test clip: S01E01-2018-07-01T00:00'):
    return Clip(
        webpage='https://areena.yle.fi/1-1234567',
        flavors=[
            # The flavors are intentionally unsorted
            StreamFlavor(
                media_type='video',
                height=1080,
                width=1920,
                bitrate=2808,
                streams=[StateCollectingBackend(state_dict, 'high_quality')]),
            StreamFlavor(
                media_type='video',
                height=360,
                width=640,
                bitrate=880,
                streams=[StateCollectingBackend(state_dict, 'low_quality')]),
            StreamFlavor(media_type='video',
                         height=360,
                         width=640,
                         bitrate=864,
                         streams=[
                             StateCollectingBackend(
                                 state_dict, 'low_quality_finnish_subs')
                         ],
                         hard_subtitle=Subtitle(url=None, lang='fi')),
            StreamFlavor(
                media_type='video',
                height=720,
                width=1280,
                bitrate=1412,
                streams=[StateCollectingBackend(state_dict,
                                                'medium_quality')]),
            StreamFlavor(media_type='video',
                         height=720,
                         width=1280,
                         bitrate=1872,
                         streams=[
                             StateCollectingBackend(
                                 state_dict, 'medium_quality_high_bitrate')
                         ])
        ],
        title=title,
        duration_seconds=950,
        region='Finland',
        publish_timestamp=datetime(2018, 7, 1, tzinfo=FixedOffset(3)),
        expiration_timestamp=datetime(2019, 1, 1, tzinfo=FixedOffset(3)),
        embedded_subtitles=[
            EmbeddedSubtitle('fin', 'käännöstekstitys'),
            EmbeddedSubtitle('swe', 'käännöstekstitys')
        ])
Exemplo n.º 2
0
def pasila():
    return {
        'title': 'Vanhempainyhdistys',
        'publish_timestamp': datetime(
            2018, 4, 12, 16, 30, 45,
            tzinfo=FixedOffset(2)),
        'series_title': 'Pasila',
        'subheading':'tekstitys englanniksi',
        'season': 1,
        'episode': 3,
    }