mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-11 23:55:34 +08:00
# Breaking Change - `requirements.txt` is now replaced with `pyproject.toml` meaning that **local installs** will need to replace their update command `pip install -r requirements.txt` with `pip install .` - Those that are running qbit-manage in docker don't need to do anything and things will continue to work as is # Requirements Updated qbittorrent-api==2025.5.0 humanize==4.12.3 # New Updates - Added user defined stalled_tag. Configurable through config.yml. (Closes #802 Thanks to @Patchy3767) ## Bug Fixes - Fixed max_seeding time of 0 for share_limits (Fixes #790 Thanks to @glau-bd) - Fixed Upload Limit not reset when LastActive/MinSeedsNotMet (Fixes #804) - Fixed Share limits not showing in logs when 0 torrents are in the group(Fixes #789) - Fixes bug where it tries to remove root_dir when not using category (Fixes #777) **Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v4.2.2...v4.3.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Actionbot <actions@github.com> Co-authored-by: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Gerald Lau <glau@bitdefender.com> Co-authored-by: Patchy3767 <birabinowitz+github@gmail.com>
56 lines
1.9 KiB
Python
56 lines
1.9 KiB
Python
import json
|
|
import re
|
|
import subprocess
|
|
import sys
|
|
|
|
try:
|
|
from qbittorrentapi import Version
|
|
except ImportError:
|
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "qbittorrent-api"])
|
|
from qbittorrentapi import Version
|
|
|
|
# Check if a branch name was provided
|
|
if len(sys.argv) != 2:
|
|
print("Usage: python update_versions.py <branch_name>")
|
|
sys.exit(1)
|
|
|
|
branch_name = sys.argv[1]
|
|
print(f"Branch name: {branch_name}")
|
|
|
|
# Load or initialize the SUPPORTED_VERSIONS.json file
|
|
versions_file_path = "SUPPORTED_VERSIONS.json"
|
|
try:
|
|
with open(versions_file_path, encoding="utf-8") as file:
|
|
supported_versions = json.load(file)
|
|
except FileNotFoundError:
|
|
supported_versions = {}
|
|
|
|
# Extract the current qbittorrent-api version from pyproject.toml
|
|
print("Reading pyproject.toml...")
|
|
with open("pyproject.toml", encoding="utf-8") as file:
|
|
content = file.read()
|
|
match = re.search(r"qbittorrent-api==([\d.]+)", content)
|
|
if match:
|
|
qbittorrent_api_version = match.group(1)
|
|
else:
|
|
raise ValueError("qbittorrent-api version not found in pyproject.toml")
|
|
|
|
print(f"Current qbittorrent-api version: {qbittorrent_api_version}")
|
|
|
|
# Fetch the latest supported qBittorrent version
|
|
supported_version = Version.latest_supported_app_version()
|
|
print(f"Latest supported qBittorrent version: {supported_version}")
|
|
|
|
# Ensure the branch is initialized in the dictionary
|
|
if branch_name not in supported_versions:
|
|
supported_versions[branch_name] = {}
|
|
|
|
# Update the versions in the dictionary
|
|
supported_versions[branch_name]["qbit"] = supported_version
|
|
supported_versions[branch_name]["qbitapi"] = qbittorrent_api_version
|
|
|
|
print("Writing updated versions to SUPPORTED_VERSIONS.json...")
|
|
# Write the updated versions back to SUPPORTED_VERSIONS.json
|
|
with open(versions_file_path, "w", encoding="utf-8") as file:
|
|
json.dump(supported_versions, file, indent=4)
|
|
file.write("\n")
|