from manifest_edit.plugin.manifest_iterators import (
    ManifestIterator as BaseManifestIterator,
)
from manifest_edit.plugin.manifest_iterators import FieldMatcher

from schema import Schema


def _m3u8_get_function(element, attribute_name, default=None):
    return element.getByTag(attribute_name)


class ManifestIterator(BaseManifestIterator):

    _field_matcher = FieldMatcher(get_function=_m3u8_get_function)

    _recurse_keys = []

    def _schema(self):

        return Schema(dict)  # FIXME
