diff --git a/tubot/dirgetter/__init__.py b/tubot/dirgetter/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tubot/dirgetter/abc.py b/tubot/dirgetter/abc.py new file mode 100644 index 0000000..ef583d0 --- /dev/null +++ b/tubot/dirgetter/abc.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +############################################ +# Directory-Getter module abstract classes # +############################################ + +# Imports +from abc import ABC, abstractmethod +from tubot.static.abc import IValidatable +from tubot.dirgetter.types import GetterTypes + + +class DirGetter(IValidatable, ABC): + + _gtype: GetterTypes + + def __init__(self) -> None: + if self._gtype is None: + raise NotImplementedError("DirGetter type is not implemented") + + @property + @abstractmethod + async def folders(self) -> dict: + """ + Returns a dictionary of media folders {name: path} + + :return: Dict of media folders + """ + raise NotImplementedError diff --git a/tubot/dirgetter/types.py b/tubot/dirgetter/types.py new file mode 100644 index 0000000..8018bea --- /dev/null +++ b/tubot/dirgetter/types.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +##################################### +# Types for Directory-Getter module # +##################################### + +# Imports +from enum import Enum + + +class GetterTypes(Enum): + """ + Types of getters + """ + + OS = "Python os module" + Jellyfin = "Jelyfin API"