4
1
Fork 1
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
qBitDownload-Bot/tubot/dirgetter/abc.py

30 lines
727 B
Python
Raw Normal View History

# -*- 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