Merge branch 'auto_update' into develop

This commit is contained in:
misygauziya
2023-08-11 01:53:53 +09:00

13
VRCT.py
View File

@@ -1,7 +1,11 @@
from time import sleep from time import sleep
from os import path as os_path from os import path as os_path
from os import makedirs as os_makedirs
import subprocess
from shutil import unpack_archive
from json import load as json_load from json import load as json_load
from json import dump as json_dump from json import dump as json_dump
from requests import get as requests_get
from queue import Queue from queue import Queue
import tkinter as tk import tkinter as tk
import customtkinter import customtkinter
@@ -21,6 +25,8 @@ from audio_transcriber import AudioTranscriber
from translation import Translator from translation import Translator
from notification import notification_xsoverlay_for_vrct from notification import notification_xsoverlay_for_vrct
__version__ = "1.3.1"
class App(CTk): class App(CTk):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@@ -82,6 +88,7 @@ class App(CTk):
self.ENABLE_AUTO_CLEAR_CHATBOX = False self.ENABLE_AUTO_CLEAR_CHATBOX = False
self.ENABLE_OSC = False self.ENABLE_OSC = False
self.ENABLE_NOTICE_XSOVERLAY =False self.ENABLE_NOTICE_XSOVERLAY =False
self.UPDATE_FLAG = False
# load config # load config
if os_path.isfile(self.PATH_CONFIG) is not False: if os_path.isfile(self.PATH_CONFIG) is not False:
@@ -420,6 +427,12 @@ class App(CTk):
# check osc started # check osc started
send_test_action() send_test_action()
# check update
response = requests_get("https://api.github.com/repos/misyaguziya/VRCT/releases/latest")
tag_name = response.json()["tag_name"]
if tag_name != __version__:
self.UPDATE_FLAG = True
def button_config_callback(self): def button_config_callback(self):
self.foreground_stop() self.foreground_stop()
self.transcription_stop() self.transcription_stop()