OBSPlugin/main.py

39 lines
1.1 KiB
Python
Raw Normal View History

2024-01-14 10:50:34 +00:00
from plugins.dev_core447_OBSPlugin.backend.OBSController import OBSController
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
from obswebsocket import events
# 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
self.launch_backend(os.path.join(self.PATH, "backend", "backend.py"))
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"))