Move postprocessor into its own package
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 7 Jan 2014 04:49:17 +0000 (05:49 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 7 Jan 2014 04:49:17 +0000 (05:49 +0100)
setup.py
youtube_dl/YoutubeDL.py
youtube_dl/__init__.py
youtube_dl/postprocessor/__init__.py [moved from youtube_dl/PostProcessor.py with 99% similarity]

index 653ca9a735c20e32b150b0d54041c96b829f1d29..1f45159cd3e641f2257abf6d8781ce9f31bbda11 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -71,7 +71,10 @@ setup(
     author_email='ytdl@yt-dl.org',
     maintainer='Philipp Hagemeister',
     maintainer_email='phihag@phihag.de',
-    packages=['youtube_dl', 'youtube_dl.extractor', 'youtube_dl.downloader'],
+    packages=[
+        'youtube_dl',
+        'youtube_dl.extractor', 'youtube_dl.downloader',
+        'youtube_dl.postprocessor'],
 
     # Provokes warning on most systems (why?!)
     # test_suite = 'nose.collector',
index 5748ceaf394f5eb0aa1f662da11da5d3dcd81a1c..e1be38a53fcf02b5de2badcf777bbb532eff698b 100644 (file)
@@ -55,7 +55,7 @@ from .utils import (
 )
 from .extractor import get_info_extractor, gen_extractors
 from .downloader import get_suitable_downloader
-from .PostProcessor import FFmpegMergerPP
+from .postprocessor import FFmpegMergerPP
 from .version import __version__
 
 
index ba243d4d20cb45d415d815c3660d40f0110d6685..5b0fde4eef5662bc739946b689dd66bc72de49f6 100644 (file)
@@ -75,7 +75,7 @@ from .FileDownloader import (
 from .extractor import gen_extractors
 from .version import __version__
 from .YoutubeDL import YoutubeDL
-from .PostProcessor import (
+from .postprocessor import (
     FFmpegMetadataPP,
     FFmpegVideoConvertor,
     FFmpegExtractAudioPP,
similarity index 99%
rename from youtube_dl/PostProcessor.py
rename to youtube_dl/postprocessor/__init__.py
index 617a17ba936e9b82cac00cec052de2519a496b08..282cc4d7e639ce5e01603ba1f22ecbe88aa85619 100644 (file)
@@ -4,13 +4,14 @@ import sys
 import time
 
 
-from .utils import (
+from ..utils import (
     compat_subprocess_get_DEVNULL,
     encodeFilename,
+    hyphenate_date,
     PostProcessingError,
+    prepend_extension,
     shell_quote,
     subtitles_filename,
-    prepend_extension,
 )
 
 
@@ -540,8 +541,6 @@ class XAttrMetadataPP(PostProcessor):
     def run(self, info):
         """ Set extended attributes on downloaded file (if xattr support is found). """
 
-        from .utils import hyphenate_date
-
         # This mess below finds the best xattr tool for the job and creates a
         # "write_xattr" function.
         try: