mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 05:37:07 -05:00 
			
		
		
		
	[postprocessor/common] Use generalized cli option converters
This commit is contained in:
		@@ -4,6 +4,7 @@ import os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from ..utils import (
 | 
					from ..utils import (
 | 
				
			||||||
    PostProcessingError,
 | 
					    PostProcessingError,
 | 
				
			||||||
 | 
					    cli_configuration_args,
 | 
				
			||||||
    encodeFilename,
 | 
					    encodeFilename,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -61,11 +62,7 @@ class PostProcessor(object):
 | 
				
			|||||||
            self._downloader.report_warning(errnote)
 | 
					            self._downloader.report_warning(errnote)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _configuration_args(self, default=[]):
 | 
					    def _configuration_args(self, default=[]):
 | 
				
			||||||
        pp_args = self._downloader.params.get('postprocessor_args')
 | 
					        return cli_configuration_args(self.params, 'postprocessor_args', default)
 | 
				
			||||||
        if pp_args is None:
 | 
					 | 
				
			||||||
            return default
 | 
					 | 
				
			||||||
        assert isinstance(pp_args, list)
 | 
					 | 
				
			||||||
        return pp_args
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AudioConversionError(PostProcessingError):
 | 
					class AudioConversionError(PostProcessingError):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user