from manifest_edit.plugin.m3u8_media import BasePlugin
from schema import Schema
from manifest_edit.context import Context


class Plugin(BasePlugin):
    """
    custom plugin.

    By default, this plugin has no specified behaviour except leaving the
    manifest as-is. You can customize the handling of the manifest in any way
    that you want, by editing the process() function below.
    """

    _name = __name__

    def schema(self):
        return Schema({})

    def process(self, manifest, storage):
        Context.log_debug('custom plugin processing start')

        # Add python statements that modify 'manifest' here.

        # Example: add an additional tag to the media playlist:
        #manifest.additionalTags.append('#MY-CUSTOM-TAG')
