From 2b9a77c9bc9eb6af861a9d052aa216878853e6b8 Mon Sep 17 00:00:00 2001 From: vayalil <36435907+vayalil@users.noreply.github.com> Date: Sat, 17 Feb 2018 09:05:15 +1100 Subject: [PATCH 1/4] Add files via upload --- youtube_dl/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 9bb952457..231caff99 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -252,6 +252,14 @@ def _real_main(argv=None): 'key': 'MetadataFromTitle', 'titleformat': opts.metafromtitle }) + + if opts.metafromuser: + postprocessors.append({ + 'key': 'MetadataFromUser', + 'metadata': opts.metafromuser + + }) + if opts.extractaudio: postprocessors.append({ 'key': 'FFmpegExtractAudio', From b54937863aa6d8fbc4a55ddd2672009a2e95a4f6 Mon Sep 17 00:00:00 2001 From: vayalil <36435907+vayalil@users.noreply.github.com> Date: Sat, 17 Feb 2018 09:07:07 +1100 Subject: [PATCH 2/4] Add files via upload --- youtube_dl/postprocessor/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube_dl/postprocessor/__init__.py b/youtube_dl/postprocessor/__init__.py index 3ea518399..6b7e08daf 100644 --- a/youtube_dl/postprocessor/__init__.py +++ b/youtube_dl/postprocessor/__init__.py @@ -16,6 +16,7 @@ from .ffmpeg import ( from .xattrpp import XAttrMetadataPP from .execafterdownload import ExecAfterDownloadPP from .metadatafromtitle import MetadataFromTitlePP +from .metadatafromuser import MetadataFromUserPP def get_postprocessor(key): @@ -37,4 +38,5 @@ __all__ = [ 'FFmpegVideoConvertorPP', 'MetadataFromTitlePP', 'XAttrMetadataPP', + 'MetadataFromUserPP' ] From 9f72d1d4262384a6668db954af4d72ad266b0878 Mon Sep 17 00:00:00 2001 From: vayalil <36435907+vayalil@users.noreply.github.com> Date: Sat, 17 Feb 2018 09:57:51 +1100 Subject: [PATCH 3/4] Add files via upload --- youtube_dl/options.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl/options.py b/youtube_dl/options.py index ce9391d89..1fd8b5155 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -816,10 +816,10 @@ def parseOpts(overrideArguments=None): postproc.add_option( '--metadata', metavar='METADATA', dest='metafromuser', default=False, - help='Allows the user to specify key/value pairs for encoding metadata, sepatated by equal sign.' - 'Example: --metadata "album = Movie Title artist = Various artists year = "2010"' - 'Note:- Should be used with --add-metadata to write the specified data to the video/audio file' - 'Also tries to capture artist information from the file description, if otherwise not available') + help='Allows the user to specify key/value pairs for encoding metadata, sepatated by equal sign. ' + 'Example: --metadata "album = Movie Title artist = Various Artists". ' + 'Note:- Should be used with --add-metadata to write the specified data into a video/audio file. ' + 'Also tries to capture artist information from the file description, if otherwise not available.') postproc.add_option( '--metadata-from-title', metavar='FORMAT', dest='metafromtitle', From 785ff4196b5884e01d6ca9890562f417cc80c3cc Mon Sep 17 00:00:00 2001 From: vayalil <36435907+vayalil@users.noreply.github.com> Date: Sat, 17 Feb 2018 10:02:33 +1100 Subject: [PATCH 4/4] Add files via upload --- youtube_dl/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 231caff99..5bf51a6c8 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -256,8 +256,7 @@ def _real_main(argv=None): if opts.metafromuser: postprocessors.append({ 'key': 'MetadataFromUser', - 'metadata': opts.metafromuser - + 'metadata': opts.metafromuser }) if opts.extractaudio: