def _prepare_external_frag_download(self, ctx):
    if ('live' not in ctx):
        ctx['live'] = False
    if (not ctx['live']):
        total_frags_str = ('%d' % ctx['total_frags'])
        ad_frags = ctx.get('ad_frags', 0)
        if ad_frags:
            total_frags_str += (' (not including %d ad)' % ad_frags)
    else:
        total_frags_str = 'unknown (live)'
    self.to_screen(f'[{self.FD_NAME}] Total fragments: {total_frags_str}')
    tmpfilename = self.temp_name(ctx['filename'])
    ctx.update({'tmpfilename': tmpfilename, 'fragment_index': 0})
def _prepare_external_frag_download(self, ctx):
    if ('live' not in ctx):
        ctx['live'] = False
    if (not ctx['live']):
        total_frags_str = ('%d' % ctx['total_frags'])
        ad_frags = ctx.get('ad_frags', 0)
        if ad_frags:
            total_frags_str += (' (not including %d ad)' % ad_frags)
    else:
        total_frags_str = 'unknown (live)'
    self.to_screen(f'[{self.FD_NAME}] Total fragments: {total_frags_str}')
    tmpfilename = self.temp_name(ctx['filename'])
    ctx.update({'tmpfilename': tmpfilename, 'fragment_index': 0})