mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91482760b6 | |||
| 83fa23df58 | |||
| 41d28095c2 | |||
| de2e49e60b | |||
| dd6d16d833 | |||
| 7d0c8d16ec | |||
| 80750f010f | |||
| c93f6345c8 | |||
| a7132ed1cd | |||
| a2cff15d0d | |||
| 2eb384f7cf | |||
| 05a5b04507 | |||
| 87c974f124 | |||
| 95a687ddd9 | |||
| 813d2b31c4 | |||
| deb5ce5b88 | |||
| a11c1d7129 | |||
| dcc78ade44 |
+49
-39
@@ -25,16 +25,19 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
artifact_name: SoftwareManager-dev-linux
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-linux
|
||||||
asset_name: SoftwareManager-dev-linux
|
asset_name: SoftwareManager-dev-${{ github.sha }}-linux
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
artifact_name: SoftwareManager-dev-windows.exe
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
|
||||||
asset_name: SoftwareManager-dev-windows.exe
|
asset_name: SoftwareManager-dev-${{ github.sha }}-windows.exe
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
artifact_name: SoftwareManager-dev-macos
|
artifact_name: SoftwareManager-dev-${{ github.sha }}-macos
|
||||||
asset_name: SoftwareManager-dev-macos
|
asset_name: SoftwareManager-dev-${{ github.sha }}-macos
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
short_sha: ${{ steps.version.outputs.short_sha }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -66,7 +69,33 @@ jobs:
|
|||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install pyinstaller
|
pip install pyinstaller
|
||||||
|
|
||||||
- name: Build executable with PyInstaller
|
- name: Generate version
|
||||||
|
id: version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
COMMIT_SHA=${{ github.sha }}
|
||||||
|
SHORT_SHA=${COMMIT_SHA:0:7}
|
||||||
|
VERSION="${SHORT_SHA}-dev"
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
||||||
|
echo "Generated version: $VERSION"
|
||||||
|
|
||||||
|
- name: Inject commit hash into code (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$json = '{
|
||||||
|
"version": "' + $env:VERSION + '"
|
||||||
|
}'
|
||||||
|
$json | Out-File -Encoding utf8 build_info.json
|
||||||
|
|
||||||
|
- name: Build executable with PyInstaller (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --name ${{ env.APP_NAME }} main.py
|
||||||
|
|
||||||
|
- name: Build executable with PyInstaller (Unix)
|
||||||
|
if: runner.os != 'Windows'
|
||||||
run: pyinstaller --onefile --windowed --name ${{ env.APP_NAME }} main.py
|
run: pyinstaller --onefile --windowed --name ${{ env.APP_NAME }} main.py
|
||||||
|
|
||||||
- name: Make executable (Unix)
|
- name: Make executable (Unix)
|
||||||
@@ -94,49 +123,30 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/download-artifact@v4
|
||||||
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Display downloaded artifacts
|
|
||||||
run: |
|
|
||||||
echo "Downloaded artifacts:"
|
|
||||||
find artifacts -type f
|
|
||||||
ls -la artifacts/
|
|
||||||
|
|
||||||
- name: Generate version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${{ github.sha }}
|
|
||||||
SHORT_SHA=${COMMIT_SHA:0:7}
|
|
||||||
VERSION="${SHORT_SHA}-dev"
|
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
||||||
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
|
||||||
echo "Generated version: ${VERSION}"
|
|
||||||
|
|
||||||
- name: Prepare release files
|
- name: Prepare release files
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-linux release/SoftwareManager-dev-linux
|
SHORT_SHA="${{ needs.build.outputs.short_sha }}"
|
||||||
cp artifacts/windows-latest-build/SoftwareManager-dev-windows.exe release/SoftwareManager-dev-windows.exe
|
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-*-linux release/SoftwareManager-dev-${SHORT_SHA}-linux
|
||||||
cp artifacts/macos-latest-build/SoftwareManager-dev-macos release/SoftwareManager-dev-macos
|
cp artifacts/windows-latest-build/SoftwareManager-dev-*-windows.exe release/SoftwareManager-dev-${SHORT_SHA}-windows.exe
|
||||||
chmod +x release/SoftwareManager-dev-linux release/SoftwareManager-dev-macos
|
cp artifacts/macos-latest-build/SoftwareManager-dev-*-macos release/SoftwareManager-dev-${SHORT_SHA}-macos
|
||||||
|
chmod +x release/SoftwareManager-dev-*-linux release/SoftwareManager-dev-*-macos
|
||||||
ls -la release/
|
ls -la release/
|
||||||
|
|
||||||
- name: Create Release (Public)
|
- name: Create Release (Public)
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.version.outputs.version }}
|
tag_name: ${{ needs.build.outputs.version }}
|
||||||
name: ${{ steps.version.outputs.version }}
|
name: ${{ needs.build.outputs.version }}
|
||||||
draft: false
|
prerelease: true
|
||||||
prerelease: false
|
|
||||||
files: |
|
files: |
|
||||||
release/SoftwareManager-dev-linux
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-linux
|
||||||
release/SoftwareManager-dev-windows.exe
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows.exe
|
||||||
release/SoftwareManager-dev-macos
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-macos
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ from PySide6.QtWidgets import (
|
|||||||
QLabel,
|
QLabel,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QSpinBox,
|
QSpinBox,
|
||||||
|
QCheckBox,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def settings_dialog(self):
|
def settings_dialog(self):
|
||||||
|
|
||||||
if state.debug:
|
if state.debug:
|
||||||
@@ -29,7 +27,20 @@ def settings_dialog(self):
|
|||||||
|
|
||||||
def close_settings():
|
def close_settings():
|
||||||
dialog.reject()
|
dialog.reject()
|
||||||
|
|
||||||
|
checkbox_container = QWidget()
|
||||||
|
checkbox_layout = QHBoxLayout()
|
||||||
|
|
||||||
|
# ignore updates checkbox
|
||||||
|
checkbox = QCheckBox()
|
||||||
|
checkbox_container.setLayout(checkbox_layout)
|
||||||
|
checkbox_layout.addWidget(QLabel("Ignore Updates: "))
|
||||||
|
checkbox_layout.addStretch()
|
||||||
|
checkbox.setChecked(state.ignore_updates)
|
||||||
|
checkbox.toggled.connect(lambda checked: setattr(state, 'ignore_updates', checked))
|
||||||
|
checkbox_layout.addWidget(checkbox)
|
||||||
|
dialog.layout().addWidget(checkbox_container)
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# THREAD SETTING #
|
# THREAD SETTING #
|
||||||
##################
|
##################
|
||||||
@@ -119,4 +130,4 @@ def settings_dialog(self):
|
|||||||
|
|
||||||
dialog.layout().addLayout(layout)
|
dialog.layout().addLayout(layout)
|
||||||
|
|
||||||
dialog.exec()
|
dialog.exec()
|
||||||
|
|||||||
+39
-23
@@ -16,8 +16,8 @@ from PySide6.QtWidgets import (
|
|||||||
QHeaderView,
|
QHeaderView,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QTableWidget,
|
QTableWidget,
|
||||||
QTableWidgetItem,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from PySide6.QtGui import QIcon, QAction, QCloseEvent
|
from PySide6.QtGui import QIcon, QAction, QCloseEvent
|
||||||
import darkdetect
|
import darkdetect
|
||||||
import threading
|
import threading
|
||||||
@@ -27,7 +27,7 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from core.utils.config.settings import save_settings
|
import json
|
||||||
from core.utils.general.wrappers import run_thread
|
from core.utils.general.wrappers import run_thread
|
||||||
from core.utils.data.state import state
|
from core.utils.data.state import state
|
||||||
from core.utils.network.download import download_selected
|
from core.utils.network.download import download_selected
|
||||||
@@ -38,43 +38,52 @@ from core.interface.utils.searchhelper import return_pressed
|
|||||||
from core.interface.dialogs.settings import settings_dialog
|
from core.interface.dialogs.settings import settings_dialog
|
||||||
from core.network.aria2_integration import dlprogress
|
from core.network.aria2_integration import dlprogress
|
||||||
|
|
||||||
|
print(os.path.abspath(__file__))
|
||||||
|
|
||||||
def download_update(latest_version):
|
def download_update(latest_version):
|
||||||
filename = "SoftwareManager-dev-windows.exe"
|
old_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||||
url = "https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-windows.exe"
|
new_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||||
|
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version}-windows.exe"
|
||||||
|
|
||||||
print("Downloading update...")
|
print("Downloading update...")
|
||||||
if os.path.exists(filename):
|
if os.path.exists(old_filename):
|
||||||
os.remove(filename)
|
os.remove(old_filename)
|
||||||
response = r.get(url, allow_redirects=True)
|
response = r.get(url, allow_redirects=True)
|
||||||
with open(filename, "wb") as f:
|
with open(new_filename, "wb") as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
if not os.path.exists(filename):
|
if not os.path.exists(new_filename):
|
||||||
raise FileNotFoundError(f"Executable not found")
|
raise FileNotFoundError(f"Executable not found")
|
||||||
subprocess.Popen([filename], shell=True)
|
subprocess.Popen([new_filename], shell=True)
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
save_settings(version=latest_version)
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
build_info_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "build_info.json")
|
||||||
|
if os.path.exists(build_info_path):
|
||||||
|
with open(build_info_path, "r") as f:
|
||||||
|
build_info = json.load(f)
|
||||||
|
state.version = build_info.get("version")
|
||||||
|
|
||||||
# Check for updates on Windows
|
# Check for updates on Windows
|
||||||
if platform.system() == "Windows":
|
if state.ignore_updates is False:
|
||||||
result = check_for_updates()
|
if platform.system() == "Windows":
|
||||||
assets, latest_version = result
|
result = check_for_updates()
|
||||||
|
assets, latest_version = result
|
||||||
|
|
||||||
if assets:
|
if assets:
|
||||||
msg = QMessageBox()
|
msg = QMessageBox()
|
||||||
msg.setIcon(QMessageBox.Information)
|
msg.setIcon(QMessageBox.Information)
|
||||||
msg.setWindowTitle("Update Available")
|
msg.setWindowTitle("Update Available")
|
||||||
msg.setText(f"A new version is available.")
|
msg.setText(f"A new version is available.")
|
||||||
msg.setInformativeText("Please visit the GitHub releases page to download the latest version.")
|
msg.setInformativeText("Please visit the GitHub releases page to download the latest version.")
|
||||||
msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Ignore)
|
msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Ignore)
|
||||||
|
|
||||||
response = msg.exec_()
|
response = msg.exec_()
|
||||||
if response == QMessageBox.Ok:
|
if response == QMessageBox.Ok:
|
||||||
download_update(latest_version)
|
download_update(latest_version)
|
||||||
|
|
||||||
self.setWindowTitle("Software Manager")
|
self.setWindowTitle("Software Manager")
|
||||||
self.setGeometry(100, 100, 800, 600)
|
self.setGeometry(100, 100, 800, 600)
|
||||||
@@ -109,6 +118,9 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
self.qtablewidget.verticalHeader().setVisible(False)
|
self.qtablewidget.verticalHeader().setVisible(False)
|
||||||
self.qtablewidget.setHorizontalHeaderLabels(["Post Title", "Author"])
|
self.qtablewidget.setHorizontalHeaderLabels(["Post Title", "Author"])
|
||||||
self.qtablewidget.horizontalHeader().setSectionResizeMode(0, QHeaderView.Stretch)
|
self.qtablewidget.horizontalHeader().setSectionResizeMode(0, QHeaderView.Stretch)
|
||||||
|
self.qtablewidget.setAttribute(Qt.WA_TranslucentBackground)
|
||||||
|
self.qtablewidget.viewport().setAttribute(Qt.WA_TranslucentBackground)
|
||||||
|
|
||||||
header = self.qtablewidget.horizontalHeader()
|
header = self.qtablewidget.horizontalHeader()
|
||||||
header.setSectionResizeMode(1, QHeaderView.Fixed)
|
header.setSectionResizeMode(1, QHeaderView.Fixed)
|
||||||
header.resizeSection(1, 500)
|
header.resizeSection(1, 500)
|
||||||
@@ -158,6 +170,8 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
self.downloadList.horizontalHeader().setStretchLastSection(False)
|
self.downloadList.horizontalHeader().setStretchLastSection(False)
|
||||||
self.downloadList.horizontalHeader().setSectionResizeMode(0, QHeaderView.Stretch)
|
self.downloadList.horizontalHeader().setSectionResizeMode(0, QHeaderView.Stretch)
|
||||||
self.downloadList.setSelectionBehavior(QTableView.SelectRows)
|
self.downloadList.setSelectionBehavior(QTableView.SelectRows)
|
||||||
|
self.downloadList.setAttribute(Qt.WA_TranslucentBackground)
|
||||||
|
self.downloadList.viewport().setAttribute(Qt.WA_TranslucentBackground)
|
||||||
|
|
||||||
# download button triggers
|
# download button triggers
|
||||||
self.dlbutton.clicked.connect(lambda: run_thread(threading.Thread(target=download_selected, args=(self.qtablewidget.currentItem(), state.posts, state.post_titles))))
|
self.dlbutton.clicked.connect(lambda: run_thread(threading.Thread(target=download_selected, args=(self.qtablewidget.currentItem(), state.posts, state.post_titles))))
|
||||||
@@ -175,6 +189,8 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
self.tab1 = create_tab("Search", self.searchbar, self.qtablewidget, self.tabs, self.dlbutton, self.horizontal_layout)
|
self.tab1 = create_tab("Search", self.searchbar, self.qtablewidget, self.tabs, self.dlbutton, self.horizontal_layout)
|
||||||
self.tab2 = create_tab("Library", self.emptyLibrary, self.libraryList, self.tabs, None, None)
|
self.tab2 = create_tab("Library", self.emptyLibrary, self.libraryList, self.tabs, None, None)
|
||||||
self.tab3 = create_tab("Downloads", self.emptyDownload, self.downloadList, self.tabs, None, None)
|
self.tab3 = create_tab("Downloads", self.emptyDownload, self.downloadList, self.tabs, None, None)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
containerLayout.addWidget(self.tabs)
|
containerLayout.addWidget(self.tabs)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ from core.utils.data.state import state
|
|||||||
def create_config():
|
def create_config():
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|
||||||
config["General"] = {"debug": True, "api_url": f"{state.api_url}", "aria2_threads": f"{state.aria2_threads}", "download_path": f"{state.download_path}", f"speed_limit": f"{state.speed_limit}",
|
config["General"] = {"debug": True, "api_url": f"{state.api_url}", "aria2_threads": f"{state.aria2_threads}", "download_path": f"{state.download_path}", f"speed_limit": f"{state.speed_limit}",
|
||||||
"version": f"{state.version}"}
|
"ignore_updates": f"{state.ignore_updates}"}
|
||||||
|
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
config_dir = os.environ.get("APPDATA", os.path.expanduser("~\\AppData\\Roaming"))
|
config_dir = os.environ.get("APPDATA", os.path.expanduser("~\\AppData\\Roaming"))
|
||||||
@@ -42,4 +42,4 @@ def read_config():
|
|||||||
state.aria2_threads = config.getint("General", "aria2_threads")
|
state.aria2_threads = config.getint("General", "aria2_threads")
|
||||||
state.download_path = config.get("General", "download_path")
|
state.download_path = config.get("General", "download_path")
|
||||||
state.speed_limit = config.getint("General", "speed_limit")
|
state.speed_limit = config.getint("General", "speed_limit")
|
||||||
state.version = config.get("General", "version")
|
state.ignore_updates = config.getboolean("General", "ignore_updates")
|
||||||
|
|||||||
@@ -1,39 +1,19 @@
|
|||||||
from core.utils.data.state import state
|
from core.utils.data.state import state
|
||||||
|
from core.utils.general.shutdown import kill_aria2server
|
||||||
from .config import create_config
|
from .config import create_config
|
||||||
|
|
||||||
def restart_aria2c():
|
def restart_aria2c():
|
||||||
import main # had to do this because of circle import :(
|
import main # had to do this because of circle import :(
|
||||||
import signal
|
import signal
|
||||||
import atexit
|
import atexit
|
||||||
import time
|
kill_aria2server()
|
||||||
|
state.aria2process.wait()
|
||||||
|
state.aria2process = main.run_aria2server()
|
||||||
|
signal.signal(signal.SIGINT, main.keyboardinterrupthandler)
|
||||||
|
atexit.unregister(kill_aria2server)
|
||||||
|
atexit.register(kill_aria2server)
|
||||||
|
|
||||||
try:
|
def save_settings(thread_count=None, close=lambda: None, apiurl=None, download_path=None, speed_limit=None):
|
||||||
main.kill_aria2server()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Warning: aria2server kill failed: {e}")
|
|
||||||
|
|
||||||
try:
|
|
||||||
if state.aria2process:
|
|
||||||
state.aria2process.wait(timeout=3)
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Warning: aria2process wait failed: {e}")
|
|
||||||
|
|
||||||
time.sleep(0.5)
|
|
||||||
|
|
||||||
try:
|
|
||||||
state.aria2process = main.run_aria2server()
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error: failed to restart aria2server: {e}")
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
signal.signal(signal.SIGINT, main.keyboardinterrupthandler)
|
|
||||||
atexit.unregister(main.kill_aria2server)
|
|
||||||
atexit.register(main.kill_aria2server)
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Warning: signal/atexit setup failed: {e}")
|
|
||||||
|
|
||||||
def save_settings(thread_count=None, close=lambda: None, apiurl=None, download_path=None, speed_limit=None, version=None):
|
|
||||||
if thread_count is not None:
|
if thread_count is not None:
|
||||||
state.aria2_threads = thread_count
|
state.aria2_threads = thread_count
|
||||||
if apiurl is not None:
|
if apiurl is not None:
|
||||||
@@ -42,8 +22,6 @@ def save_settings(thread_count=None, close=lambda: None, apiurl=None, download_p
|
|||||||
state.download_path = download_path
|
state.download_path = download_path
|
||||||
if speed_limit is not None:
|
if speed_limit is not None:
|
||||||
state.speed_limit = speed_limit
|
state.speed_limit = speed_limit
|
||||||
if version is not None:
|
|
||||||
state.version = version
|
|
||||||
|
|
||||||
create_config()
|
create_config()
|
||||||
restart_aria2c()
|
restart_aria2c()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class AppState:
|
|||||||
post_author: List[str]
|
post_author: List[str]
|
||||||
downloads: List[str]
|
downloads: List[str]
|
||||||
version: str
|
version: str
|
||||||
|
ignore_updates: bool = False
|
||||||
debug: bool = False
|
debug: bool = False
|
||||||
tracker: str = "rutracker"
|
tracker: str = "rutracker"
|
||||||
api_url: str = "https://api.michijackson.xyz"
|
api_url: str = "https://api.michijackson.xyz"
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ def check_for_updates():
|
|||||||
latest_version = latest_release["name"]
|
latest_version = latest_release["name"]
|
||||||
assets = latest_release["assets"]
|
assets = latest_release["assets"]
|
||||||
|
|
||||||
if latest_version != state.version:
|
|
||||||
|
if state.version == "dev":
|
||||||
|
if state.debug:
|
||||||
|
print("Dev release detected, skipping version check")
|
||||||
|
return None, None
|
||||||
|
elif latest_version != state.version:
|
||||||
if state.debug:
|
if state.debug:
|
||||||
print(f"New release available: {latest_version}")
|
print(f"New release available: {latest_version}")
|
||||||
if assets:
|
if assets:
|
||||||
|
|||||||
Reference in New Issue
Block a user