Skip to content

Commit

Permalink
3.0.032
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmanjacobd committed Dec 10, 2024
1 parent e243f9a commit ef000dc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
<details><summary>List all subcommands</summary>

$ library
library (v3.0.031; 99 subcommands)
library (v3.0.032; 99 subcommands)

Create database subcommands:
╭─────────────────┬──────────────────────────────────────────╮
Expand Down Expand Up @@ -2141,6 +2141,7 @@ Inspired somewhat by https://nikkhokkho.sourceforge.io/?page=FileOptimizer
usage: library torrents-stop

Stop torrents in qBittorrent-nox with the following defaults:
- tagged 'xklb'
- >180 days active seeding
- >90 days since last peer
- >3 current seeders
Expand All @@ -2150,7 +2151,7 @@ Inspired somewhat by https://nikkhokkho.sourceforge.io/?page=FileOptimizer

library torrents-stop --min-seeders 3 --min-days-stalled-seed 10 --min-days-seeding 14

When --mark-deleted is provided, the torrents are tagged with 'delete' in qBittorrent
When --mark-deleted is provided, the torrents are tagged with 'xklb-delete' in qBittorrent
When --delete-rows is provided, the metadata is removed from qBittorrent
When --delete-files is provided, the downloaded files are deleted

Expand All @@ -2165,6 +2166,7 @@ Inspired somewhat by https://nikkhokkho.sourceforge.io/?page=FileOptimizer
usage: library torrents-stop-incomplete

Stop torrents in qBittorrent-nox with the following defaults:
- tagged 'xklb'
- >90 days since last seen complete (or never)
- >60 days active downloading
- >30 days since last peer (or never)
Expand All @@ -2173,7 +2175,7 @@ Inspired somewhat by https://nikkhokkho.sourceforge.io/?page=FileOptimizer

library torrents-stop --min-days-downloading 7

When --mark-deleted is provided, the torrents are tagged with 'delete' in qBittorrent
When --mark-deleted is provided, the torrents are tagged with 'xklb-delete' in qBittorrent
When --delete-rows is provided, the metadata is removed from qBittorrent
When --delete-files is provided, all downloaded files are deleted.
By default, salvage is provided to files which have more than 73% progress.
Expand Down
2 changes: 1 addition & 1 deletion xklb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from xklb.utils import argparse_utils, iterables
from xklb.utils.log_utils import log

__version__ = "3.0.031"
__version__ = "3.0.032"

progs = {
"Create database subcommands": {
Expand Down
6 changes: 5 additions & 1 deletion xklb/createdb/torrents_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

def parse_args():
parser = argparse_utils.ArgumentParser(usage=usage.torrents_add)

parser.add_argument(
"--force",
action="store_true",
help="Add metadata for paths even if the info_hash already exists in the media table",
)
arggroups.debug(parser)

arggroups.database(parser)
Expand Down
2 changes: 1 addition & 1 deletion xklb/mediafiles/torrents_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def torrents_stop():

qbt_client = start_qBittorrent(args)

torrents = qbt_client.torrents_info()
torrents = qbt_client.torrents_info(tag="xklb")
torrents = sorted(torrents, key=lambda t: -t.added_on)

states = ["queuedUP", "forcedUP", "stalledUP", "uploading"]
Expand Down
2 changes: 1 addition & 1 deletion xklb/mediafiles/torrents_stop_incomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def torrents_stop_incomplete():

qbt_client = start_qBittorrent(args)

torrents = qbt_client.torrents_info()
torrents = qbt_client.torrents_info(tag="xklb")
torrents = sorted(torrents, key=lambda t: -t.added_on)

states = ["queuedDL", "forcedDL", "stalledDL", "downloading", "forcedMetaDL", "metaDL"]
Expand Down
6 changes: 4 additions & 2 deletions xklb/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,7 @@ def play(action) -> str:
torrents_stop = """library torrents-stop
Stop torrents in qBittorrent-nox with the following defaults:
- tagged 'xklb'
- >180 days active seeding
- >90 days since last peer
- >3 current seeders
Expand All @@ -1946,14 +1947,15 @@ def play(action) -> str:
library torrents-stop --min-seeders 3 --min-days-stalled-seed 10 --min-days-seeding 14
When --mark-deleted is provided, the torrents are tagged with 'delete' in qBittorrent
When --mark-deleted is provided, the torrents are tagged with 'xklb-delete' in qBittorrent
When --delete-rows is provided, the metadata is removed from qBittorrent
When --delete-files is provided, the downloaded files are deleted
"""

torrents_stop_incomplete = """library torrents-stop-incomplete
Stop torrents in qBittorrent-nox with the following defaults:
- tagged 'xklb'
- >90 days since last seen complete (or never)
- >60 days active downloading
- >30 days since last peer (or never)
Expand All @@ -1962,7 +1964,7 @@ def play(action) -> str:
library torrents-stop --min-days-downloading 7
When --mark-deleted is provided, the torrents are tagged with 'delete' in qBittorrent
When --mark-deleted is provided, the torrents are tagged with 'xklb-delete' in qBittorrent
When --delete-rows is provided, the metadata is removed from qBittorrent
When --delete-files is provided, all downloaded files are deleted.
By default, salvage is provided to files which have more than 73%% progress.
Expand Down

0 comments on commit ef000dc

Please sign in to comment.