python-sponsorblock/python_sponsorblock/constants.py

39 lines
682 B
Python
Raw Normal View History

2024-04-24 10:09:22 +00:00
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