Skip to content

Commit

Permalink
4.1.9 (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobokun authored Sep 6, 2024
1 parent 87ffdda commit 66aec5b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 19 deletions.
18 changes: 3 additions & 15 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# Requirements Updated
- qbittorrent-api==2024.8.65
- croniter==3.0.3
- humanize==4.10.0

# New Updates
- Adds `force_auto_tmm_ignore_tags` feature to ignore tags when force_auto_tmm is enabled (#634)

# Bug Fixes
- Fixes Print the schedule and delay before starting the sleep (Closes [#605](https://github.com/StuffAnThings/qbit_manage/issues/605))
- Fixes noHL counting symlinks as part of its logic (Closes [#608](https://github.com/StuffAnThings/qbit_manage/issues/608))
- Fix typos in documentation (#627)
- Extended logging to explain why torrent files were not deleted (#625)

Special thanks to @ineednewpajamas, @glicholas, @Minituff, @Dark3clipse, @TJZine for their contributions!
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v4.1.7...v4.1.8
- Fixes Blutopia torrents being deleted due to passkeys being invalid (#646)
- Adds edit_passkey.py script
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v4.1.8...v4.1.9
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.8
4.1.9
4 changes: 1 addition & 3 deletions modules/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ class TorrentMessages:

IGNORE_MSGS = [
"YOU HAVE REACHED THE CLIENT LIMIT FOR THIS TORRENT",
"MISSING PASSKEY",
"PASSKEY", # Any mention of passkeys should be a clear sign it should NOT be deleted
"MISSING INFO_HASH",
"PASSKEY IS INVALID",
"INVALID PASSKEY",
"EXPECTED VALUE (LIST, DICT, INT OR STRING) IN BENCODED STRING",
"COULD NOT PARSE BENCODED DATA",
"STREAM TRUNCATED",
Expand Down
47 changes: 47 additions & 0 deletions scripts/edit_passkey.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
# This standalone script is used to edit passkeys from one tracker.
# Needs to have qbittorrent-api installed
# pip3 install qbittorrent-api
import sys

# --DEFINE VARIABLES--#
qbt_host = "qbittorrent:8080"
qbt_user = None
qbt_pass = None
TRACKER = "blutopia" # Part of the tracker URL, e.g., "blutopia" or "your-tracker.com"
OLD_PASSKEY = "OLD_PASSKEY"
NEW_PASSKEY = "NEW_PASSKEY"
# --DEFINE VARIABLES--#
# --START SCRIPT--#

try:
from qbittorrentapi import APIConnectionError
from qbittorrentapi import Client
from qbittorrentapi import LoginFailed
except ModuleNotFoundError:
print('Requirements Error: qbittorrent-api not installed. Please install using the command "pip install qbittorrent-api"')
sys.exit(1)


if __name__ == "__main__":
try:
client = Client(host=qbt_host, username=qbt_user, password=qbt_pass)
except LoginFailed:
raise ("Qbittorrent Error: Failed to login. Invalid username/password.")
except APIConnectionError:
raise ("Qbittorrent Error: Unable to connect to the client.")
except Exception:
raise ("Qbittorrent Error: Unable to connect to the client.")
torrent_list = client.torrents.info(sort="added_on", reverse=True)

for torrent in torrent_list:
for x in torrent.trackers:
if TRACKER in x.url and OLD_PASSKEY in x.url:
try:
newurl = x.url.replace(OLD_PASSKEY, NEW_PASSKEY)
print(f"Updating passkey for torrent name: {torrent.name}\n")
torrent.remove_trackers(urls=x.url)
torrent.add_trackers(urls=newurl)
except Exception as e:
print(f"Error updating tracker for {torrent.name}: {e}")
print("Passkey update completed.")

0 comments on commit 66aec5b

Please sign in to comment.