OBSPlugin/main.py

37 lines
1.0 KiB
Python
Raw Normal View History

2023-11-25 13:49:41 +00:00
from src.backend.PluginManager.ActionBase import ActionBase
from src.backend.PluginManager.PluginBase import PluginBase
# Import gtk modules
import gi
gi.require_version("Gtk", "4.0")
gi.require_version("Adw", "1")
from gi.repository import Gtk, Adw, Gdk
import sys
import os
import threading
from datetime import timedelta
from loguru import logger as log
# Add plugin to sys.paths
sys.path.append(os.path.dirname(__file__))
from OBSActionBase import OBSActionBase
2024-01-14 10:50:34 +00:00
from actions.ToggleRecord.ToggleRecord import ToggleRecord
from actions.RecPlayPause.RecPlayPause import RecPlayPause
2023-11-25 13:49:41 +00:00
class OBS(PluginBase):
def __init__(self):
self.PLUGIN_NAME = "OBS"
self.GITHUB_REPO = "https://github.com/your-github-repo"
super().__init__()
2024-01-14 10:50:34 +00:00
# Launch backend
2024-01-14 12:56:10 +00:00
self.launch_backend(os.path.join(self.PATH, "backend", "backend.py"), os.path.join(self.PATH, ".venv"))
2023-11-25 13:49:41 +00:00
self.add_action(ToggleRecord)
self.add_action(RecPlayPause)
# Load custom css
self.add_css_stylesheet(os.path.join(self.PATH, "style.css"))