Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Feramance/Qbitrr
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Nov 21, 2023
2 parents 0506ec5 + 3c352d2 commit cb477b3
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.8.6-beta-0
current_version = 3.8.5
tag = false
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*)-(?P<build>\d+))?
serialize =
Expand Down
30 changes: 26 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## v3.8.5 (20/11/2023)
- [[release] Release commit](https://github.com/Feramance/qBitrr/commit/6078ab5992f949e8d5fc473bb6ac5d65e6939ca5) - @Feramance
- [Series search final fix](https://github.com/Feramance/qBitrr/commit/00ec3ccdf1f5c27ac45557d7b5df8f8f7164954b) - @Feramance
- [Error fix](https://github.com/Feramance/qBitrr/commit/be03f498432518db2825b0859d2676f04fd40394) - @Feramance
- [Series search fix test](https://github.com/Feramance/qBitrr/commit/b12c3d86f6f8748fae0a152f1388ca3559c823c8) - @Feramance
- [Search fix](https://github.com/Feramance/qBitrr/commit/154e7dee0cd591b1899d55a6b2dbbe865e68751a) - @Feramance
- [Series queue search fix](https://github.com/Feramance/qBitrr/commit/e53fddf8a7a351090a9a030606eb0742244c335e) - @Feramance
- [queue file ids fix](https://github.com/Feramance/qBitrr/commit/dc3f085855ddace2f7b9b55442d2be3917eaf6e9) - @Feramance
- [Loop restart condition added](https://github.com/Feramance/qBitrr/commit/31bbc14e0e16ad7a973c009359d1a3e6a001a9d5) - @Feramance
- [Logs tests](https://github.com/Feramance/qBitrr/commit/3fdc0380421a957dd88f73873be26bdabcc0f133) - @Feramance
- [Another log input](https://github.com/Feramance/qBitrr/commit/8683e8698f1d8118e822cc49dd985062180a2679) - @Feramance
- [More debug logs](https://github.com/Feramance/qBitrr/commit/a5c7c8658147ffbe64a194e0fad2afbbc3bbf63e) - @Feramance
- [Added trace logs](https://github.com/Feramance/qBitrr/commit/99047036dbf484c07acb1e09316a6975ac8d1082) - @Feramance
- [Trackers not found handling](https://github.com/Feramance/qBitrr/commit/d1e4aab2d61abe8fd019876119e465e6dff94300) - @Feramance
- [Fixed log error](https://github.com/Feramance/qBitrr/commit/33c1d31ed7e3c73be93146696b3e58e0bd4e7c28) - @Feramance
- [Debugging sonarr series search](https://github.com/Feramance/qBitrr/commit/9a4b5b0d0aa0a4b98e99982fb3ae8afa4a297757) - @Feramance
- [Error fix](https://github.com/Feramance/qBitrr/commit/d2d65fa7d732a11ed5d635ddf86354ac751a4330) - @Feramance
- [episode count fix](https://github.com/Feramance/qBitrr/commit/564222ebaf1256fafb85cdc5b951242da71ffa73) - @Feramance
- [Debug fix](https://github.com/Feramance/qBitrr/commit/2a322d37268b5060d294149b8297e64a7e306222) - @Feramance
- [Testing episode counts](https://github.com/Feramance/qBitrr/commit/8bfe92379493ef5773ea9b0b3ada21e87eb82866) - @Feramance
- [Database error handling](https://github.com/Feramance/qBitrr/commit/e9e7e1c0a8dc8296e178c1efa5c8b0a9cf8ce4a6) - @Feramance
- [Merge branch 'master' of https://github.com/Feramance/Qbitrr](https://github.com/Feramance/qBitrr/commit/73620177bd8fbb4bfb1df177bb934bea02a3c345) - @Feramance
- [Updated README](https://github.com/Feramance/qBitrr/commit/2ae9cf7bf967904b26c495a5a0f4f2e3f7fa5cbe) - @Feramance

---

## v3.8.4 (17/11/2023)
- [[release] Hopefully the final fix for 3.8 before 3.9](https://github.com/Feramance/qBitrr/commit/cd55708e29a09e9a289549414713af7e42583c5d) - @Feramance

Expand Down Expand Up @@ -147,7 +173,3 @@
---

## v3.7.13-beta-11 (30/10/2023)

---

## v3.7.13-beta-10 (30/10/2023)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM python:3.10

LABEL Name="qBitrr"
LABEL Maintainer="Feramance"
LABEL Version="3.8.6-beta-0"
LABEL Version="3.8.5"

# Env used by the script to determine if its inside a docker -
# if this is set to 69420 it will change the working dir for docker specific values
Expand Down
55 changes: 28 additions & 27 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def __init__(
)

if self.type == "sonarr":
if self.quality_unmet_search:
if self.quality_unmet_search or self.do_upgrade_search:
self.search_api_command = "SeriesSearch"
else:
self.search_api_command = "MissingEpisodeSearch"
Expand Down Expand Up @@ -1224,7 +1224,7 @@ def db_get_files_series(
if not self.do_upgrade_search:
condition = self.series_file_model.Searched == False
else:
condition &= self.series_file_model.Upgrade == False
condition = self.series_file_model.Upgrade == False
for entry_ in (
self.series_file_model.select()
.where(condition)
Expand Down Expand Up @@ -2393,7 +2393,7 @@ def maybe_do_search(
)
if not bypass_limit and active_commands >= self.search_command_limit:
self.logger.trace(
"%sIdle: Too many commands in queue: %s | %[id=%s]",
"%sIdle: Too many commands in queue: %s | [id=%s]",
request_tag,
file_model.Title,
file_model.EntryId,
Expand All @@ -2406,20 +2406,19 @@ def maybe_do_search(
Completed=False,
EntryId=file_model.EntryId,
).on_conflict_replace().execute()
if file_model.EntryId not in self.queue_file_ids:
completed = True
while completed:
try:
completed = False
self.client.post_command(
self.search_api_command, seriesId=file_model.EntryId
)
except (
requests.exceptions.ChunkedEncodingError,
requests.exceptions.ContentDecodingError,
requests.exceptions.ConnectionError,
):
completed = True
completed = True
while completed:
try:
completed = False
self.client.post_command(
self.search_api_command, seriesId=file_model.EntryId
)
except (
requests.exceptions.ChunkedEncodingError,
requests.exceptions.ContentDecodingError,
requests.exceptions.ConnectionError,
):
completed = True
file_model.update(Searched=True, Upgrade=True).where(
file_model.EntryId == file_model.EntryId
).execute()
Expand All @@ -2444,8 +2443,6 @@ def maybe_do_search(
"%sSkipping: Already Searched: %s (%s) [tmdbId=%s|id=%s]",
request_tag,
file_model.Title,
file_model.Year,
file_model.TmdbId,
file_model.EntryId,
)
file_model.update(Searched=True, Upgrade=True).where(
Expand All @@ -2460,11 +2457,9 @@ def maybe_do_search(
)
if not bypass_limit and active_commands >= self.search_command_limit:
self.logger.trace(
"%sSkipping: Too many in queue: %s (%s) [tmdbId=%s|id=%s]",
"%sIdle: Too many commands in queue: %s | [id=%s]",
request_tag,
file_model.Title,
file_model.Year,
file_model.TmdbId,
file_model.EntryId,
)
return False
Expand Down Expand Up @@ -2543,11 +2538,17 @@ def process_torrents(self):
return self._temp_overseer_request_cache
except qbittorrentapi.exceptions.APIError as e:
self.logger.error("The qBittorrent API returned an unexpected error")
self.logger.debug("Unexpected APIError from qBitTorrent", exc_info=e)
exceptionstr = str(e)
if (
exceptionstr.find("JSONDecodeError") != 0
or exceptionstr.find("AttributeError") != 0
):
self.logger.info("Torrent still connecting to trackers")
else:
self.logger.debug("Unexpected APIError from qBitTorrent", exc_info=e)
raise DelayLoopException(length=300, type="qbit")
except (AttributeError, JSONDecodeError) as e:
except (AttributeError, JSONDecodeError):
self.logger.info("Torrent still connecting to trackers")
self.logger.debug("No trackers found yet", exc_info=e)
raise DelayLoopException(length=300, type="qbit")
except DelayLoopException:
raise
Expand Down Expand Up @@ -3847,13 +3848,13 @@ def run_search_loop(self) -> NoReturn:
self.search_current_year = years[years_index]
elif (
datetime.now() >= (timer + loop_timer)
) or self.arr_db_query_commands_count == 0:
) or self.arr_db_query_commands_count() == 0:
self.refresh_download_queue()
self.force_grab()
raise RestartLoopException
elif (
datetime.now() >= (timer + loop_timer)
) or self.arr_db_query_commands_count == 0:
) or self.arr_db_query_commands_count() == 0:
self.refresh_download_queue()
self.force_grab()
raise RestartLoopException
Expand Down
4 changes: 2 additions & 2 deletions qBitrr/bundled_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version = "3.8.6-beta-0"
git_hash = "5979043"
version = "3.8.5"
git_hash = "2b4179c"
license_text = (
"Licence can be found on:\n\nhttps://github.com/Feramance/qBitrr/blob/master/LICENSE"
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = qBitrr2
version = 3.8.6-beta-0
version = 3.8.5
description = "A simple Python script to talk to qBittorrent and Arr's"
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit cb477b3

Please sign in to comment.