diff --git a/.vscode/settings.json b/.vscode/settings.json index dc59712..22a1de1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,9 @@ { "cSpell.words": [ "Didnt", + "offtopic", + "outro", + "selfpromo", "sponsorblock" ] } \ No newline at end of file diff --git a/python_sponsorblock/constants.py b/python_sponsorblock/constants.py new file mode 100644 index 0000000..c831512 --- /dev/null +++ b/python_sponsorblock/constants.py @@ -0,0 +1,38 @@ +from typing import Tuple +from dataclasses import dataclass +from enum import Enum + + +class Category(Enum): + SPONSOR = "sponsor" + SELFPROMO = "selfpromo" + INTERACTION = "interaction" + INTRO = "intro" + OUTRO = "outro" + PREVIEW = "preview" + MUSIC_OFFTOPIC = "music_offtopic" + FILLER = "filler" + + +class ActionType(Enum): + SKIP = "skip" + MUTE = "mute" + FULL = "full" + POI = "poi" + CHAPTER = "chapter" + + +class Service(Enum): + YOUTUBE = "YouTube" + + +@dataclass +class Segment: + UUID: str + segment: Tuple[float, float] + category: Category + videoDuration: float + actionType: ActionType + locked: int + votes: int + description: str