def DownloaderCreator(url):
    printDBG("DownloaderCreator url[%r]" % url)
    downloader = None

    url = urlparser.decorateUrl(url)
    iptv_proto = url.meta.get('iptv_proto', '')
    if 'm3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdl_download.value:
            downloader = HLSDownloader()
        else:
            downloader = M3U8Downloader()
    elif 'em3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdl_download.value:
            downloader = EHLSDownloader()
        else:
            downloader = EM3U8Downloader()
    elif 'f4m' == iptv_proto:
        downloader = F4mDownloader()
    elif 'rtmp' == iptv_proto:
        downloader = RtmpDownloader()
    elif iptv_proto in ['https', 'http']:
        downloader = WgetDownloader()
    elif 'merge' == iptv_proto:
        if url.meta.get('prefered_merger') == 'hlsdl' and config.plugins.iptvplayer.hlsdl_download.value and config.plugins.iptvplayer.prefer_hlsdl_for_pls_with_alt_media.value:
            downloader = HLSDownloader()
        elif IsExecutable('ffmpeg'):
            downloader = FFMPEGDownloader()
        else:
            downloader = MergeDownloader()
    elif 'mpd' == iptv_proto and IsExecutable('ffmpeg'):
        downloader = FFMPEGDownloader()
    
    return downloader
Exemple #2
0
def DownloaderCreator(url):
    printDBG("DownloaderCreator url[%r]" % url)
    downloader = None

    url = urlparser.decorateUrl(url)
    iptv_proto = url.meta.get('iptv_proto', '')
    if 'm3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdlpath.value != '':
            downloader = HLSDownloader()
        else:
            downloader = M3U8Downloader()
    elif 'em3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdlpath.value != '':
            downloader = EHLSDownloader()
        else:
            downloader = EM3U8Downloader()
    elif 'f4m' == iptv_proto:
        downloader = F4mDownloader()
    elif 'rtmp' == iptv_proto:
        downloader = RtmpDownloader()
    elif iptv_proto in ['https', 'http']:
        downloader = WgetDownloader()
    elif 'merge' == iptv_proto:
        if IsExecutable('ffmpeg') and config.plugins.iptvplayer.cmdwrappath.value != '':
            downloader = FFMPEGDownloader()
        else:
            downloader = MergeDownloader()
    elif 'mpd' == iptv_proto and IsExecutable('ffmpeg') and config.plugins.iptvplayer.cmdwrappath.value != '':
        downloader = FFMPEGDownloader()
    
    return downloader
Exemple #3
0
def DownloaderCreator(url):
    printDBG("DownloaderCreator url[%r]" % url)
    downloader = None

    url = urlparser.decorateUrl(url)
    iptv_proto = url.meta.get('iptv_proto', '')
    if 'm3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdlpath.value != '':
            downloader = HLSDownloader()
        else:
            downloader = M3U8Downloader()
    elif 'em3u8' == iptv_proto:
        if config.plugins.iptvplayer.hlsdlpath.value != '':
            downloader = EHLSDownloader()
        else:
            downloader = EM3U8Downloader()
    elif 'f4m' == iptv_proto:
        downloader = F4mDownloader()
    elif 'rtmp' == iptv_proto:
        downloader = RtmpDownloader()
    elif 'https' == iptv_proto:
        downloader = WgetDownloader()
    elif 'http' == iptv_proto:
        downloader = WgetDownloader()
    elif 'merge' == iptv_proto:
        downloader = MergeDownloader()
    
    return downloader