Change "YoutubeDL" and "Youtubedl" to "youtube-dl".
This commit is contained in:
parent
4f42533287
commit
e2f8c64f1a
|
@ -101,12 +101,12 @@ class YoutubeCustomDownload(download.CustomDownload):
|
|||
if 'ext' in res:
|
||||
dot_ext = '.{}'.format(res['ext'])
|
||||
# See #673 when merging multiple formats, the extension is appended to the tempname
|
||||
# by YoutubeDL resulting in empty .partial file + .partial.mp4 exists
|
||||
# by youtube-dl resulting in empty .partial file + .partial.mp4 exists
|
||||
# and #796 .mkv is chosen by ytdl sometimes
|
||||
for try_ext in (dot_ext, ".mp4", ".m4a", ".webm", ".mkv"):
|
||||
tempname_with_ext = tempname + try_ext
|
||||
if os.path.isfile(tempname_with_ext):
|
||||
logger.debug('Youtubedl downloaded to "%s" instead of "%s", moving',
|
||||
logger.debug('youtube-dl downloaded to "%s" instead of "%s", moving',
|
||||
os.path.basename(tempname_with_ext),
|
||||
os.path.basename(tempname))
|
||||
os.remove(tempname)
|
||||
|
@ -277,7 +277,7 @@ class gPodderYoutubeDL(download.CustomDownloader):
|
|||
# when adding podcasts.
|
||||
# See https://docs.python.org/3/library/sys.html#sys.__stderr__ Note
|
||||
if not sys.stdout:
|
||||
logger.debug('no stdout, setting YoutubeDL logger')
|
||||
logger.debug('no stdout, setting youtube-dl logger')
|
||||
self._ydl_opts['logger'] = logger
|
||||
|
||||
def add_format(self, gpodder_config, opts, fallback=None):
|
||||
|
|
|
@ -40,7 +40,7 @@ def clean_up_downloads(delete_partial=False):
|
|||
|
||||
if delete_partial:
|
||||
temporary_files += glob.glob('%s/*/*.partial' % gpodder.downloads)
|
||||
# YoutubeDL creates .partial.* files for adaptive formats
|
||||
# youtube-dl creates .partial.* files for adaptive formats
|
||||
temporary_files += glob.glob('%s/*/*.partial.*' % gpodder.downloads)
|
||||
|
||||
for tempfile in temporary_files:
|
||||
|
@ -55,7 +55,7 @@ def find_partial_downloads(channels, start_progress_callback, progress_callback,
|
|||
progress_callback - A callback(title, progress) when an episode was found
|
||||
finish_progress_callback - A callback(resumable_episodes) when finished
|
||||
"""
|
||||
# Look for partial file downloads, ignoring .partial.* files created by YoutubeDL
|
||||
# Look for partial file downloads, ignoring .partial.* files created by youtube-dl
|
||||
partial_files = glob.glob(os.path.join(gpodder.downloads, '*', '*.partial'))
|
||||
count = len(partial_files)
|
||||
resumable_episodes = []
|
||||
|
|
|
@ -661,7 +661,7 @@ class DownloadTask(object):
|
|||
|
||||
def delete_partial_files(self):
|
||||
temporary_files = [self.tempname]
|
||||
# YoutubeDL creates .partial.* files for adaptive formats
|
||||
# youtube-dl creates .partial.* files for adaptive formats
|
||||
temporary_files += glob.glob('%s.*' % self.tempname)
|
||||
|
||||
for tempfile in temporary_files:
|
||||
|
|
Loading…
Reference in New Issue