Skip to content

Commit

Permalink
Merge pull request #5 from qvvonk/version_parse_patch
Browse files Browse the repository at this point in the history
Version parse patch
  • Loading branch information
qvvonk authored Jan 1, 2025
2 parents e95a897 + 4dc7acc commit bd5d2e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions smart_replays.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from __future__ import annotations
import os
import re
import sys
import json
import time
Expand All @@ -28,7 +29,6 @@
from datetime import datetime
from collections import deque
from threading import Lock, Thread
from packaging.version import Version
from enum import Enum

import tkinter as tk
Expand Down Expand Up @@ -175,10 +175,10 @@ def close(self):


# ------------- OBS Script ----------------
VERSION = "1.0.3"
VERSION = "1.0.4"
OBS_VERSION_STRING = obs.obs_get_version_string()
OBS_VERSION = Version(OBS_VERSION_STRING)

OBS_VERSION_RE = re.compile(r'(\d+)\.(\d+)\.(\d+)')
OBS_VERSION = [int(i) for i in OBS_VERSION_RE.match(OBS_VERSION_STRING).groups()]
FORCE_MODE_LOCK = Lock()
NAME_PROHIBITED_CHARS = r'/\:"<>*?|%'
PATH_PROHIBITED_CHARS = r'"<>*?|%'
Expand Down Expand Up @@ -846,7 +846,7 @@ def get_obs_config(section_name: str | None = None,
elif config_type is ConfigTypes.APP:
cfg = obs.obs_frontend_get_global_config()
else:
if OBS_VERSION.major < 31:
if OBS_VERSION[0] < 31:
cfg = obs.obs_frontend_get_global_config()
else:
cfg = obs.obs_frontend_get_user_config()
Expand Down

0 comments on commit bd5d2e6

Please sign in to comment.