A feature-rich command-line audio/video downloader
[documentation] Crypto is an optional dependency
pukkandan06ff212d6408
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 77544f9e9f..0deeb162bd 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -84,7 +84,7 @@ jobs:with:python-version: '3.8'- name: Install Requirements- run: pip install pyinstaller mutagen+ run: pip install pyinstaller mutagen Crypto- name: Bump versionid: bump_versionrun: python devscripts/update-version.py@@ -122,7 +122,7 @@ jobs:python-version: '3.4.4'architecture: 'x86'- name: Install Requirements for 32 Bit- run: pip install pyinstaller==3.5 mutagen+ run: pip install pyinstaller==3.5 mutagen Crypto- name: Bump versionid: bump_versionrun: python devscripts/update-version.pydiff --git a/README.md b/README.mdindex bf52cf84ac..6f57325e04 100644--- a/README.md+++ b/README.md@@ -102,9 +102,9 @@ You can install yt-dlp using one of the following methods:### COMPILE**For Windows**:-To build the Windows executable, you must have pyinstaller (and optionally mutagen for embedding thumbnail in opus/ogg files)+To build the Windows executable, you must have pyinstaller (and optionally mutagen and Crypto)- python -m pip install --upgrade pyinstaller mutagen+ python -m pip install --upgrade pyinstaller mutagen CryptoOnce you have all the necessary dependancies installed, just run `py devscripts\pyinst.py`. The executable will be built for the same architecture (32/64 bit) as the python used to build it. It is strongly reccomended to use python3 although python2.6+ is supported.diff --git a/devscripts/pyinst.py b/devscripts/pyinst.pyindex 49a055af30..b663d4b2ee 100644--- a/devscripts/pyinst.py+++ b/devscripts/pyinst.py@@ -73,6 +73,7 @@ PyInstaller.__main__.run(['--exclude-module=test','--exclude-module=ytdlp_plugins','--hidden-import=mutagen',+ '--hidden-import=Crypto','youtube_dlc/__main__.py',])SetVersion('dist/youtube-dlc%s.exe' % _x86, VERSION_FILE)diff --git a/requirements.txt b/requirements.txtindex 26ced3f58c..1e880eb514 100644--- a/requirements.txt+++ b/requirements.txt@@ -1 +1,2 @@mutagen+Cryptodiff --git a/setup.py b/setup.pyindex c1e2ec727c..383ad370e6 100644--- a/setup.py+++ b/setup.py@@ -20,7 +20,7 @@ LONG_DESCRIPTION = '\n\n'.join(('**PS**: Many links in this document will not work since this is a copy of the README.md from Github',open("README.md", "r", encoding="utf-8").read()))-REQUIREMENTS = ['mutagen']+REQUIREMENTS = ['mutagen', 'Crypto']if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':diff --git a/youtube_dlc/postprocessor/embedthumbnail.py b/youtube_dlc/postprocessor/embedthumbnail.pyindex da6b6797f5..a54db77f0a 100644--- a/youtube_dlc/postprocessor/embedthumbnail.py+++ b/youtube_dlc/postprocessor/embedthumbnail.py@@ -10,9 +10,9 @@ import base64try:import mutagen- _has_mutagen = True+ has_mutagen = Trueexcept ImportError:- _has_mutagen = False+ has_mutagen = Falsefrom .ffmpeg import FFmpegPostProcessor@@ -153,7 +153,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):success = Falseelif info['ext'] in ['ogg', 'opus']:- if not _has_mutagen:+ if not has_mutagen:raise EmbedThumbnailPPError('module mutagen was not found. Please install using `python -m pip install mutagen`')self.to_screen('Adding thumbnail to "%s"' % filename)