2021-09-29 22:53:33 +02:00
|
|
|
# flake8: noqa: F401
|
|
|
|
|
2021-11-09 23:44:42 +01:00
|
|
|
from .common import PostProcessor
|
2015-04-24 08:48:49 +02:00
|
|
|
from .embedthumbnail import EmbedThumbnailPP
|
2022-04-12 00:32:57 +02:00
|
|
|
from .exec import ExecAfterDownloadPP, ExecPP
|
2014-01-07 05:59:22 +01:00
|
|
|
from .ffmpeg import (
|
2022-01-13 12:01:08 +01:00
|
|
|
FFmpegConcatPP,
|
2022-04-12 00:32:57 +02:00
|
|
|
FFmpegCopyStreamPP,
|
2014-10-26 16:31:52 +01:00
|
|
|
FFmpegEmbedSubtitlePP,
|
|
|
|
FFmpegExtractAudioPP,
|
2021-12-20 07:06:46 +01:00
|
|
|
FFmpegFixupDuplicateMoovPP,
|
2021-06-21 19:23:17 +02:00
|
|
|
FFmpegFixupDurationPP,
|
2016-03-01 21:08:50 +01:00
|
|
|
FFmpegFixupM3u8PP,
|
2015-01-23 18:39:12 +01:00
|
|
|
FFmpegFixupM4aPP,
|
2022-04-12 00:32:57 +02:00
|
|
|
FFmpegFixupStretchedPP,
|
|
|
|
FFmpegFixupTimestampPP,
|
2014-01-07 05:59:22 +01:00
|
|
|
FFmpegMergerPP,
|
|
|
|
FFmpegMetadataPP,
|
2022-04-12 00:32:57 +02:00
|
|
|
FFmpegPostProcessor,
|
|
|
|
FFmpegSplitChaptersPP,
|
2015-02-28 14:43:24 +01:00
|
|
|
FFmpegSubtitlesConvertorPP,
|
2021-04-11 00:18:52 +02:00
|
|
|
FFmpegThumbnailsConvertorPP,
|
2021-04-11 02:22:55 +02:00
|
|
|
FFmpegVideoConvertorPP,
|
|
|
|
FFmpegVideoRemuxerPP,
|
2013-10-15 02:07:26 +02:00
|
|
|
)
|
2021-08-09 21:52:55 +02:00
|
|
|
from .metadataparser import (
|
|
|
|
MetadataFromFieldPP,
|
|
|
|
MetadataFromTitlePP,
|
|
|
|
MetadataParserPP,
|
|
|
|
)
|
2021-09-29 22:53:33 +02:00
|
|
|
from .modify_chapters import ModifyChaptersPP
|
2021-01-23 13:18:12 +01:00
|
|
|
from .movefilesafterdownload import MoveFilesAfterDownloadPP
|
2020-11-15 01:28:41 +01:00
|
|
|
from .sponskrub import SponSkrubPP
|
2021-09-29 22:53:33 +02:00
|
|
|
from .sponsorblock import SponsorBlockPP
|
|
|
|
from .xattrpp import XAttrMetadataPP
|
2023-01-07 08:19:13 +01:00
|
|
|
from ..globals import plugin_pps, postprocessors
|
|
|
|
from ..plugins import PACKAGE_NAME
|
|
|
|
from ..utils import deprecation_warning
|
2021-09-29 22:53:33 +02:00
|
|
|
|
2023-01-07 08:19:13 +01:00
|
|
|
|
|
|
|
def __getattr__(name):
|
|
|
|
lookup = plugin_pps.get()
|
|
|
|
if name in lookup:
|
|
|
|
deprecation_warning(
|
|
|
|
f'Importing a plugin Post-Processor from {__name__} is deprecated. '
|
|
|
|
f'Please import {PACKAGE_NAME}.postprocessor.{name} instead.')
|
|
|
|
return lookup[name]
|
|
|
|
|
|
|
|
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
|
2014-01-07 05:59:22 +01:00
|
|
|
|
2014-12-15 01:06:25 +01:00
|
|
|
|
|
|
|
def get_postprocessor(key):
|
2023-01-07 08:19:13 +01:00
|
|
|
return postprocessors.get()[key + 'PP']
|
|
|
|
|
2014-12-15 01:06:25 +01:00
|
|
|
|
2023-01-07 08:19:13 +01:00
|
|
|
_default_pps = {
|
|
|
|
name: value
|
|
|
|
for name, value in globals().items()
|
|
|
|
if name.endswith('PP') or name in ('PostProcessor', 'FFmpegPostProcessor')
|
|
|
|
}
|
|
|
|
postprocessors.set(_default_pps)
|
2014-12-15 01:06:25 +01:00
|
|
|
|
2023-01-07 08:19:13 +01:00
|
|
|
__all__ = list(_default_pps.values())
|