Skip to content

Commit

Permalink
[patch] Search loop fix and performance enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Jan 19, 2024
1 parent 966fe4d commit b6e34e6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ qBitrr.egg-info/
venv/
.venv/
.sourcery.yaml
test.py
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ A simple script to monitor [qBit](https://github.com/qbittorrent/qBittorrent) an
- Customizable searching by series or singular episodes
- Optionally searches year by year is ascending or descending order (config option available)
- Search for CF Score unmet and cancel torrents base on CF Score or Quality unmet search
- Set minimum free space in download directory and pause torrent downloads accordingly

## Tested with

Expand Down
9 changes: 0 additions & 9 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,9 +1305,6 @@ def db_get_files_series(
else:
condition &= self.model_file.EpisodeFileId == 0
condition &= self.model_file.Searched == False
# condition &= self.model_file.AbsoluteEpisodeNumber.is_null(
# False
# ) | self.model_file.SceneAbsoluteEpisodeNumber.is_null(False)
todays_condition = copy(condition)
todays_condition &= self.model_file.AirDateUtc > (
datetime.now(timezone.utc) - timedelta(days=1)
Expand Down Expand Up @@ -1360,9 +1357,6 @@ def db_get_files_episodes(
else:
condition &= self.model_file.EpisodeFileId == 0
condition &= self.model_file.Searched == False
# condition &= self.model_file.AbsoluteEpisodeNumber.is_null(
# False
# ) | self.model_file.SceneAbsoluteEpisodeNumber.is_null(False)
today_condition = copy(condition)
today_condition &= self.model_file.AirDateUtc > (
datetime.now(timezone.utc) - timedelta(days=1)
Expand Down Expand Up @@ -1439,9 +1433,6 @@ def db_get_request_files(self) -> Iterable[MoviesFilesModel | EpisodeFilesModel]
condition &= self.model_file.Upgrade == False
if not self.search_specials:
condition &= self.model_file.SeasonNumber != 0
# condition &= self.model_file.AbsoluteEpisodeNumber.is_null(
# False
# ) | self.model_file.SceneAbsoluteEpisodeNumber.is_null(False)
condition &= self.model_file.AirDateUtc.is_null(False)
condition &= self.model_file.AirDateUtc < (
datetime.now(timezone.utc) - timedelta(hours=2)
Expand Down
1 change: 0 additions & 1 deletion qBitrr/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class MoviesFilesModel(Model):
MinCustomFormatScore = IntegerField(null=True)
CustomFormatMet = BooleanField(default=False)
Reason = TextField(null=True)
MinimumAvailabilityMet = BooleanField(default=False)


class EpisodeFilesModel(Model):
Expand Down
3 changes: 2 additions & 1 deletion 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.1.2
Version: 4.2.0
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 @@ -110,6 +110,7 @@ A simple script to monitor [qBit](https://github.com/qbittorrent/qBittorrent) an
- Customizable searching by series or singular episodes
- Optionally searches year by year is ascending or descending order (config option available)
- Search for CF Score unmet and cancel torrents base on CF Score or Quality unmet search
- Set minimum free space in download directory and pause torrent downloads accordingly

## Tested with

Expand Down

0 comments on commit b6e34e6

Please sign in to comment.