Skip to content

Commit

Permalink
Fix: encoding, path to NZBfile on Windows, code formatting, round the…
Browse files Browse the repository at this point in the history
… max failed limit (#5)

- fixed a UnicodeEncodeError exception that occurs when using special characters in names;
- fixed several "NoneType" errors;
- fixed wrong path to NZB file on Windows;
- rounded the failed limit precision value;
- added tests and pipeline for tests;
- formatted the code using Black.
  • Loading branch information
dnzbk authored May 8, 2024
1 parent 021fe82 commit 2848894
Show file tree
Hide file tree
Showing 10 changed files with 1,564 additions and 727 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: tests

on:
push:
branches:
- feature/*
- master
pull_request:
branches:
- main

jobs:
tests:
uses: nzbgetcom/nzbget-extensions/.github/workflows/python-tests.yml@main
with:
python-versions: "3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12"
supported-python-versions: "3.8 3.9 3.10 3.11 3.12"
test-script: tests.py
debug: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ If you need support for Python 2.x versions then you can get legacy version v1.1

## NZBGet Versions

- pre-release v23+ [v3.0](https://github.com/nzbgetcom/Extension-Completion/releases/tag/v3.0)
- stable v22 [v2.0](https://github.com/nzbgetcom/Extension-Completion/releases/tag/v2.0)
- legacy v21 [v2.0](https://github.com/nzbgetcom/Extension-Completion/releases/tag/v2.0)
- stable v23+ [v3.0](https://github.com/nzbgetcom/Extension-Completion/releases/tag/v3.0)
- legacy v22 [v2.0](https://github.com/nzbgetcom/Extension-Completion/releases/tag/v2.0)

# Completion

[NZBGet](https://nzbget.com) [script](https://nzbget.com/documentation/post-processing-scripts/) that checks if the data in the NZB file is sufficiently complete at your usenet provider(s), before starting the download. If incomplete it would wait for a certain period and check the completion of the NZB file again. This check is done by requesting the header status, and is in normal cases done within seconds (like 1 - 5 sec. for a 1 GB file). This method is significantly faster than when NZBGet would report a failure, after actual downloading a (part of) the files that end up incomplete. The script is typically useful for issues related to:
[NZBGet](https://nzbget.com) [extension](https://github.com/nzbgetcom/nzbget/blob/main/docs/extensions/EXTENSIONS.md) that checks if the data in the NZB file is sufficiently complete at your usenet provider(s), before starting the download. If incomplete it would wait for a certain period and check the completion of the NZB file again. This check is done by requesting the header status, and is in normal cases done within seconds (like 1 - 5 sec. for a 1 GB file). This method is significantly faster than when NZBGet would report a failure, after actual downloading a (part of) the files that end up incomplete. The script is typically useful for issues related to:
- very recent posts,
- failed downloads, which after a while are just ok (propagation issues),
- incomplete posts,
Expand Down
Loading

0 comments on commit 2848894

Please sign in to comment.