priority to run after file convert
This commit is contained in:
parent
36d99e9a82
commit
3ff41f396b
2 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ import mediafile
|
|||
|
||||
from ytdl_sub.config.preset_options import OptionsValidator
|
||||
from ytdl_sub.entries.entry import Entry
|
||||
from ytdl_sub.plugins.plugin import Plugin
|
||||
from ytdl_sub.plugins.plugin import Plugin, PluginPriority
|
||||
from ytdl_sub.utils.ffmpeg import FFMPEG
|
||||
from ytdl_sub.utils.file_handler import FileHandler
|
||||
from ytdl_sub.utils.file_handler import FileMetadata
|
||||
|
|
@ -33,6 +33,7 @@ class EmbedThumbnailOptions(BoolValidator, OptionsValidator):
|
|||
|
||||
class EmbedThumbnailPlugin(Plugin[EmbedThumbnailOptions]):
|
||||
plugin_options_type = EmbedThumbnailOptions
|
||||
priority = PluginPriority(post_process=PluginPriority.MODIFY_AFTER_FILE_CONVERT)
|
||||
|
||||
@property
|
||||
def _embed_thumbnail(self) -> bool:
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ class PluginPriority:
|
|||
# If modify_entry priority is >= to this value, run after split
|
||||
MODIFY_ENTRY_AFTER_SPLIT = 10
|
||||
|
||||
# if post_process is >= to this value, run after file_convert
|
||||
MODIFY_AFTER_FILE_CONVERT = 10
|
||||
|
||||
MODIFY_ENTRY_FIRST = 0
|
||||
|
||||
def __init__(self, modify_entry: int = 5, post_process: int = 5):
|
||||
|
|
|
|||
Loading…
Reference in a new issue