mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-11 15:45:42 +08:00
commit
b4ef31ea0d
4 changed files with 12 additions and 5 deletions
|
@ -32,6 +32,7 @@ To run the script in an interactive terminal with a list of possible commands ru
|
|||
python qbit_manage.py -h
|
||||
```
|
||||
## Support
|
||||
* If you have any questions or require support please join the [Notifiarr Discord](https://discord.com/invite/AURf8Yz) and post your question under the `qbit-manage` channel.
|
||||
* If you're getting an Error or have an Enhancement post in the [Issues](https://github.com/StuffAnThings/qbit_manage/issues/new).
|
||||
* If you have a configuration question post in the [Discussions](https://github.com/StuffAnThings/qbit_manage/discussions/new).
|
||||
* Pull Request are welcome but please submit them to the [develop branch](https://github.com/StuffAnThings/qbit_manage/tree/develop).
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.1.2
|
||||
3.1.3
|
|
@ -167,12 +167,13 @@ class Qbt:
|
|||
body += print_line(util.insert_space(f'New Tag: {tracker["tag"]}', 8), loglevel)
|
||||
body += print_line(util.insert_space(f'Tracker: {tracker["url"]}', 8), loglevel)
|
||||
body.extend(self.set_tags_and_limits(torrent, tracker["max_ratio"], tracker["max_seeding_time"], tracker["limit_upload_speed"], tracker["tag"]))
|
||||
category = self.config.get_category(torrent.save_path) if torrent.category == '' else torrent.category
|
||||
attr = {
|
||||
"function": "tag_update",
|
||||
"title": "Updating Tags",
|
||||
"body": "\n".join(body),
|
||||
"torrent_name": torrent.name,
|
||||
"torrent_category": torrent.category,
|
||||
"torrent_category": category,
|
||||
"torrent_tag": tracker["tag"],
|
||||
"torrent_tracker": tracker["url"],
|
||||
"notifiarr_indexer": tracker["notifiarr"],
|
||||
|
|
|
@ -160,16 +160,21 @@ with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION")) a
|
|||
version = line
|
||||
break
|
||||
|
||||
if os.path.exists(log_file):
|
||||
print(f"Log Warning: Log Path {log_file} does not exist. Logs will be saved in the default path: {os.path.join(default_dir, os.path.basename(log_file))}")
|
||||
if os.path.exists(os.path.dirname(log_file)):
|
||||
file_logger = log_file
|
||||
elif not os.path.exists(os.path.dirname(log_file)) and os.path.dirname(log_file) != '':
|
||||
os.makedirs(os.path.join(default_dir, 'logs'), exist_ok=True)
|
||||
print(f"Log Warning: Log Path {os.path.dirname(log_file)} does not exist. Logs will be saved in the default path: {os.path.join(default_dir, 'logs', os.path.basename(log_file))}")
|
||||
file_logger = os.path.join(default_dir, 'logs', os.path.basename(log_file))
|
||||
else:
|
||||
file_logger = os.path.join(default_dir, os.path.basename(log_file))
|
||||
os.makedirs(os.path.join(default_dir, 'logs'), exist_ok=True)
|
||||
file_logger = os.path.join(default_dir, 'logs', os.path.basename(log_file))
|
||||
max_bytes = 1024 * 1024 * 2
|
||||
file_handler = RotatingFileHandler(file_logger, delay=True, mode="w", maxBytes=max_bytes, backupCount=10, encoding="utf-8")
|
||||
util.apply_formatter(file_handler)
|
||||
file_handler.addFilter(fmt_filter)
|
||||
logger.addHandler(file_handler)
|
||||
logger.debug(f"Logs are saved in {file_logger}")
|
||||
|
||||
|
||||
def start():
|
||||
|
|
Loading…
Add table
Reference in a new issue