Skip to content

Commit

Permalink
[minor] Merge pull request #87 from Feramance/85-request-disable-tag-…
Browse files Browse the repository at this point in the history
…usage

New config `TAGLESS` to function without adding tags to torrent on qbittorrent
  • Loading branch information
Feramance authored Aug 23, 2024
2 parents 25cba25 + c072f9d commit 020f507
Show file tree
Hide file tree
Showing 13 changed files with 424 additions and 200 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ newenv:
.venv/bin/pip install -U wheel
$(MAKE) syncenv
syncenv:
python.exe -m pip install --upgrade pip
pip install -Ur requirements.all.txt
help:
@echo "$$HELP_BODY"
3 changes: 3 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ FailedCategory = "failed"
# Add torrents to this category to trigger them to be rechecked properly
RecheckCategory = "recheck"

# Tagless operation
Tagless = false

# Ignore Torrents which are younger than this value (in seconds: 600 = 10 Minutes)
# Only applicable to Re-check and failed categories
IgnoreTorrentsYoungerThan = 600
Expand Down
463 changes: 331 additions & 132 deletions qBitrr/arss.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions qBitrr/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def process_flags() -> argparse.Namespace | bool:
RECHECK_CATEGORY = ENVIRO_CONFIG.settings.recheck_category or CONFIG.get(
"Settings.RecheckCategory", fallback="recheck"
)
TAGLESS = ENVIRO_CONFIG.settings.tagless or CONFIG.get("Settings.Tagless", fallback=False)
CONSOLE_LOGGING_LEVEL_STRING = ENVIRO_CONFIG.settings.console_level or CONFIG.get(
"Settings.ConsoleLevel", fallback="INFO"
)
Expand Down
1 change: 1 addition & 0 deletions qBitrr/env_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Settings:
auto_pause_resume = environ.var(None, converter=Converter.bool)
failed_category = environ.var(None)
recheck_category = environ.var(None)
tagless = environ.var(None, converter=Converter.bool)
ignore_torrents_younger_than = environ.var(None, converter=Converter.int)
ping_urls = environ.var(None, converter=Converter.list)
ffprobe_auto_update = environ.var(None, converter=Converter.bool)
Expand Down
6 changes: 6 additions & 0 deletions qBitrr/gen_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ def _add_settings_section(config: TOMLDocument):
"RecheckCategory",
ENVIRO_CONFIG.settings.recheck_category or "recheck",
)
_gen_default_line(
settings,
"Tagless operation",
"Tagless",
ENVIRO_CONFIG.settings.tagless or False,
)
_gen_default_line(
settings,
[
Expand Down
2 changes: 2 additions & 0 deletions qBitrr/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
PING_URLS,
RECHECK_CATEGORY,
SEARCH_LOOP_DELAY,
TAGLESS,
)

__all__ = ("run_logs",)
Expand Down Expand Up @@ -128,6 +129,7 @@ def log_Debugs(logger):
logger.debug("Script Config: Logging=%s", ENABLE_LOGS)
logger.debug("Script Config: FailedCategory=%s", FAILED_CATEGORY)
logger.debug("Script Config: RecheckCategory=%s", RECHECK_CATEGORY)
logger.debug("Script Config: Tagless=%s", TAGLESS)
logger.debug("Script Config: CompletedDownloadFolder=%s", COMPLETED_DOWNLOAD_FOLDER)
logger.debug("Script Config: FreeSpace=%s", FREE_SPACE)
logger.debug("Script Config: LoopSleepTimer=%s", LOOP_SLEEP_TIMER)
Expand Down
9 changes: 9 additions & 0 deletions qBitrr/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,12 @@ class MovieQueueModel(Model):
class EpisodeQueueModel(Model):
EntryId = IntegerField(unique=True)
Completed = BooleanField(default=False)


class TorrentLibrary(Model):
Hash = TextField(null=False)
Category = TextField(null=False)
AllowedSeeding = BooleanField(default=False)
Imported = BooleanField(default=False)
AllowedStalled = BooleanField(default=False)
FreeSpacePaused = BooleanField(default=False)
4 changes: 2 additions & 2 deletions qBitrr2.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: qBitrr2
Version: 4.7.5
Version: 4.8.3
Summary: "A simple Python script to talk to qBittorrent and Arr's"
Home-page: https://github.com/Feramance/qBitrr
Author: Feramance
Expand Down Expand Up @@ -91,7 +91,7 @@ A simple script to monitor [qBit](https://github.com/qbittorrent/qBittorrent) an

## Notice

I am starting development on qBitrr+ which will be C# based for better overall performance and will also include a WebUI for better refined control on setting and what to search/upgrade etc. Hoping this will be the be all and end all application to manage your Radarr/Sonarr, Overseerr/Ombi and qBittorrent instances in one UI. This is still in it's very early stages and will likely be a couple months before a concrete beta is rolled out (from start of February 2024). Once I have something solid I will remove this notice and add a link to the new qBitrr+, in the meantime I will be sharing periodic updates on my [Patreon](https://patreon.com/qBitrr)
I am starting development on qBitrr+ which will be C# based for better overall performance and will also include a WebUI for better refined control on setting and what to search/upgrade etc. Hoping this will be the be all and end all application to manage your Radarr/Sonarr, Overseerr/Ombi and qBittorrent instances in one UI. This is still in it's very early stages and will likely be a couple months before a concrete alpha is rolled out (from start of February 2024). Once I have something solid I will remove this notice and add a link to the new qBitrr+, in the meantime I will be sharing periodic updates on my [Patreon](https://patreon.com/qBitrr)

## Features

Expand Down
55 changes: 27 additions & 28 deletions requirements.all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
altgraph==0.17.4
# via pyinstaller
attrs==23.2.0
attrs==24.2.0
# via environ-config
backports-tarfile==1.2.0
# via jaraco-context
Expand All @@ -20,8 +20,6 @@ cachetools==5.3.2
# via qBitrr2 (setup.py)
certifi==2024.7.4
# via requests
cffi==1.16.0
# via cryptography
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
Expand All @@ -32,12 +30,13 @@ click==8.1.7
# pip-tools
colorama==0.4.4
# via
# build
# click
# qBitrr2 (setup.py)
# tqdm
# twine
coloredlogs==15.0.1
# via qBitrr2 (setup.py)
cryptography==42.0.8
# via secretstorage
dill==0.3.8
# via
# multiprocess
Expand All @@ -56,43 +55,39 @@ future==1.0.0
# via ffmpeg-python
humanfriendly==10.0
# via coloredlogs
identify==2.5.36
identify==2.6.0
# via pre-commit
idna==3.7
# via requests
importlib-metadata==7.2.1
importlib-metadata==8.4.0
# via
# keyring
# twine
isort==5.10.1
# via qBitrr2 (setup.py)
jaraco-classes==3.4.0
# via keyring
jaraco-context==5.3.0
jaraco-context==6.0.1
# via
# jaraco-docker
# keyring
jaraco-docker==2.0
# via qBitrr2 (setup.py)
jaraco-functools==4.0.1
jaraco-functools==4.0.2
# via
# jaraco-docker
# keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
keyring==25.2.1
keyring==25.3.0
# via twine
more-itertools==10.3.0
more-itertools==10.4.0
# via
# jaraco-classes
# jaraco-functools
multiprocess==0.70.16
# via pathos
mypy-extensions==1.0.0
# via black
nh3==0.2.17
nh3==0.2.18
# via readme-renderer
nodeenv==1.9.1
# via pre-commit
Expand All @@ -111,6 +106,8 @@ pathspec==0.12.1
# via black
peewee==3.14.7
# via qBitrr2 (setup.py)
pefile==2023.2.7
# via pyinstaller
ping3==3.0.2
# via qBitrr2 (setup.py)
pip-tools==7.3.0
Expand All @@ -129,23 +126,27 @@ pre-commit==3.3.3
# via qBitrr2 (setup.py)
pyarr==5.2.0
# via qBitrr2 (setup.py)
pycparser==2.22
# via cffi
pygments==2.18.0
# via readme-renderer
pyinstaller==5.13.1
# via qBitrr2 (setup.py)
pyinstaller-hooks-contrib==2024.7
pyinstaller-hooks-contrib==2024.8
# via pyinstaller
pyproject-hooks==1.1.0
# via build
pyreadline3==3.4.1
# via humanfriendly
pyupgrade==2.31.0
# via qBitrr2 (setup.py)
pyyaml==6.0.1
pywin32-ctypes==0.2.3
# via
# keyring
# pyinstaller
pyyaml==6.0.2
# via pre-commit
qbittorrent-api==2023.7.52
# via qBitrr2 (setup.py)
readme-renderer==43.0
readme-renderer==44.0
# via twine
requests==2.32.0
# via
Expand All @@ -158,11 +159,9 @@ requests-toolbelt==1.0.0
# via twine
rfc3986==2.0.0
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via qbittorrent-api
tokenize-rt==5.2.0
tokenize-rt==6.0.0
# via pyupgrade
tomli==2.0.1
# via
Expand All @@ -171,11 +170,11 @@ tomli==2.0.1
# pip-tools
tomlkit==0.7.2
# via qBitrr2 (setup.py)
tqdm==4.66.4
tqdm==4.66.5
# via twine
twine==3.7.1
# via qBitrr2 (setup.py)
types-requests==2.32.0.20240622
types-requests==2.32.0.20240712
# via pyarr
typing-extensions==4.12.2
# via black
Expand All @@ -190,9 +189,9 @@ urllib3==2.2.2
# types-requests
virtualenv==20.26.3
# via pre-commit
wheel==0.43.0
wheel==0.44.0
# via pip-tools
zipp==3.19.2
zipp==3.20.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
Loading

0 comments on commit 020f507

Please sign in to comment.