Compare commits

..

90 Commits

Author SHA1 Message Date
Safihre
f94c48b27c Update text files for 4.0.0 Alpha 2 2023-02-22 23:04:54 +01:00
puzzledsab
0734547aec Make switchinterval configurable (#2473) 2023-02-22 13:22:57 +01:00
puzzledsab
8ab87d9844 Re-add last_max_chunk_size (#2472)
* Update last_max_chunk_size for each call to recv

* Reduce _DEFAULT_CHUNK_SIZE
2023-02-21 08:19:15 +01:00
jcfp
21b3b85e6e convert tests to tavern 2.0.0+ (#2468) 2023-02-20 17:08:22 +00:00
Michael Nightingale
45ccac3bc4 Decode UU with bytearray (#2466)
* Decode UU with bytearray

* Revert changed test
2023-02-19 17:32:02 +01:00
SABnzbd Automation
0b95b0b94b Update translatable texts
[skip ci]
2023-02-19 13:51:37 +00:00
Safihre
501b370dc0 Remove unused sched_converted 2023-02-19 14:44:08 +01:00
Safihre
2058a4b639 Update text files for 4.0.0Alpha1 2023-02-19 14:27:40 +01:00
Safihre
266823a81e Update macOS Python to 3.11.2 2023-02-19 14:07:13 +01:00
puzzledsab
6cd5713baa Translate ascii control chars below value 32 to _ (#2463)
* Translate ascii control chars below value 32

* Try to make code and tests consistent

* More test fixing

* Delete too much

* Different approach

* Finally got it?

* Start from 0

* Convert \0 to _ for all systems

* Check if CH_ILLEGAL_WIN is translated to CH_LEGAL_WIN

* Test specific chars
2023-02-18 22:48:00 +01:00
Safihre
e9038de819 Update sabctools to 6.1.0 2023-02-18 14:48:46 +01:00
Safihre
9129b681dc Only test wiki-entries consistency on develop 2023-02-17 21:50:24 +01:00
SABnzbd Automation
1f2b602638 Update translatable texts
[skip ci]
2023-02-17 07:18:41 +00:00
Michael Nightingale
87d9de1009 Only allocate disk speed random data when required (#2460) 2023-02-17 08:17:33 +01:00
Safihre
81a6db2190 Update test for defaulting to SSL 2023-02-15 23:06:18 +01:00
Michael Nightingale
dbd335fd3b Improve dirscanner performance and reduce system calls (#2434)
* Improve dirscanner performance and reduce system calls

* Break up one liners

* Rename functions and add typings

* yield from instead of looping

* Fix optional typing

* Replace threads with asyncio

* Use full module path

* Replace list comprehension with for loop

* Give other coroutines a chance to run if we ignore a path

* Remove uncesserary unnecessary asyncio.sleep on skipped path

* Catch and report all exceptions within the scanner task to the user to ensure the overall scanner task cannot crash

* Log traceback
2023-02-15 22:57:09 +01:00
Safihre
84fc6e7a7a Enable Newsserver SSL by default 2023-02-15 22:52:32 +01:00
SABnzbd Automation
f851f10ee1 Update translatable texts
[skip ci]
2023-02-14 22:02:17 +00:00
Safihre
0d92d9f9bd Update references to 4.0.x 2023-02-14 22:57:23 +01:00
puzzledsab
73fce52df1 Threaded polling of connections (#2438)
* Threaded polling of connections

* Do speed limit check after handling

* Use ThreadPoolExecutor, remove code for updating recv_threads while running

* Get newswrapper inside try

* Change default settings to 2 threads

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-02-14 22:17:24 +01:00
SABnzbd Automation
14223d239a Update translatable texts
[skip ci]
2023-02-14 20:55:48 +00:00
Safihre
a3daa7b257 Increase threshold for logging excessive sleep time
Closes #2458
2023-02-14 21:54:41 +01:00
SABnzbd Automation
a70f943462 Update translatable texts
[skip ci]
2023-02-13 02:39:27 +00:00
renovate[bot]
a717260574 Update all dependencies 2023-02-13 02:38:27 +00:00
Safihre
90a4898dbd Use walrus operator in several places 2023-02-11 22:34:53 +01:00
Safihre
4543d9e975 Log decode cache limit and assembler trigger 2023-02-11 17:33:24 +01:00
jcfp
2aedd20007 Include https config files in backup (#2450)
* include https config files in backup

* add constants for default https config filenames

* refresh test_config, add coverage for https backup

* remove some unicode from the tests

* On Windows we use long-paths

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-02-11 09:21:22 +01:00
renovate[bot]
822e1cbfb5 Update dependency cryptography to v39.0.1 [SECURITY] 2023-02-08 05:40:16 +00:00
puzzledsab
0ec082669d Gradual slowdown on filling queues (#2439)
* Gradual slowdown on filling queues

* Move delayed counters to new slowdown check, otherwise they will rarely trigger

* Simplify the full decoder part a bit

* Reduce sleep aggressiveness a bit

* Make a constant for the queue level slowdown limit

* Rename the slowdown limit variable and put it in constants with the other queue limit variables

* Also constants...

* Make black happy
2023-02-07 23:24:57 +01:00
puzzledsab
5315eeb26b Write first article directly (#2443)
* Write first article directly

* Add first article to assembler in usual place instead of ArticleCache

* Remove redundant deref

* Update comment to reflect new code

* Partly restore old code

* First article should not always be added to the queue if SAB has started downloading the other parts

* Yet another redundant deref :(
2023-02-05 22:29:38 +01:00
puzzledsab
32bd5a4cca Let the assembler write trigger scale with the size of the cache (#2436) 2023-02-05 20:47:27 +01:00
jcfp
e4ec774d16 restore startup history purge (#2449) 2023-02-04 19:13:46 +01:00
puzzledsab
b1ce21ad77 Reduce useless logging (#2448) 2023-02-03 14:14:57 +01:00
puzzledsab
9ab5e86c81 Make downloader use received buffer size to determine if it's ok to sleep (#2424)
* Make downloader use used buffer size to determine if it's ok to sleep

* Log number of times slept and average time slept last 10 seconds

* Log if downloader slept much too long

* Improvements to sleep debugging

* Remove get_stable_speed
2023-02-02 10:25:02 +01:00
renovate[bot]
ea3442ad27 Update dependency setuptools to v67 2023-02-01 19:54:56 +00:00
puzzledsab
e1af02a642 Don't crash on invalid yenc footer (#2440)
* Don't crash on invalid yenc footer

* What he said

* Forgot to remove debug print
2023-02-01 20:44:12 +01:00
Safihre
fe0c4e4f92 Update formatting with black 23 rules 2023-02-01 20:42:06 +01:00
puzzledsab
5e58fdf821 Don't immediately add new article if downloading should be stopped (#2429)
* Don't immediately add new article if downloading should be stopped

* VS Code black and Github black don't agree
2023-01-28 18:42:55 +01:00
SABnzbd Automation
01537c03b1 Update translatable texts
[skip ci]
2023-01-26 22:19:13 +00:00
Safihre
b78f4d13c1 Update Unrar to 6.20
Closes #2325
2023-01-26 23:15:09 +01:00
Safihre
ba68243dc7 Drop official support for Python 3.7 for the next major release 2023-01-25 23:02:33 +01:00
SABnzbd Automation
b742971d9b Update translatable texts
[skip ci]
2023-01-25 21:41:02 +00:00
Safihre
6492cfb430 Update copyright year to 2023 2023-01-25 22:39:49 +01:00
puzzledsab
c229adcbb9 Immediately request new article after the previous was done (#2423)
* Immediately request new article after the previous was done

* Add server.get_article method
2023-01-25 22:36:49 +01:00
puzzledsab
abb08a4589 Various minor changes and fixes (#2422) 2023-01-24 22:40:18 +01:00
Safihre
5ccc124ad4 Print status of OpenSSL link during start-up and request feedback 2023-01-24 17:28:43 +01:00
SABnzbd Automation
db22fea0d1 Update translatable texts
[skip ci]
2023-01-24 16:22:05 +00:00
Safihre
7ebd12ec3d Rename sabyenc3 to sabctools 2023-01-24 17:06:53 +01:00
Safihre
ac0e57726f Replace crc32calc with C-version 2023-01-24 17:06:36 +01:00
Safihre
e3200b1481 Apply changes need for updates to buffer_decode 2023-01-24 17:06:36 +01:00
Safihre
5492935c32 Use buffer-based sabyenc3 2023-01-24 17:06:32 +01:00
puzzledsab
2a67d80057 Stop using 0 as failed and use new crc32 value in SFV check (#2411)
* Stop using 0 as failed and use new crc32 value in SFV check

* Make nzf.crc32sum differentiate between uninitialized, valid and invalid CRC32 value

* Replace crc32sum with assembled and use crc32 value instead
2023-01-24 17:06:32 +01:00
puzzledsab
7956a75344 Call getsize in try and use CRC32 from sabyenc (#2409)
* Call getsize in try and use CRC32 from sabyenc

* Always fail if crc32sum is 0
2023-01-24 17:06:32 +01:00
puzzledsab
cfa82e5086 CRC32 check (#2407)
* Only set on_disk and don't set decoded until article is saved to cache (#2403)

* Mark unavailable articles as saved

* Save broken article if a valid one doesn't exist

* Change bad article message a bit

* Reduce to only set on_disk and don't set decoded until article is saved to cache

* Use CRC32 from PAR2 instead of MD5

* Move crc32calc.py to utils

* Update credits in crc32.py, use crc32 in test_par2file.py

* Various smaller changes to CRC32 patch

* Handle unfinished par2 files better

* Optimized crc32 calculations

* Rename md5sum to crc32sum and include filesize check
2023-01-24 17:06:32 +01:00
Safihre
60291a93c2 Use buffer per connection 2023-01-24 17:06:18 +01:00
Safihre
51fec1c5a0 Use new sabyenc3.unlocked_ssl_recv_into 2023-01-24 17:06:18 +01:00
Safihre
5b8c5e2fd7 Allocate only once a buffer for each connection 2023-01-24 17:06:18 +01:00
renovate[bot]
5a0fd6ee08 chore(deps): update all dependencies 2023-01-23 06:09:10 +00:00
renovate[bot]
d7d3810874 chore(deps): update all dependencies 2023-01-16 00:18:57 +00:00
SABnzbd Automation
f0819c339c Update translatable texts
[skip ci]
2023-01-15 12:36:21 +00:00
Safihre
adcdca6f2e Pin tavern due to incompatibility of tavalidate with tavern>=2.0.0
@jcfp if you ever feel like a refactor of these tests ;)
2023-01-15 13:35:03 +01:00
SABnzbd Automation
efd7d1a4a0 Update translatable texts
[skip ci]
2023-01-11 02:27:37 +00:00
One CD
fc3fa137ac relabel UI button to show "Hidden" instead of "System" (#2410)
- as per: https://forums.sabnzbd.org/viewtopic.php?t=26089
2023-01-11 03:26:25 +01:00
SABnzbd Automation
61e901e07b Update translatable texts
[skip ci]
2023-01-10 08:57:09 +00:00
Safihre
d5dee106d1 Use newer cryptography package 2023-01-10 08:56:11 +00:00
renovate[bot]
00518e1a60 chore(deps): update all dependencies 2023-01-10 08:56:11 +00:00
Michael Reid
129d622015 Ignore file permissions when running unrar (#2401)
* fix: use permission bits from root when doing file recursion

* fix: restrict setting root permissions to files

* Revert "fix: restrict setting root permissions to files"

This reverts commit 0ef72f6038.

* Revert "fix: use permission bits from root when doing file recursion"

This reverts commit 0a1ceff8c0.

* fix: always ignore file attributes on unrar
2023-01-05 23:03:25 +01:00
puzzledsab
4423cbfcf3 Only set on_disk and don't set decoded until article is saved to cache (#2403)
* Mark unavailable articles as saved

* Save broken article if a valid one doesn't exist

* Change bad article message a bit

* Reduce to only set on_disk and don't set decoded until article is saved to cache
2023-01-05 14:39:11 +01:00
SABnzbd Automation
7f0d845dd0 Update translatable texts
[skip ci]
2022-12-31 16:17:05 +00:00
jcfp
bba1c894c5 Refresh and expand the appstream metadata (#2393)
Add supported control methods [1] as well as recommended screen sizes [2] and internet availability. Most of these properties are already in active use by appdata clients such a Gnome's "Software" program. The display size basically says "all but extra-small", where the extra extra-small category is used for tiny devices such a wearables and watches, and is kept as a recommend to not block installs on headless systems.

Also set a vcs-browser URL, and update the contact URL to point to the more generic live-chat page rather than directly to the forums.

[1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-control
[2] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length
2022-12-31 17:14:01 +01:00
SABnzbd Automation
6c197a4a8c Update translatable texts
[skip ci]
2022-12-28 21:33:20 +00:00
Safihre
4ceae8ec31 Update macOS build to Python 3.11.1 2022-12-28 22:28:48 +01:00
SABnzbd Automation
d257f903cc Update translatable texts
[skip ci]
2022-12-28 21:21:26 +00:00
Safihre
69742dd785 Refactor server error message reporting 2022-12-28 22:16:21 +01:00
SABnzbd Automation
92161eae07 Update translatable texts
[skip ci]
2022-12-28 20:59:39 +00:00
Sander
70d5099902 better logging with login from multiple IP (#2370)
* better logging with login from multiple IP

* warning in one line

* warning in one line

* warning in one line

* cleanup

* errormsg in better place

* Patch error

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-12-28 21:56:35 +01:00
thezoggy
de80f4e262 fix typo in default to url input when add nzb modal is shown (#2384) 2022-12-23 07:31:24 +01:00
thezoggy
0f0b8d4528 default to url input when add nzb modal is shown (#2383) 2022-12-22 19:54:50 +00:00
renovate[bot]
e34301fb2f chore(deps): update all dependencies 2022-12-19 13:25:39 +01:00
Safihre
a140c1ddc1 Remove special universal2 build step for orjson on macOS
orjson now provides universal2 wheel
2022-12-16 22:56:17 +01:00
Safihre
b472c615fb Multi-edit applying category + something else can be unpredictable
Closes #2375
2022-12-15 16:39:46 +01:00
Safihre
d41f33775e On mobile disable accept parameter on file inputs
Doesn't work on mobile Safari
See https://forums.sabnzbd.org/viewtopic.php?p=128651
2022-12-15 16:07:29 +01:00
Safihre
c27d60e2b0 Run Windows CI tests on Python 3.11 now lxml is available 2022-12-15 09:57:10 +01:00
Safihre
77fcaf4fca Remove redundant combine_chunk from recv_chunk 2022-12-12 13:58:03 +01:00
renovate[bot]
206dc66f7c Update dependency mac-alias to v2.2.2 2022-12-12 09:08:14 +00:00
puzzledsab
2d267fc50a Put */Default category first in lists (#2372)
* Put * category first in lists

* Seems there is some disagreement on how to format **

* Somewhat shorter version

* Use get_ordered_categories
2022-12-10 21:30:54 +01:00
puzzledsab
5cd5f00df7 Fix division by zero (#2369) 2022-12-10 08:40:30 +01:00
puzzledsab
6a80869861 Put some of the nntp connection handling code in a separate method (#2368) 2022-12-08 19:40:44 +01:00
puzzledsab
fb113514ae More recv_chunk refactoring (#2367) 2022-12-08 15:43:43 +01:00
puzzledsab
91740048c2 Limited refactoring of recv_chunk (#2366)
* Limited refactoring

* Remove explicit setblocking from servertests.py

* Make combine_chunk exactly 5 bytes so we can use ==

* Move timeout down a bit
2022-12-07 20:14:05 +01:00
181 changed files with 1847 additions and 1399 deletions

View File

@@ -87,7 +87,7 @@ jobs:
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
# If updated, make sure to also set LSMinimumSystemVersion in SABnzbd.spec
PYTHON_VERSION: "3.11.0"
PYTHON_VERSION: "3.11.2"
MACOSX_DEPLOYMENT_TARGET: "10.9"
# We need to force compile for universal2 support
CFLAGS: -arch x86_64 -arch arm64
@@ -123,7 +123,6 @@ jobs:
# https://github.com/pyca/cryptography/issues/5918
# 2. We need to build the PyInstaller bootloader:
# https://github.com/pyinstaller/pyinstaller/issues/6235
# 3. TEMPORARY: Add aarch64 for orjson universal2 build, until they provide a wheel
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: |
python3 --version
@@ -132,11 +131,9 @@ jobs:
pip3 install --upgrade -r requirements.txt --no-binary cffi
pip3 uninstall cryptography -y
pip3 download -r builder/osx/requirements.txt --platform macosx_10_10_universal2 --only-binary :all: --no-deps --dest .
pip3 download -r builder/osx/requirements.txt --platform macosx_10_12_universal2 --only-binary :all: --no-deps --dest .
pip3 install -r builder/osx/requirements.txt --no-cache-dir --no-index --find-links .
rustup target add aarch64-apple-darwin
PYINSTALLER_COMPILE_BOOTLOADER=1 pip3 install --upgrade -r builder/requirements.txt --no-binary pyinstaller
- name: Import macOS codesign certificates
# Taken from https://github.com/Apple-Actions/import-codesign-certs/pull/27 (comments)

View File

@@ -20,7 +20,7 @@ jobs:
builder/SABnzbd.spec
tests
--line-length=120
--target-version=py37
--target-version=py38
--check
--diff
@@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-20.04]
include:
- name: macOS
@@ -39,8 +39,7 @@ jobs:
python-version: "3.11"
- name: Windows
os: windows-latest
# lxml is not yet available for Python 3.11, so CI is stuck on 3.10 for now
python-version: "3.10"
python-version: "3.11"
steps:
- uses: actions/checkout@v3

View File

@@ -22,7 +22,7 @@ jobs:
if: env.TX_TOKEN
run: |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
./tx push --source
./tx push --translation --source
./tx pull --all --force
- name: Compile translations to validate them
run: |

View File

@@ -1,5 +1,5 @@
(c) Copyright 2007-2022 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2023 by "The SABnzbd-team" <team@sabnzbd.org>
The SABnzbd-team is:

View File

@@ -4,7 +4,7 @@
0) LICENSE
-------------------------------------------------------------------------------
(c) Copyright 2007-2022 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2023 by "The SABnzbd-team" <team@sabnzbd.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -52,7 +52,7 @@ Specific guides to install from source are available for Windows and macOS:
https://sabnzbd.org/wiki/installation/install-macos
https://sabnzbd.org/wiki/installation/install-from-source-windows
Only Python 3.7 and above is supported.
Only Python 3.8 and above is supported.
On Linux systems you need to install:
par2 unrar unzip python3-setuptools python3-pip

View File

@@ -1,4 +1,4 @@
(c) Copyright 2007-2022 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2023 by "The SABnzbd-team" <team@sabnzbd.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: SABnzbd
Version: 3.7.1
Summary: SABnzbd-3.7.1
Version: 4.0.0Alpha2
Summary: SABnzbd-4.0.0Alpha2
Home-page: https://sabnzbd.org
Author: The SABnzbd Team
Author-email: team@sabnzbd.org

View File

@@ -16,7 +16,7 @@ If you want to know more you can head over to our website: https://sabnzbd.org.
SABnzbd has a few dependencies you'll need before you can get running. If you've previously run SABnzbd from one of the various Linux packages, then you likely already have all the needed dependencies. If not, here's what you're looking for:
- `python` (Python 3.7 and above, often called `python3`)
- `python` (Python 3.8 and above, often called `python3`)
- Python modules listed in `requirements.txt`. Install with `python3 -m pip install -r requirements.txt -U`
- `par2` (Multi-threaded par2 installation guide can be found [here](https://sabnzbd.org/wiki/installation/multicore-par2))
- `unrar` (make sure you get the "official" non-free version of unrar)

View File

@@ -1,50 +1,30 @@
Release Notes - SABnzbd 3.7.1
Release Notes - SABnzbd 4.0.0 Alpha 2
=========================================================
## Bugfixes and changes since 3.7.0
- Minor improvements in download performance.
- Scripts set `On queue finish` are no longer persistent by default.
- Improved `Test Server` to handle more failure cases.
- Priority list in `Add NZB`-window was missing `Paused` priority.
- Keyboard shortcuts did not work if not in Tabbed-mode.
- Keyboard shortcut `S` did not reload status information.
- In `history` API-call the `stage_log` could be empty.
- Using the `-` character broke the queue/history search.
- Improved detection and handling of stuck jobs.
## Changes since 4.0.0 Alpha 1
- There are now multiple settings that can tweak performance, see:
https://github.com/sabnzbd/sabnzbd/discussions/2474
We are trying to find the most optimal default settings, so you
can help us by letting us know the results on your system!
## Changes since 3.6.1
- The queue and history can be filtered using keywords:
`cat` and `priority`. For example: `show name cat:tv`.
- Use shortcut `shift + arrow-key` to navigate the queue/history pages.
- The backup is now created in a local folder for security.
- Recurring backups can be configured using the scheduler.
- Improvements to Deobfuscate Final Filenames.
- RSS overview shows the rule that accepted the job.
- Added option to sort the queue by `% downloaded`.
- Added option to replace underscores with dots in folder names.
- SABnzbd Host input will be validated before being applied.
- Moved system load information from the main page to the Status window.
- Console logging is now written to `stdout` instead of `stderr`.
- Removed Special settings `enable_meta`, `disable_key`,
`replace_illegal`, `osx_speed` and `show_sysload`.
- Merged Special settings `win_menu` and `osx_menu` into `tray_icon`.
- macOS/Windows: Use Python 3.11, slightly boosting overall performance.
- macOS/Windows: Updated UnRar to 6.12.
- Windows: Updated MultiPar to 1.3.2.5.
## Changes since 3.7.2
- In this major update we replaced a core part of Python's SSL handling
with our own improved version. This results in large performance increases
when downloading from news servers with SSL enabled.
In addition, the general connection handling was overhauled, resulting in
performance improvements for all news servers.
Special thanks to: mnightingale, puzzledsab and animetosho!
- When adding a new news server, SSL is enabled by default.
- File assembly performance significantly improved by relying on the
CRC32 instead of the MD5 to perform QuickCheck of files.
- Slowdown more gracefully when the cache fills up.
- HTTPS files are included in the `Backup`.
- Improved `Watched Folder` scanning and processing.
- Dropped support for Python 3.7.
# API changes since 3.6.1
- Minor improvements in API performance.
- Removed fields `scripts` and `categories` from `queue` API call.
- Moved `loadavg` from `queue` to `status` API call.
# Bugfixes since 3.6.1
- Free Space Detection was too strict when using Direct Unpack.
- File uploads with special characters would be parsed incorrectly.
- Passwords from NZB meta-data were tried multiple times.
- Passwords were not always supplied to the pre-queue script.
- RSS-feed names were not sanitized when renamed.
- Make sure short-dates are detected as `YY-MM-DD` in Sorting.
- Show the custom job name in History when the NZB could not be fetched.
# Bugfixes since 3.7.2
- Restore applying `History Retention` setting at startup.
- Windows: Not all invalid characters were removed from filenames.
## Upgrade notices
- The download statistics file `totals10.sab` is updated in 3.2.x
@@ -61,4 +41,4 @@ Release Notes - SABnzbd 3.7.1
that automatically verify, repair, extract and clean up posts downloaded
from Usenet.
(c) Copyright 2007-2022 by "The SABnzbd-team" \<team@sabnzbd.org\>
(c) Copyright 2007-2023 by "The SABnzbd-team" \<team@sabnzbd.org\>

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -17,8 +17,8 @@
import sys
if sys.hexversion < 0x03070000:
print("Sorry, requires Python 3.7 or above")
if sys.hexversion < 0x03080000:
print("Sorry, requires Python 3.8 or above")
print("You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules")
sys.exit(1)
@@ -40,6 +40,7 @@ import gc
from typing import List, Dict, Any
try:
import sabctools
import Cheetah
import feedparser
import configobj
@@ -76,6 +77,7 @@ from sabnzbd.constants import (
DEF_LOG_FILE,
DEF_STD_CONFIG,
DEF_LOG_CHERRY,
CONFIG_BACKUP_HTTPS,
)
import sabnzbd.newsunpack
from sabnzbd.misc import (
@@ -240,7 +242,7 @@ def print_version():
"""
%s-%s
Copyright (C) 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
Copyright (C) 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
SABnzbd comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. It is licensed under the
@@ -398,15 +400,13 @@ def get_user_profile_paths():
return
elif sabnzbd.MACOS:
home = os.environ.get("HOME")
if home:
if home := os.environ.get("HOME"):
sabnzbd.DIR_LCLDATA = "%s/Library/Application Support/SABnzbd" % home
sabnzbd.DIR_HOME = home
return
else:
# Unix/Linux
home = os.environ.get("HOME")
if home:
if home := os.environ.get("HOME"):
sabnzbd.DIR_LCLDATA = "%s/.%s" % (home, DEF_WORKDIR)
sabnzbd.DIR_HOME = home
return
@@ -418,25 +418,26 @@ def get_user_profile_paths():
def print_modules():
"""Log all detected optional or external modules"""
if sabnzbd.decoder.SABYENC_ENABLED:
# Yes, we have SABYenc, and it's the correct version, so it's enabled
logging.info("SABYenc module (v%s)... found!", sabnzbd.decoder.SABYENC_VERSION)
logging.info("SABYenc module is using SIMD set: %s", sabnzbd.decoder.SABYENC_SIMD)
if sabnzbd.decoder.SABCTOOLS_ENABLED:
# Yes, we have SABCTools, and it's the correct version, so it's enabled
logging.info("SABCTools module (v%s)... found!", sabnzbd.decoder.SABCTOOLS_VERSION)
logging.info("SABCTools module is using SIMD set: %s", sabnzbd.decoder.SABCTOOLS_SIMD)
logging.info("SABCTools module is linked to OpenSSL: %s", sabnzbd.decoder.SABCTOOLS_OPENSSL_LINKED)
# Check if we managed to link, warning for now
if not sabnzbd.decoder.SABCTOOLS_OPENSSL_LINKED:
logging.warning(
"Could not link to OpenSSL library, please report here: "
"https://github.com/sabnzbd/sabnzbd/issues/2421"
)
else:
# Something wrong with SABYenc, so let's determine and print what:
if sabnzbd.decoder.SABYENC_VERSION:
# We have a VERSION, thus a SABYenc module, but it's not the correct version
logging.error(
T("SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"),
sabnzbd.decoder.SABYENC_VERSION,
sabnzbd.constants.SABYENC_VERSION_REQUIRED,
)
else:
# No SABYenc module at all
logging.error(
T("SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"),
sabnzbd.constants.SABYENC_VERSION_REQUIRED,
)
# Wrong SABCTools version, if it was fully missing it would fail to start due to check at the very top
logging.error(
T("SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"),
sabnzbd.decoder.SABCTOOLS_VERSION,
sabnzbd.constants.SABCTOOLS_VERSION_REQUIRED,
)
# Do not allow downloading
sabnzbd.NO_DOWNLOADING = True
@@ -1444,6 +1445,12 @@ def main():
logging.error(T("Failed to start web-interface: "), exc_info=True)
abort_and_show_error(browserhost, cherryport)
# Create a record of the active cert/key/chain files, for use with config.create_config_backup()
if enable_https:
for setting in CONFIG_BACKUP_HTTPS.values():
if full_path := getattr(sabnzbd.cfg, setting).get_path():
sabnzbd.CONFIG_BACKUP_HTTPS_OK.append(full_path)
if sabnzbd.WIN32:
if enable_https:
mode = "s"

View File

@@ -1,3 +1,3 @@
# Special requirements for macOS universal2 binary release
# This way dependabot can auto-update them
cryptography==38.0.4
cryptography==39.0.1

View File

@@ -1,22 +1,22 @@
# Basic build requirements
# Note that not all sub-dependencies are listed, but only ones we know could cause trouble
pyinstaller==5.7.0
pyinstaller-hooks-contrib==2022.14
pyinstaller==5.8.0
pyinstaller-hooks-contrib==2022.15
altgraph==0.17.3
wrapt==1.14.1
setuptools==65.6.3
pkginfo==1.9.2
setuptools==67.2.0
pkginfo==1.9.6
PyGithub==1.57
charset-normalizer==3.0.1
certifi
# orjson does not support 32bit Windows, exclude it based on Python-version
# This way we also test ujson on Python 3.7 and 3.8 in the CI-tests
orjson==3.8.3; python_version > '3.8'
# This way we also test ujson on Python 3.8 in the CI-tests
orjson==3.8.6; python_version > '3.8'
# For the macOS build
dmgbuild==1.6.0; sys_platform == 'darwin'
mac-alias==2.2.1; sys_platform == 'darwin'
mac-alias==2.2.2; sys_platform == 'darwin'
macholib==1.16.2; sys_platform == 'darwin'
ds-store==1.3.1; sys_platform == 'darwin'
PyNaCl==1.5.0; sys_platform == 'darwin'

View File

@@ -15,7 +15,7 @@
<!--#if not $windows#-->
<div class="checkbox">
<label>
<input type="checkbox" id="show_hidden_folders"> <span>$T('systemFolders')</span>
<input type="checkbox" id="show_hidden_folders"> <span>$T('hiddenFolders')</span>
</label>
</div>
<!--#end if#-->

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Config"#-->
<!--#set global $help_uri="configuration/3.7/configure"#-->
<!--#set global $help_uri="configuration/4.0/configure"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#from sabnzbd.encoding import CODEPAGE#-->
@@ -54,12 +54,12 @@
</td>
</tr>
<!--#end if#-->
<!--#if not $have_sabyenc#-->
<!--#if not $have_sabctools#-->
<tr>
<th scope="row">SABYenc:</th>
<th scope="row">SABCTools:</th>
<td>
<span class="label label-danger">$T('notAvailable')</span>
<a href="$helpuri$help_uri#no_sabyenc" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<a href="$helpuri$help_uri#no_sabctools" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
</td>
</tr>
<!--#end if#-->
@@ -124,7 +124,7 @@
<div class="colmask">
<div class="padding alt">
<h5 class="copyright">Copyright &copy; 2007-2022 The SABnzbd Team &lt;<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>&gt;</h5>
<h5 class="copyright">Copyright &copy; 2007-2023 The SABnzbd Team &lt;<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>&gt;</h5>
<p class="copyright"><small>$T('yourRights')</small></p>
</div>

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Categories"#-->
<!--#set global $help_uri="configuration/3.7/categories"#-->
<!--#set global $help_uri="configuration/4.0/categories"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
<div class="section">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Folders"#-->
<!--#set global $help_uri="configuration/3.7/folders"#-->
<!--#set global $help_uri="configuration/4.0/folders"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="General"#-->
<!--#set global $help_uri="configuration/3.7/general"#-->
<!--#set global $help_uri="configuration/4.0/general"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -375,7 +375,7 @@
})
// Only allow re-generate if default certs
if(\$('#https_cert').val() != 'server.cert') {
if(\$('#https_cert').val() != '$def_https_cert_file') {
\$('.generate_cert').attr('disabled', 'disabled')
}

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Email"#-->
<!--#set global $help_uri="configuration/3.7/notifications"#-->
<!--#set global $help_uri="configuration/4.0/notifications"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#def show_notify_checkboxes($section_label)#-->

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="RSS"#-->
<!--#set global $help_uri="configuration/3.7/rss"#-->
<!--#set global $help_uri="configuration/4.0/rss"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import html#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Scheduling"#-->
<!--#set global $help_uri="configuration/3.7/scheduling"#-->
<!--#set global $help_uri="configuration/4.0/scheduling"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<%

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Servers"#-->
<!--#set global $help_uri="configuration/3.7/servers"#-->
<!--#set global $help_uri="configuration/4.0/servers"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import json#-->
@@ -51,11 +51,11 @@
</div>
<div class="field-pair advanced-settings">
<label class="config" for="port">$T('srv-port')</label>
<input type="number" name="port" id="port" size="8" value="119" min="0" />
<input type="number" name="port" id="port" size="8" value="563" min="0" />
</div>
<div class="field-pair">
<label class="config" for="ssl">$T('srv-ssl')</label>
<input type="checkbox" name="ssl" id="ssl" value="1" />
<input type="checkbox" name="ssl" id="ssl" value="1" checked />
<span class="desc">$T('explain-ssl')</span>
</div>
<!-- Tricks to avoid browser auto-fill, fixed on-submit with javascript -->

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Sorting"#-->
<!--#set global $help_uri="configuration/3.7/sorting"#-->
<!--#set global $help_uri="configuration/4.0/sorting"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Special"#-->
<!--#set global $help_uri="configuration/3.7/special"#-->
<!--#set global $help_uri="configuration/4.0/special"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -1,5 +1,5 @@
<!--#set global $pane="Switches"#-->
<!--#set global $help_uri="configuration/3.7/switches"#-->
<!--#set global $help_uri="configuration/4.0/switches"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">

View File

@@ -671,6 +671,11 @@ function ViewModel() {
}
}
// default to url input when modal is shown
$('#modal-add-nzb').on('shown.bs.modal', function() {
$('input[name="nzbURL"]').focus();
})
// From the upload or filedrop
self.addNZBFromFile = function(files, fileindex) {
// First file
@@ -1334,6 +1339,12 @@ function ViewModel() {
// And refresh now!
self.refresh()
// Activate tooltips
if (!isMobile) $('[data-tooltip="true"]').tooltip({ trigger: 'hover', container: 'body' })
// Special options for (non) mobile
if (isMobile) {
// Disable accept parameter on file inputs, as it doesn't work on mobile Safari
$("input[accept!=''][accept]").attr("accept","")
} else {
// Activate tooltips
$('[data-tooltip="true"]').tooltip({ trigger: 'hover', container: 'body' })
}
}

View File

@@ -343,54 +343,61 @@ function QueueListModel(parent) {
var newStatus = $('.multioperations-selector input[name="multiedit-status"]:checked').val()
// List all the ID's
var strIDs = '';
var strIDs = '';
$.each(self.multiEditItems(), function(index) {
strIDs = strIDs + this.id + ',';
})
// All non-category updates need to only happen after a category update
function nonCatUpdates() {
if(newScript != '') {
callAPI({
mode: 'change_script',
value: strIDs,
value2: newScript
})
}
if(newPrior != '') {
callAPI({
mode: 'queue',
name: 'priority',
value: strIDs,
value2: newPrior
})
}
if(newProc != '') {
callAPI({
mode: 'change_opts',
value: strIDs,
value2: newProc
})
}
if(newStatus) {
callAPI({
mode: 'queue',
name: newStatus,
value: strIDs
})
}
// Wat a little and do the refresh
// Only if anything changed!
if(newStatus || newProc != '' || newPrior != '' || newScript != '' || newCat != '') {
setTimeout(parent.refresh, 100)
}
}
// What is changed?
if(newCat != '') {
callAPI({
mode: 'change_cat',
value: strIDs,
value2: newCat
})
}
if(newScript != '') {
callAPI({
mode: 'change_script',
value: strIDs,
value2: newScript
})
}
if(newPrior != '') {
callAPI({
mode: 'queue',
name: 'priority',
value: strIDs,
value2: newPrior
})
}
if(newProc != '') {
callAPI({
mode: 'change_opts',
value: strIDs,
value2: newProc
})
}
if(newStatus) {
callAPI({
mode: 'queue',
name: newStatus,
value: strIDs
})
}).then(nonCatUpdates)
} else {
nonCatUpdates()
}
// Wat a little and do the refresh
// Only if anything changed!
if(newStatus || newProc != '' || newPrior != '' || newScript != '' || newCat != '') {
setTimeout(parent.refresh, 100)
}
}
// Selete all selected

View File

@@ -57,7 +57,7 @@
<div class="form-group">
<label for="port" class="col-sm-4 control-label">$T('srv-port')</label>
<div class="col-sm-8">
<input type="number" class="form-control" name="port" id="port" value="<!--#if $port then $port else '119' #-->" />
<input type="number" class="form-control" name="port" id="port" value="<!--#if $port then $port else '563' #-->" />
</div>
</div>
<div class="form-group">

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022 The SABnzbd-Team <team@sabnzbd.org> -->
<!-- Copyright 2022-2023 The SABnzbd-Team <team@sabnzbd.org> -->
<component type="desktop-application">
<id>org.sabnzbd.sabnzbd</id>
<metadata_license>MIT</metadata_license>
@@ -23,16 +23,26 @@
</categories>
<url type="homepage">https://sabnzbd.org</url>
<url type="bugtracker">https://github.com/sabnzbd/sabnzbd/issues</url>
<url type="vcs-browser">https://github.com/sabnzbd/sabnzbd</url>
<url type="translate">https://sabnzbd.org/wiki/translate</url>
<url type="donation">https://sabnzbd.org/donate</url>
<url type="help">https://sabnzbd.org/wiki/</url>
<url type="faq">https://sabnzbd.org/wiki/faq</url>
<url type="contact">https://forums.sabnzbd.org</url>
<url type="contact">https://sabnzbd.org/live-chat.html</url>
<launchable type="desktop-id">sabnzbd.desktop</launchable>
<provides>
<mediatype>application/x-nzb</mediatype>
<mediatype>application/x-compressed-nzb</mediatype>
</provides>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</supports>
<recommends>
<display_length compare="ge">small</display_length>
<internet>always</internet>
</recommends>
<project_license>GPL-2.0-or-later</project_license>
<developer_name>The SABnzbd-team</developer_name>
<screenshots>

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -1,11 +1,11 @@
#
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"Project-Id-Version: SABnzbd-4.0.0Alpha1\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
msgid ""

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file EMAIL
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,11 +1,11 @@
#
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"Project-Id-Version: SABnzbd-4.0.0Alpha1\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"
@@ -35,12 +35,7 @@ msgstr ""
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid "SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
msgid "SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -393,7 +388,6 @@ msgstr ""
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr ""
@@ -417,19 +411,16 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgid "Too many connections to server %s [%s]"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgid "Login from too many different IP addresses to server %s [%s] - https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgid "Failed login for server %s [%s]"
msgstr ""
#. Error message
@@ -602,7 +593,7 @@ msgstr ""
msgid "API Key incorrect, Use the api key from Config->General in your 3rd party program:"
msgstr ""
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr ""
@@ -2828,6 +2819,10 @@ msgstr ""
msgid "System Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr ""

View File

@@ -1,16 +1,16 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Pavel C <quoing_transifex@mess.cz>, 2021
# Safihre <safihre@sabnzbd.org>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Czech (https://www.transifex.com/sabnzbd/teams/111101/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,18 +38,12 @@ msgstr "Nezdařilo se spustit webové rozhraní"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Šablona pro web nebyla nalezena: %s, zkouším standardní šablonu"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc vypnut: Nenalezena správná verze! (Nalezena v%s, očekávána v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"Modul SABYenc... nebyl nalezen! Očekávána v%s - https://sabnzbd.org/sabyenc"
"SABCTools vypnut: Nenalezena správná verze! (Nalezena v%s, očekávána v%s)"
#. Error message
#: SABnzbd.py
@@ -428,7 +422,6 @@ msgstr ""
"Musíte nastavit maximální rychlost linky předtím než začnete nastavovat "
"limity pro přenos"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Nelze se připojit k serveru %s [%s]"
@@ -452,20 +445,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Příliš mnoho spojení k serveru %s"
msgid "Too many connections to server %s [%s]"
msgstr "Příliš mnoho spojení k serveru %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Pravděpodobné sdílení účtu"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Přihlášení k serveru %s se nezdařilo"
msgid "Failed login for server %s [%s]"
msgstr "Přihlášení k serveru %s se nezdařilo [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -647,7 +639,7 @@ msgstr ""
"Nesprávný API klíč, použijte api klíč z Nastavení->Obecné ve vašem programu "
"třetí strany:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Přihlášené selhalo, zkontrolujte jméno a heslo."
@@ -2957,6 +2949,10 @@ msgstr ""
msgid "System Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr ""

View File

@@ -1,15 +1,15 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Danish (https://www.transifex.com/sabnzbd/teams/111101/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,19 +37,13 @@ msgstr "Kunne ikke starte web-interface"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Kan ikke finde webskabeloner: %s, forsøger med standardskabelon"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc deaktiveret: Der blev ikke fundet nogen korrekt version (Fandt v%s, "
"forventede v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc modul... IKKE fundet! Forventede v%s - https://sabnzbd.org/sabyenc"
"SABCTools deaktiveret: Der blev ikke fundet nogen korrekt version (Fandt "
"v%s, forventede v%s)"
#. Error message
#: SABnzbd.py
@@ -426,7 +420,6 @@ msgstr ""
"Du skal angive den maksimale båndbredde, før du kan angive en båndbredde "
"begrænsning"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Kan ikke tilslutte til server %s [%s]"
@@ -450,20 +443,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Det lykkedes ikke at initialisere %s@%s med begrundelse %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Alt for mange forbindelser til serveren %s"
msgid "Too many connections to server %s [%s]"
msgstr "Alt for mange forbindelser til serveren %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Sandsynligt delt konto"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Det lykkedes ikke at logge på serveren %s"
msgid "Failed login for server %s [%s]"
msgstr "Det lykkedes ikke at logge på serveren %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -655,7 +647,7 @@ msgstr ""
"Forkert API-nøgle, anvend api-nøglen fra Konfiguration->Generelt i dit "
"tredjepartsprogram:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Godkendelse mislykkedes, kontrollere brugernavn/adgangskode."
@@ -3020,6 +3012,10 @@ msgstr ""
msgid "System Folders"
msgstr "Systemmapper"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Administrativ mappe"

View File

@@ -1,7 +1,7 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
#
# Translators:
# C E <githubce@eiselt.ch>, 2020
# Nikolai Bohl <n.kay01@gmail.com>, 2020
@@ -10,14 +10,14 @@
# Andreas Kames, 2021
# Simon W., 2021
# Nils Briggen, 2022
# Safihre <safihre@sabnzbd.org>, 2022
# reloxx13 <reloxx@interia.pl>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: reloxx13 <reloxx@interia.pl>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: German (https://www.transifex.com/sabnzbd/teams/111101/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -47,19 +47,13 @@ msgstr ""
"Konnte Web-Vorlage nicht finden: %s Versuche die Standard-Vorlage zu "
"verwenden."
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc deaktiviert: Keine korrekte Version gefunden! (Gefunden v%s, "
"Erwartet v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc Modul... Nicht gefunden! Erwarte v%s - https://sabnzbd.org/sabyenc"
"SABCTools deaktiviert: Keine korrekte Version gefunden! (Gefunden v%s, "
"Erwartet v%s)"
#. Error message
#: SABnzbd.py
@@ -455,7 +449,6 @@ msgstr ""
"Bevor ein Bandbreitenlimit gesetzt werden kann, muss die maximale Bandbreite"
" festgelegt werden"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Verbindung zum Server %s kann nicht hergestellt werden. %s"
@@ -479,20 +472,19 @@ msgstr "Es gibt keine aktiven Server!"
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Fehler %s@%s zu initialisieren, aus folgendem Grund: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Zu viele Verbindungen zu Server %s"
msgid "Too many connections to server %s [%s]"
msgstr "Zu viele Verbindungen zu Server %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Möglicherweise wird das Konto geteilt"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Anmelden beim Server fehlgeschlagen. %s"
msgid "Failed login for server %s [%s]"
msgstr "Anmelden beim Server fehlgeschlagen. %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -688,7 +680,7 @@ msgstr ""
"API-Schlüssel ungültig. Bitte API-Schlüssel aus Einstellungen->Allgemein in "
"die externe Anwendung eingeben:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr ""
"Authentifizierung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort."
@@ -3126,6 +3118,10 @@ msgstr ""
msgid "System Folders"
msgstr "System-Ordner"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Administrativer Ordner"

View File

@@ -1,17 +1,17 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Ester Molla Aragones <moarages@gmail.com>, 2020
# 1024mb <angelb2203@gmail.com>, 2020
# Safihre <safihre@sabnzbd.org>, 2022
# 1024mb <angelb2203@gmail.com>, 2023
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Spanish (https://www.transifex.com/sabnzbd/teams/111101/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -41,20 +41,13 @@ msgstr ""
"No se puede encontrar la plantilla web: %s, intentando con la plantilla "
"estandar"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc deshabilitado: ¡no se ha encontrado la versión correcta! (Se ha "
"encontrado la v%s, se esperaba la v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"Módulo SABYenc... ¡NO encontrado! Se esperaba la v%s - "
"https://sabnzbd.org/sabyenc"
"SABCTools deshabilitado: ¡no se ha encontrado la versión correcta! (Se ha "
"encontrado la v%s, se esperaba la v%s)"
#. Error message
#: SABnzbd.py
@@ -114,6 +107,8 @@ msgid ""
"Current umask (%o) might deny SABnzbd access to the files and folders it "
"creates."
msgstr ""
"La umask actual (%o) podría denegarle acceso a SABnzbd a los archivos y "
"carpetas que este crea."
#. Warning message
#: SABnzbd.py
@@ -158,22 +153,22 @@ msgstr "Error grave al guardar estado"
#. Warning message
#: sabnzbd/__init__.py
msgid "Restarting because of crashed postprocessor"
msgstr ""
msgstr "Reiniciando a causa de un posprocesador colgado"
#. Warning message
#: sabnzbd/__init__.py
msgid "Restarting because of crashed downloader"
msgstr ""
msgstr "Reiniciando debido al cuelgue del descargador"
#. Warning message
#: sabnzbd/__init__.py
msgid "Restarting because of crashed decoder"
msgstr ""
msgstr "Reiniciando a causa de un decodificador colgado"
#. Warning message
#: sabnzbd/__init__.py
msgid "Restarting because of crashed assembler"
msgstr ""
msgstr "Reiniciando debido al cuelgue del ensamblador"
#. Warning message
#: sabnzbd/__init__.py
@@ -446,7 +441,6 @@ msgstr ""
"Debe establecer un ancho de banda máximo antes de poder establecer un límite"
" de ancho de banda"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Error en inicio de conexion a servidor %s [%s]"
@@ -470,20 +464,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Error al inicializar %s@%s con la razón: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Demasiadas conexiones con el servidor %s"
msgid "Too many connections to server %s [%s]"
msgstr "Demasiadas conexiones con el servidor %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Compartiendo de cuenta probable"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Registraccion fallo para servidor %s"
msgid "Failed login for server %s [%s]"
msgstr "Registraccion fallo para servidor %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -676,7 +669,7 @@ msgstr ""
"Clave de API erróneo, favor ingresar la clave correcta desde Config->General"
" en tu aplicacion externa:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Autenticación fallida, compruebe el usuario o la contraseña."
@@ -3098,6 +3091,10 @@ msgstr ""
msgid "System Folders"
msgstr "Directorios del sistema"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Directorio de administración"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -37,15 +37,10 @@ msgstr "Web-käyttöliittymän käynnistys epäonnistui"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Web-mallia %s ei löydy, yritetään käyttää oletusmallia"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -422,7 +417,6 @@ msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr ""
"Sinun täytyy määrittää enimmäiskaista ennen kaistarajoituksen käyttöönottoa."
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Palvelimeen %s ei voida yhdistää [%s]"
@@ -446,20 +440,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Alustaminen epäonnistui kohteessa %s@%s syy: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Liikaa yhteyksiä palvelimelle %s"
msgid "Too many connections to server %s [%s]"
msgstr "Liikaa yhteyksiä palvelimelle %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Mahdollinen tilin jakaminen"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Kirjautuminen palvelimelle %s epäonnistui"
msgid "Failed login for server %s [%s]"
msgstr "Kirjautuminen palvelimelle %s epäonnistui [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -651,7 +644,7 @@ msgstr ""
"API avain virheellinen, käytä Asetukset->Yleiset löytyvää api avainta "
"käyttämääsi kolmannen osapuolen ohjelmaan:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Varmennus epäonnistui, tarkista käyttäjänimi/salasana."
@@ -3022,6 +3015,10 @@ msgstr ""
msgid "System Folders"
msgstr "Järjestelmäkansio"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Hallinnollinen kansio"

View File

@@ -1,16 +1,16 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2022
# Fred L <88com88@gmail.com>, 2022
# Fred L <88com88@gmail.com>, 2023
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Fred L <88com88@gmail.com>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: French (https://www.transifex.com/sabnzbd/teams/111101/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -40,19 +40,13 @@ msgstr ""
"Impossible de trouver le template de l'interface web : %s, nouvelle "
"tentative avec le template standard"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc désactivé: aucune version correcte n'a été trouvée ! (v%s trouvée, "
"v%s attendue)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"Module SABYenc... NON trouvé ! v%s attendue - https://sabnzbd.org/sabyenc"
"SABCTools désactivé: aucune version correcte n'a été trouvée ! (v%s trouvée,"
" v%s attendue)"
#. Error message
#: SABnzbd.py
@@ -451,7 +445,6 @@ msgstr ""
"Vous devez définir une bande passante maximale avant de pouvoir définir une "
"limite de bande passante"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Impossible de se connecter au serveur %s [%s]"
@@ -475,20 +468,21 @@ msgstr "Il n'y a aucun serveur actif !"
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Échec d'initialisation de %s@%s pour la raison suivante : %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Trop de connexions au serveur %s"
msgid "Too many connections to server %s [%s]"
msgstr "Trop de connexions au serveur %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Partage de compte probable"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
"Connexion au serveur %s [%s] à partir de trop d'adresses IP différentes - "
"https://sabnzbd.org/multiple-adresses"
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Échec de la connexion au serveur %s"
msgid "Failed login for server %s [%s]"
msgstr "Échec de la connexion au serveur %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -684,7 +678,7 @@ msgstr ""
"Clé API incorrecte, utilisez la clé API de la configuration générale dans "
"votre application tierce :"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Echec d'authentification, vérifiez les identifiant/mot de passe."
@@ -3120,6 +3114,10 @@ msgstr ""
msgid "System Folders"
msgstr "Dossiers système"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr "Dossiers cachés"
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Dossier administrateur"

View File

@@ -1,16 +1,16 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2022
# ION, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: ION, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Hebrew (https://www.transifex.com/sabnzbd/teams/111101/he/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,16 +38,11 @@ msgstr "נכשל בהתחלת ממשק רשת"
msgid "Cannot find web template: %s, trying standard template"
msgstr "לא ניתן למצוא תבניות רשת: %s, מנסה תבנית תקנית"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr "SABYenc מושבת: גרסה נכונה לא נמצאה! (%s נמצאה, מצפה אל %s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
msgstr "מודול SABYenc… לא נמצא! מצפה אל %s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr "SABCTools מושבת: גרסה נכונה לא נמצאה! (%s נמצאה, מצפה אל %s)"
#. Error message
#: SABnzbd.py
@@ -422,7 +417,6 @@ msgstr "מושהה"
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr "אתה חייב לקבוע רוחב פס מרבי לפני שאתה קובע מגבלת רוחב פס"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "לא ניתן להתחבר אל השרת %s [%s]"
@@ -446,20 +440,19 @@ msgstr "אין שרתים פעילים!"
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "נכשל באתחול %s@%s עם סיבה: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "יותר מדי חיבורים לשרת %s"
msgid "Too many connections to server %s [%s]"
msgstr "יותר מדי חיבורים לשרת %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "שיתוף סביר של חשבון"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "נכשל בכניסה אל השרת %s"
msgid "Failed login for server %s [%s]"
msgstr "נכשל בכניסה אל השרת %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -649,7 +642,7 @@ msgid ""
"program:"
msgstr "מפתח API שגוי, השתמש במפתח ה־API מתצורה->כללי בתוכנית הצד השלישי שלך:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "אימות נכשל, בדוק שם משתמש/סיסמה."
@@ -3028,6 +3021,10 @@ msgstr "קובץ שמכיל את כל הסיסמאות שינוסו על קבצ
msgid "System Folders"
msgstr "תיקיות מערכת"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "תיקייה מינהלית"

View File

@@ -1,15 +1,15 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Norwegian Bokmål (https://www.transifex.com/sabnzbd/teams/111101/nb/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,18 +37,12 @@ msgstr "Kunne ikke starte webgrensesnittet"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Kan ikke finne webmal: %s, prøver standardmal"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc deaktivert: Fant ikke korrekt versjon! (Fant v%s, forventet v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc modul... IKKE funnet! Forventet v%s - https://sabnzbd.org/sabyenc"
"SABCTools deaktivert: Fant ikke korrekt versjon! (Fant v%s, forventet v%s)"
#. Error message
#: SABnzbd.py
@@ -418,7 +412,6 @@ msgstr "Pauset"
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr "Du må sette maks båndbredde før du kan sette en båndbreddebegrensning"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Kan ikke koble til server %s [%s]"
@@ -442,20 +435,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Feilet å starte %s@%s grunnet: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "For mange tilkoblinger til server %s"
msgid "Too many connections to server %s [%s]"
msgstr "For mange tilkoblinger til server %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Mistenkt kontodeling"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Kunne ikke logge inn på server %s"
msgid "Failed login for server %s [%s]"
msgstr "Kunne ikke logge inn på server %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -647,7 +639,7 @@ msgstr ""
"API-nøkkel er feil, bruk API-nøkkel fra Konfigurasjon->Generelt i ditt "
"tredjepartsprogram:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Godkjenning mislyktes, kontroller brukernavn og passord."
@@ -3007,6 +2999,10 @@ msgstr ""
msgid "System Folders"
msgstr "Systemmapper"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Administrativ Mappe"

View File

@@ -1,16 +1,16 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
#
# Translators:
# Rik Brouwer, 2022
# Safihre <safihre@sabnzbd.org>, 2022
#
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Dutch (https://www.transifex.com/sabnzbd/teams/111101/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,19 +38,13 @@ msgstr "Webinterface kan niet gestart worden"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Websjabloon %s niet te vinden; het standaardsjabloon wordt gebruikt."
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc uitgeschakeld, geen bruikbare versie gevonden! (V%s gevonden, V%s "
"verwacht)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc module... NIET gevonden! Verwacht V%s - https://sabnzbd.org/sabyenc"
"SABCTools uitgeschakeld, geen bruikbare versie gevonden! (V%s gevonden, V%s "
"verwacht)"
#. Error message
#: SABnzbd.py
@@ -445,7 +439,6 @@ msgstr ""
"Je moet eerst een maximumbandbreedte instellen voordat je een limiet kunt "
"instellen"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Verbinding maken met server %s [%s] niet mogelijk"
@@ -469,20 +462,21 @@ msgstr "Er zijn geen actieve servers!"
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Initialisatie van %s@%s mislukt, vanwege: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Te veel verbindingen met server %s"
msgid "Too many connections to server %s [%s]"
msgstr "Te veel verbindingen met server %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Mogelijk delen van account"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
"Teveel verschillende IP-adressen probeerde in te loggen op server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Aanmelden bij server %s mislukt"
msgid "Failed login for server %s [%s]"
msgstr "Aanmelden bij server %s mislukt [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -678,7 +672,7 @@ msgstr ""
"API-sleutel incorrect; vul de API-sleutel van 'Configuratie' => 'Algemeen' "
"in bij het externe programma:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Inloggen mislukt, controleer gebruikersnaam en wachtwoord."
@@ -3083,6 +3077,10 @@ msgstr ""
msgid "System Folders"
msgstr "Systeemmappen"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Administratieve map"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -37,15 +37,10 @@ msgstr "Nie udało się uruchomić interfejsu WWW"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Nie znaleziono szablonu: %s, próbuję użyć standardowego szablonu"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -415,7 +410,6 @@ msgstr ""
"Przed ustawieniem limitu przepustowości należy ustawić maksymalną "
"przepustowość"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Nie można połączyć się z serwerem %s [%s]"
@@ -439,20 +433,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Błąd podczas inicjalizacji %s@%s: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Zbyt wiele połączeń do serwera %s"
msgid "Too many connections to server %s [%s]"
msgstr "Zbyt wiele połączeń do serwera %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Prawdopodobne współdzielenie konta"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Błąd logowania do serwera %s"
msgid "Failed login for server %s [%s]"
msgstr "Błąd logowania do serwera %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -646,7 +639,7 @@ msgstr ""
"Klucz API jest nieprawidłowy, użyj klucza API z sekcji Konfiguracja->Ogólne "
"w zewnętrznym programie:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Błąd połączenia, sprawdź nazwę użytkownika i hasło."
@@ -3016,6 +3009,10 @@ msgstr ""
msgid "System Folders"
msgstr "Katalogi systemowe"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Katalog administracyjny"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -38,15 +38,10 @@ msgid "Cannot find web template: %s, trying standard template"
msgstr ""
"Não foi possível encontrar o template web: %s. Tentando o template padrão"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -421,7 +416,6 @@ msgstr ""
"Você deve definir a largura de banda máxima antes de definir um limite de "
"banda"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Não é possível conectar ao servidor %s [%s]"
@@ -445,20 +439,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Falha ao iniciar %s@%s devido as seguintes razões: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Excesso de conexões ao servidor %s"
msgid "Too many connections to server %s [%s]"
msgstr "Excesso de conexões ao servidor %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Provável compartilhamento de conta"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Falha de logon ao servidor %s"
msgid "Failed login for server %s [%s]"
msgstr "Falha de logon ao servidor %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -650,7 +643,7 @@ msgstr ""
"Chave de API incorreta. Use a chave de API de Configuração->Geral em seu "
"programa de terceiros:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Falha de autenticação, verifique usuário / senha."
@@ -3016,6 +3009,10 @@ msgstr ""
msgid "System Folders"
msgstr "Pastas de Sistema"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Pasta Administrativa"

View File

@@ -1,16 +1,16 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Eduard Baniceru <war4peace@gmail.com>, 2021
# Safihre <safihre@sabnzbd.org>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Romanian (https://www.transifex.com/sabnzbd/teams/111101/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,19 +38,13 @@ msgstr "Pornirea interfeţei-web nereuşită"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Nu se poate găsi şablon web:%s, se încearcă şablon standard"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"SABYenc dezactivat: nu s-a găsit o versiune corectă! (Găsită v%s, se "
"așteaptă v%s)"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
"Modul SABYenc... NEgăsit! Se așteaptă v%s - https://sabnzbd.org/sabyenc"
"SABCTools dezactivat: nu s-a găsit o versiune corectă! (Găsită v%s, se "
"așteaptă v%s)"
#. Error message
#: SABnzbd.py
@@ -435,7 +429,6 @@ msgstr ""
"Trebuie să seta-ţi lățimea de bandă maximă înainte de a seta o limită de "
"viteză."
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Nu mă pot conecta la serverul %s [%s]"
@@ -459,20 +452,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Nu am putu inițializa %s@%s din cauza următorului motiv: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Prea multe conexiuni la serverul %s"
msgid "Too many connections to server %s [%s]"
msgstr "Prea multe conexiuni la serverul %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Partajare cont probabilă"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Autentificare nereuşită la serverul %s"
msgid "Failed login for server %s [%s]"
msgstr "Autentificare nereuşită la serverul %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -664,7 +656,7 @@ msgstr ""
"Cheie API incorectă, Folosiţi cheia api din Configurare->General în "
"programul dumneavoastră terţ:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Autentificare nereuşită, verifică nume utilizator/parolă."
@@ -3042,6 +3034,10 @@ msgstr "Fişier ce conţine parole pentru fişiere RAR encriptate."
msgid "System Folders"
msgstr "Dosare Sistem"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Dosar Administrativ"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -39,15 +39,10 @@ msgstr ""
"Не удаётся найти шаблон веб-интерфейса: %s. Выполняется попытка использовать"
" стандартный шаблон"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -417,7 +412,6 @@ msgstr "Приостановлено"
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Не удаётся подключиться к серверу %s [%s]"
@@ -441,20 +435,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgid "Too many connections to server %s [%s]"
msgstr ""
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Возможно, учётная запись используется где-то ещё"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Ошибка входа на сервер %s"
msgid "Failed login for server %s [%s]"
msgstr "Ошибка входа на сервер %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -646,7 +639,7 @@ msgstr ""
"Неправильный ключ API. Используйте в сторонней программе ключ API из раздела"
" «Настройка -> Общие»:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Ошибка проверки подлинности. Проверьте имя и пароль."
@@ -3012,6 +3005,10 @@ msgstr ""
msgid "System Folders"
msgstr "Системные папки"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Административная папка"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -37,15 +37,10 @@ msgstr "Neuspešno pokretanje web interfejsa"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Немогуће наћи веб модел: %s, програм покушава са стандардним моделом"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -416,7 +411,6 @@ msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr ""
"Требате да поставите максимални проток пре него што поставите ограничење"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Neuspešno povezivanje na server %s[%s]"
@@ -440,20 +434,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Neuspešna inicijalizacija %s@%s iz razloga: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "Previše konekcija ka serveru %s"
msgid "Too many connections to server %s [%s]"
msgstr "Previše konekcija ka serveru %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Moguće deljenje naloga"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Неуспешно пријављивање на сервер %s"
msgid "Failed login for server %s [%s]"
msgstr "Неуспешно пријављивање на сервер %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -643,7 +636,7 @@ msgid ""
msgstr ""
"API кључ је погрешан, унети у спољни програм API кључ из Подешавања->Опште:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Аутентификација погрешна, проверити име/лозинку."
@@ -2997,6 +2990,10 @@ msgstr "Датотека са свим лозинкама за шифрован
msgid "System Folders"
msgstr "Системске фасцикле"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Фасцикла Администратора"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
@@ -37,15 +37,10 @@ msgstr "Det gick inte att starta webbgränssnittet"
msgid "Cannot find web template: %s, trying standard template"
msgstr "Hittar inte webbmall: %s, försöker med standardmall"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr ""
#. Error message
@@ -416,7 +411,6 @@ msgstr "Pausad"
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr "Du måste ange maximal bandbredd innan du kan ange bandbreddsgräns"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "Kan ej ansluta till server %s [%s]"
@@ -440,20 +434,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "Misslyckades att initiera %s@%s med orsak %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "För många anslutningar till servern %s"
msgid "Too many connections to server %s [%s]"
msgstr "För många anslutningar till servern %s [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "Misstänkt kontodelning"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "Det gick inte att logga in på server %s"
msgid "Failed login for server %s [%s]"
msgstr "Det gick inte att logga in på server %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -645,7 +638,7 @@ msgstr ""
"API-nyckel felaktig, använd api-nyckeln från Konfiguration-> Allmänt i ditt "
"tredjepartsprogram:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "Autentisering misslyckades, kontrollera användarnamn och lösenord."
@@ -3008,6 +3001,10 @@ msgstr ""
msgid "System Folders"
msgstr "Systemmappar"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "Administrativ mapp"

View File

@@ -1,15 +1,15 @@
# SABnzbd Translation Template file MAIN
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2022
# Safihre <safihre@sabnzbd.org>, 2023
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:49+0000\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2022\n"
"Last-Translator: Safihre <safihre@sabnzbd.org>, 2023\n"
"Language-Team: Chinese (China) (https://www.transifex.com/sabnzbd/teams/111101/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,16 +37,11 @@ msgstr "web 界面启动失败"
msgid "Cannot find web template: %s, trying standard template"
msgstr "无法找到 web 模板: %s正在尝试标准模板"
#. Error message
#: SABnzbd.py
msgid "SABYenc disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr "SABYenc 已禁用:未找到正确的版本!(找到 v%s要求 v%s"
#. Error message
#: SABnzbd.py
msgid ""
"SABYenc module... NOT found! Expecting v%s - https://sabnzbd.org/sabyenc"
msgstr "SABYenc 模块... 未找到!要求 v%s - https://sabnzbd.org/sabyenc"
"SABCTools disabled: no correct version found! (Found v%s, expecting v%s)"
msgstr "SABCTools 已禁用:未找到正确的版本!(找到 v%s要求 v%s"
#. Error message
#: SABnzbd.py
@@ -413,7 +408,6 @@ msgstr "已暂停"
msgid "You must set a maximum bandwidth before you can set a bandwidth limit"
msgstr "设置带宽限制前,您必须设置最大带宽值"
#. Warning message
#: sabnzbd/downloader.py
msgid "Cannot connect to server %s [%s]"
msgstr "无法连接到服务器 %s [%s]"
@@ -437,20 +431,19 @@ msgstr ""
msgid "Failed to initialize %s@%s with reason: %s"
msgstr "无法初始化 %s@%s原因为: %s"
#. Warning message
#: sabnzbd/downloader.py
msgid "Too many connections to server %s"
msgstr "服务器 %s 连接数过多"
msgid "Too many connections to server %s [%s]"
msgstr "服务器 %s 连接数过多 [%s]"
#. Warning message
#: sabnzbd/downloader.py
msgid "Probable account sharing"
msgstr "可能存在账号共享"
msgid ""
"Login from too many different IP addresses to server %s [%s] - "
"https://sabnzbd.org/multiple-adresses"
msgstr ""
#. Error message
#: sabnzbd/downloader.py
msgid "Failed login for server %s"
msgstr "无法登录服务器 %s"
msgid "Failed login for server %s [%s]"
msgstr "无法登录服务器 %s [%s]"
#. Error message
#: sabnzbd/downloader.py
@@ -638,7 +631,7 @@ msgid ""
"program:"
msgstr "API Key 不正确,请在第三方程序中使用“配置”->“常规”中的 api key:"
#: sabnzbd/interface.py, sabnzbd/newswrapper.py, sabnzbd/utils/servertests.py
#: sabnzbd/interface.py, sabnzbd/utils/servertests.py
msgid "Authentication failed, check username/password."
msgstr "身份认证失败,请检查用户名/密码。"
@@ -2966,6 +2959,10 @@ msgstr "包含要对加密 RAR 文件进行尝试的所有密码的文件。"
msgid "System Folders"
msgstr "系统文件夹"
#: sabnzbd/skintext.py
msgid "Hidden Folders"
msgstr ""
#: sabnzbd/skintext.py
msgid "Administrative Folder"
msgstr "管理文件夹"

View File

@@ -1,11 +1,11 @@
#
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"Project-Id-Version: SABnzbd-4.0.0Alpha1\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: team@sabnzbd.org\n"
"Language-Team: SABnzbd <team@sabnzbd.org>\n"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,14 +1,14 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
#
# Translators:
# Safihre <safihre@sabnzbd.org>, 2020
# reloxx13 <reloxx@interia.pl>, 2022
#
msgid ""
msgstr ""
"Project-Id-Version: SABnzbd-3.8.0-develop\n"
"Project-Id-Version: SABnzbd-4.0.0-develop\n"
"PO-Revision-Date: 2020-06-27 15:56+0000\n"
"Last-Translator: reloxx13 <reloxx@interia.pl>, 2022\n"
"Language-Team: German (https://www.transifex.com/sabnzbd/teams/111101/de/)\n"

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,5 +1,5 @@
# SABnzbd Translation Template file NSIS
# Copyright 2007-2022 The SABnzbd-Team
# Copyright 2007-2023 The SABnzbd-Team
# team@sabnzbd.org
#
# Translators:

View File

@@ -1,11 +1,11 @@
# Main requirements
# Note that not all sub-dependencies are listed, but only ones we know could cause trouble
sabyenc3==5.4.4
sabctools==6.1.0
cheetah3==3.2.6.post1
cffi==1.15.1
pycparser==2.21
feedparser==6.0.10
configobj==5.0.6
configobj==5.0.8
cheroot==9.0.0
six==1.16.0
cherrypy==18.8.0
@@ -13,12 +13,12 @@ jaraco.functools==3.5.2
jaraco.collections==3.8.0
jaraco.text==3.8.1 # Newer version introduces irrelevant extra dependencies
jaraco.classes==3.2.3
jaraco.context==4.2.0
jaraco.context==4.3.0
more-itertools==9.0.0
zc.lockfile==2.0
python-dateutil==2.8.2
tempora==5.1.0
pytz==2022.6
tempora==5.2.1
pytz==2022.7.1
sgmllib3k==1.0.0
portend==3.1.0
chardet==5.1.0
@@ -30,17 +30,17 @@ rebulk==3.1.0
# Recent cryptography versions require Rust. If you run into issues compiling this
# SABnzbd will also work with older pre-Rust versions such as cryptography==3.3.2
cryptography==38.0.4
cryptography==39.0.1
# We recommend using "orjson" as it is 2x as fast as "ujson". However, it requires
# Rust so SABnzbd works just as well with "ujson" or the Python built in "json" module
ujson==5.6.0
ujson==5.7.0
# Windows system integration
pywin32==305; sys_platform == 'win32'
# macOS system calls
pyobjc==9.0; sys_platform == 'darwin'
pyobjc==9.0.1; sys_platform == 'darwin'
# Linux notifications
notify2==0.3.1; sys_platform != 'win32' and sys_platform != 'darwin'

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -162,7 +162,7 @@ WIN_SERVICE = None # Instance of our Win32 Service Class
BROWSER_URL = None
CERTIFICATE_VALIDATION = True
NO_DOWNLOADING = False # When essentials are missing (SABYenc/par2/unrar)
NO_DOWNLOADING = False # When essentials are missing (SABCTools/par2/unrar)
WEB_DIR = None
WEB_DIR_CONFIG = None
@@ -190,12 +190,16 @@ DOWNLOAD_DIR_SPEED = 0
COMPLETE_DIR_SPEED = 0
INTERNET_BANDWIDTH = 0
# Record of HTTPS config files at startup
CONFIG_BACKUP_HTTPS_OK = []
# Rendering of original command line arguments in Config
CMDLINE = " ".join(['"%s"' % arg for arg in sys.argv])
__INITIALIZED__ = False
__SHUTTING_DOWN__ = False
##############################################################################
# Signal Handler
##############################################################################
@@ -228,6 +232,8 @@ def initialize(pause_downloader=False, clean_up=False, repair=0):
sabnzbd.__SHUTTING_DOWN__ = False
sys.setswitchinterval(cfg.switchinterval())
# Set global database connection for Web-UI threads
cherrypy.engine.subscribe("start_thread", get_db_connection)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -26,7 +26,7 @@ from typing import Dict, List
import sabnzbd
from sabnzbd.decorators import synchronized
from sabnzbd.constants import GIGI, ANFO, MEBI, LIMIT_DECODE_QUEUE, MIN_DECODE_QUEUE
from sabnzbd.constants import GIGI, ANFO, MEBI, LIMIT_DECODE_QUEUE, MIN_DECODE_QUEUE, ASSEMBLER_WRITE_THRESHOLD
from sabnzbd.nzbstuff import Article
# Operations on the article table are handled via try/except.
@@ -45,6 +45,8 @@ class ArticleCache:
# so it can be larger on memory-rich systems
self.decoder_cache_article_limit = 0
self.assembler_write_trigger: int = 1
# On 32 bit we only allow the user to set 1GB
# For 64 bit we allow up to 4GB, in case somebody wants that
self.__cache_upper_limit = GIGI
@@ -68,6 +70,16 @@ class ArticleCache:
# The cache should also not be too small
self.decoder_cache_article_limit = max(decoder_cache_limit, MIN_DECODE_QUEUE)
# Set assembler_write_trigger to be the equivalent of ASSEMBLER_WRITE_THRESHOLD %
# of the total cache, assuming an article size of 750 000 bytes
self.assembler_write_trigger = int(self.__cache_limit * ASSEMBLER_WRITE_THRESHOLD / 100 / 750_000) + 1
logging.debug(
"Decoder cache limit = %d - Assembler trigger = %d",
self.decoder_cache_article_limit,
self.assembler_write_trigger,
)
@synchronized(ARTICLE_COUNTER_LOCK)
def reserve_space(self, data_size: int):
"""Reserve space in the cache"""
@@ -92,9 +104,10 @@ class ArticleCache:
# Register article for bookkeeping in case the job is deleted
nzo.add_saved_article(article)
if article.lowest_partnum and not article.nzf.import_finished:
# Write the first-fetched articles to disk
# Otherwise the cache could overflow
if article.lowest_partnum and not (article.nzf.import_finished or article.nzf.filename_checked):
# Write the first-fetched articles to temporary file unless downloading
# of the rest of the parts has started or filename is verified.
# Otherwise the cache could overflow.
self.__flush_article_to_disk(article, data)
return

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -24,7 +24,6 @@ import queue
import logging
import re
from threading import Thread
import hashlib
import ctypes
from typing import Tuple, Optional, List
@@ -56,11 +55,8 @@ class Assembler(Thread):
def process(self, nzo: NzbObject, nzf: Optional[NzbFile] = None, file_done: Optional[bool] = None):
self.queue.put((nzo, nzf, file_done))
def queue_full(self):
return self.queue.qsize() >= MAX_ASSEMBLER_QUEUE
def partial_nzf_in_queue(self, nzf: NzbFile):
return (nzf.nzo, nzf, False) in self.queue.queue
def queue_level(self) -> float:
return self.queue.qsize() / MAX_ASSEMBLER_QUEUE
def run(self):
while 1:
@@ -78,9 +74,7 @@ class Assembler(Thread):
self.diskspace_check(nzo, nzf)
# Prepare filepath
filepath = nzf.prepare_filepath()
if filepath:
if filepath := nzf.prepare_filepath():
try:
logging.debug("Decoding part of %s", filepath)
self.assemble(nzo, nzf, file_done)
@@ -170,9 +164,6 @@ class Assembler(Thread):
1) Partial write: write what we have
2) Nothing written before: write all
"""
# New hash-object needed?
if not nzf.md5:
nzf.md5 = hashlib.md5()
# We write large article-sized chunks, so we can safely skip the buffering of Python
with open(nzf.filepath, "ab", buffering=0) as fout:
@@ -191,7 +182,7 @@ class Assembler(Thread):
# Could be empty in case nzo was deleted
if data:
fout.write(data)
nzf.md5.update(data)
nzf.update_crc32(article.crc32, len(data))
article.on_disk = True
else:
logging.info("No data found when trying to write %s", article)
@@ -207,7 +198,7 @@ class Assembler(Thread):
# Final steps
if file_done:
set_permissions(nzf.filepath)
nzf.md5sum = nzf.md5.digest()
nzf.assembled = True
@staticmethod
def check_encrypted_and_unwanted(nzo: NzbObject, nzf: NzbFile):

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -434,40 +434,6 @@ class BPSMeter:
# We record every second, but display at the user's refresh-rate
return self.bps_list[::refresh_rate]
def get_stable_speed(self, timespan: int = 10) -> Optional[int]:
"""See if there is a stable speed the last <timespan> seconds
None: indicates it can't determine yet
0: the speed was not stable during <timespan>
Positive float: the speed was stable
"""
if len(self.bps_list) < timespan:
return None
# Check if speed fell by more than 15%
try:
if self.bps_list[-1] / self.bps_list[-timespan] < 0.85:
return 0
except:
pass
# Calculate the variance in the speed
avg = sum(self.bps_list[-timespan:]) / timespan
vari = 0
for bps in self.bps_list[-timespan:]:
vari += abs(bps - avg)
vari = vari / timespan
try:
# See if the variance is less than 5%
if (vari / (self.bps / KIBI)) < 0.05:
return avg
else:
return 0
except:
# Probably one of the values was 0
pass
return None
def reset_quota(self, force: bool = False):
"""Check if it's time to reset the quota, optionally resuming
Return True, when still paused or should be paused

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -47,6 +47,8 @@ from sabnzbd.constants import (
DEF_COMPLETE_DIR,
DEF_FOLDER_MAX,
DEF_STD_WEB_COLOR,
DEF_HTTPS_CERT_FILE,
DEF_HTTPS_KEY_FILE,
)
@@ -258,7 +260,6 @@ configlock = OptionBool("misc", "config_lock", False)
# One time trackers
##############################################################################
fixed_ports = OptionBool("misc", "fixed_ports", False)
sched_converted = OptionBool("misc", "sched_converted", False)
notified_new_skin = OptionNumber("misc", "notified_new_skin", 0)
direct_unpack_tested = OptionBool("misc", "direct_unpack_tested", False)
@@ -279,8 +280,8 @@ bandwidth_max = OptionStr("misc", "bandwidth_max")
cache_limit = OptionStr("misc", "cache_limit")
web_dir = OptionStr("misc", "web_dir", DEF_STD_WEB_DIR)
web_color = OptionStr("misc", "web_color", DEF_STD_WEB_COLOR)
https_cert = OptionDir("misc", "https_cert", "server.cert", create=False)
https_key = OptionDir("misc", "https_key", "server.key", create=False)
https_cert = OptionDir("misc", "https_cert", DEF_HTTPS_CERT_FILE, create=False)
https_key = OptionDir("misc", "https_key", DEF_HTTPS_KEY_FILE, create=False)
https_chain = OptionDir("misc", "https_chain", create=False)
enable_https = OptionBool("misc", "enable_https", False)
# 0=local-only, 1=nzb, 2=api, 3=full_api, 4=webui, 5=webui with login for external
@@ -434,7 +435,9 @@ host_whitelist = OptionList("misc", "host_whitelist", validation=all_lowercase)
local_ranges = OptionList("misc", "local_ranges", protect=True)
max_url_retries = OptionNumber("misc", "max_url_retries", 10, minval=1)
downloader_sleep_time = OptionNumber("misc", "downloader_sleep_time", 10, minval=0)
receive_threads = OptionNumber("misc", "receive_threads", 2, minval=1)
num_simd_decoders = OptionNumber("misc", "num_simd_decoders", 2, minval=1)
switchinterval = OptionNumber("misc", "switchinterval", 0.005)
ssdp_broadcast_interval = OptionNumber("misc", "ssdp_broadcast_interval", 15, minval=1, maxval=600)
ext_rename_ignore = OptionList("misc", "ext_rename_ignore", validation=lower_case_ext)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -34,7 +34,14 @@ from urllib.parse import urlparse
import configobj
import sabnzbd
from sabnzbd.constants import CONFIG_VERSION, NORMAL_PRIORITY, DEFAULT_PRIORITY, CONFIG_BACKUP_FILES, DEF_INI_FILE
from sabnzbd.constants import (
CONFIG_VERSION,
NORMAL_PRIORITY,
DEFAULT_PRIORITY,
CONFIG_BACKUP_FILES,
CONFIG_BACKUP_HTTPS,
DEF_INI_FILE,
)
from sabnzbd.decorators import synchronized
from sabnzbd.filesystem import clip_path, real_path, create_real_path, renamer, remove_file, is_writable
@@ -394,7 +401,6 @@ class ConfigServer:
"""Class defining a single server"""
def __init__(self, name, values):
self.__name = clean_section_name(name)
name = "servers," + self.__name
@@ -713,7 +719,9 @@ def get_dconfig(section, keyword, nested=False):
sect = CFG_DATABASE[section]
except KeyError:
return False, {}
if section in ("servers", "categories", "rss"):
if section == "categories":
data[section] = get_ordered_categories()
elif section in ("servers", "rss"):
data[section] = []
for keyword in sect.keys():
res, conf = get_dconfig(section, keyword, True)
@@ -942,6 +950,17 @@ def create_config_backup() -> Union[str, bool]:
if os.path.isfile(full_path):
with open(full_path, "rb") as data:
zip_ref.writestr(filename, data.read())
for filename, setting in CONFIG_BACKUP_HTTPS.items():
full_path = getattr(sabnzbd.cfg, setting).get_path()
# Only accept HTTPS config files that were successfully loaded by cherrypy on
# startup to protect against last-minute breaking config changes as well as
# inclusion of unrelated files in the backup through manipulated settings.
if full_path and os.path.isfile(full_path) and full_path in sabnzbd.CONFIG_BACKUP_HTTPS_OK:
logging.debug("Adding %s file %s to backup", setting, full_path)
with open(full_path, "rb") as data:
# Add the https cert/key/chain files with a fixed relative filename,
# regardless of where they are actually stored on the filesystem
zip_ref.writestr(filename, data.read())
with open(CFG_OBJ.filename, "rb") as data:
zip_ref.writestr(DEF_INI_FILE, data.read())
return clip_path(complete_path)
@@ -964,6 +983,7 @@ def validate_config_backup(config_backup_data: bytes) -> bool:
def restore_config_backup(config_backup_data: bytes):
"""Restore configuration files from zip file"""
global CFG_MODIFIED
try:
with io.BytesIO(config_backup_data) as backup_ref:
with zipfile.ZipFile(backup_ref, "r") as zip_ref:
@@ -976,16 +996,22 @@ def restore_config_backup(config_backup_data: bytes):
# Write the rest of the admin files that we want to recover
adminpath = sabnzbd.cfg.admin_dir.get_path()
for filename in CONFIG_BACKUP_FILES:
for filename in CONFIG_BACKUP_FILES + list(CONFIG_BACKUP_HTTPS.keys()):
try:
zip_ref.getinfo(filename)
destination_file = os.path.join(adminpath, filename)
logging.debug("Writing backup of %s to %s", filename, destination_file)
with open(destination_file, "wb") as destination_ref:
destination_ref.write(zip_ref.read(filename))
# For HTTPS config files, point the associated setting to the restored file
if setting := CONFIG_BACKUP_HTTPS.get(filename):
logging.debug("Setting value of %s to restored file %s", setting, filename)
getattr(sabnzbd.cfg, setting).set(filename)
CFG_MODIFIED = True
except KeyError:
# File not in archive
pass
save_config()
except:
logging.warning(T("Could not restore backup"))
logging.info("Traceback: ", exc_info=True)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -49,17 +49,11 @@ RENAMES_FILE = "__renames__"
ATTRIB_FILE = "SABnzbd_attrib"
REPAIR_REQUEST = "repair-all.sab"
SABYENC_VERSION_REQUIRED = "5.4.4"
SABCTOOLS_VERSION_REQUIRED = "6.1.0"
DB_HISTORY_VERSION = 1
DB_HISTORY_NAME = "history%s.db" % DB_HISTORY_VERSION
CONFIG_BACKUP_FILES = [
BYTES_FILE_NAME,
RSS_FILE_NAME,
DB_HISTORY_NAME,
]
DEF_DOWNLOAD_DIR = os.path.normpath("Downloads/incomplete")
DEF_COMPLETE_DIR = os.path.normpath("Downloads/complete")
DEF_ADMIN_DIR = "admin"
@@ -82,14 +76,30 @@ DEF_ARTICLE_CACHE_DEFAULT = "500M"
DEF_ARTICLE_CACHE_MAX = "1G"
DEF_TIMEOUT = 60
DEF_SCANRATE = 5
DEF_HTTPS_CERT_FILE = "server.cert"
DEF_HTTPS_KEY_FILE = "server.key"
MAX_WARNINGS = 20
MAX_BAD_ARTICLES = 5
CONFIG_BACKUP_FILES = [
BYTES_FILE_NAME,
RSS_FILE_NAME,
DB_HISTORY_NAME,
]
CONFIG_BACKUP_HTTPS = { # "basename": "associated setting"
DEF_HTTPS_CERT_FILE: "https_cert",
DEF_HTTPS_KEY_FILE: "https_key",
"server.chain": "https_chain",
}
# Constants affecting download performance
MIN_DECODE_QUEUE = 10
LIMIT_DECODE_QUEUE = 100
DIRECT_WRITE_TRIGGER = 35
MAX_ASSEMBLER_QUEUE = 5
MAX_ASSEMBLER_QUEUE = 10
SOFT_QUEUE_LIMIT = 0.6
# Percentage of cache to use before adding file to assembler
ASSEMBLER_WRITE_THRESHOLD = 5
NNTP_BUFFER_SIZE = int(800 * KIBI)
REPAIR_PRIORITY = 3
FORCE_PRIORITY = 2

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -554,7 +554,7 @@ def unpack_history_info(item: Union[Dict, sqlite3.Row]):
return item
def midnight_history_purge():
def scheduled_history_purge():
logging.info("Scheduled history purge")
with HistoryDB() as history_db:
history_db.auto_history_purge()

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -26,28 +26,31 @@ import binascii
from io import BytesIO
from threading import Thread
from typing import Tuple, List, Optional
from zlib import crc32
import sabnzbd
import sabnzbd.cfg as cfg
from sabnzbd.constants import SABYENC_VERSION_REQUIRED
from sabnzbd.constants import SABCTOOLS_VERSION_REQUIRED
from sabnzbd.encoding import ubtou
from sabnzbd.nzbstuff import Article
from sabnzbd.misc import match_str
# Check for correct SABYenc version
SABYENC_VERSION = None
SABYENC_SIMD = None
# Check for correct SABCTools version
SABCTOOLS_VERSION = None
SABCTOOLS_SIMD = None
SABCTOOLS_OPENSSL_LINKED = None
try:
import sabyenc3
import sabctools
SABYENC_ENABLED = True
SABYENC_VERSION = sabyenc3.__version__
SABYENC_SIMD = sabyenc3.simd
SABCTOOLS_ENABLED = True
SABCTOOLS_VERSION = sabctools.__version__
SABCTOOLS_SIMD = sabctools.simd
SABCTOOLS_OPENSSL_LINKED = sabctools.openssl_linked
# Verify version to at least match minor version
if SABYENC_VERSION[:3] != SABYENC_VERSION_REQUIRED[:3]:
if SABCTOOLS_VERSION[:3] != SABCTOOLS_VERSION_REQUIRED[:3]:
raise ImportError
except:
SABYENC_ENABLED = False
SABCTOOLS_ENABLED = False
class BadData(Exception):
@@ -68,7 +71,6 @@ class Decoder:
"""Implement thread-like coordinator for the decoders"""
def __init__(self):
# Initialize queue and servers
self.decoder_queue = queue.Queue()
@@ -103,13 +105,13 @@ class Decoder:
except:
pass
def process(self, article: Article, raw_data: List[bytes], data_size: int):
sabnzbd.ArticleCache.reserve_space(data_size)
self.decoder_queue.put((article, raw_data, data_size))
def process(self, article: Article, raw_data: bytearray, raw_data_size: int):
sabnzbd.ArticleCache.reserve_space(raw_data_size)
self.decoder_queue.put((article, raw_data, raw_data_size))
def queue_full(self) -> bool:
# Check if the queue size exceeds the limits
return self.decoder_queue.qsize() >= sabnzbd.ArticleCache.decoder_cache_article_limit
def queue_level(self) -> float:
# Return level of decoder queue. 0 = empty, >=1 = full.
return self.decoder_queue.qsize() / sabnzbd.ArticleCache.decoder_cache_article_limit
class DecoderWorker(Thread):
@@ -118,14 +120,14 @@ class DecoderWorker(Thread):
def __init__(self, decoder_queue):
super().__init__()
logging.debug("Initializing decoder %s", self.name)
self.decoder_queue: queue.Queue[Tuple[Optional[Article], Optional[List[bytes]], Optional[int]]] = decoder_queue
self.decoder_queue: queue.Queue[Tuple[Optional[Article], Optional[bytearray], Optional[int]]] = decoder_queue
def run(self):
while 1:
# Set Article and NzbObject objects to None so references from this
# thread do not keep the parent objects alive (see #1628)
decoded_data = raw_data = article = nzo = None
article, raw_data, data_size = self.decoder_queue.get()
article, raw_data, raw_data_size = self.decoder_queue.get()
if not article:
logging.debug("Shutting down decoder %s", self.name)
break
@@ -134,7 +136,7 @@ class DecoderWorker(Thread):
art_id = article.article
# Free space in the decoder-queue
sabnzbd.ArticleCache.free_reserved_space(data_size)
sabnzbd.ArticleCache.free_reserved_space(raw_data_size)
# Keeping track
article_success = False
@@ -149,7 +151,7 @@ class DecoderWorker(Thread):
if article.nzf.type == "uu":
decoded_data = decode_uu(article, raw_data)
else:
decoded_data = decode_yenc(article, raw_data)
decoded_data = decode_yenc(article, raw_data, raw_data_size)
article_success = True
@@ -181,7 +183,7 @@ class DecoderWorker(Thread):
except (BadYenc, ValueError):
# Handles precheck and badly formed articles
if nzo.precheck and raw_data and raw_data[0].startswith(b"223 "):
if nzo.precheck and raw_data and raw_data.startswith(b"223 "):
# STAT was used, so we only get a status code
article_success = True
else:
@@ -195,9 +197,9 @@ class DecoderWorker(Thread):
pass
# Only bother with further checks if uu-decoding didn't work out
if not article_success:
# Convert the initial chunks of raw socket data to article lines,
# Convert the first 2000 bytes of raw socket data to article lines,
# and examine the headers (for precheck) or body (for download).
for line in b"".join(raw_data[:2]).split(b"\r\n"):
for line in raw_data[:2000].split(b"\r\n"):
lline = line.lower()
if lline.startswith(b"message-id:"):
article_success = True
@@ -233,39 +235,43 @@ class DecoderWorker(Thread):
# If the data needs to be written to disk due to full cache, this will be slow
# Causing the decoder-queue to fill up and delay the downloader
sabnzbd.ArticleCache.save_article(article, decoded_data)
article.decoded = True
elif not nzo.precheck:
# Nothing to save
article.on_disk = True
sabnzbd.NzbQueue.register_article(article, article_success)
def decode_yenc(article: Article, raw_data: List[bytes]) -> bytes:
# Let SABYenc do all the heavy lifting
decoded_data, yenc_filename, crc_correct = sabyenc3.decode_usenet_chunks(raw_data)
# Mark as decoded
article.decoded = True
def decode_yenc(article: Article, data: bytearray, raw_data_size: int) -> bytearray:
# Let SABCTools do all the heavy lifting
yenc_filename, crc_correct = sabctools.yenc_decode(data)
nzf = article.nzf
# Assume it is yenc
article.nzf.type = "yenc"
nzf.type = "yenc"
# Only set the name if it was found and not obfuscated
if not article.nzf.filename_checked and yenc_filename:
if not nzf.filename_checked and yenc_filename:
# Set the md5-of-16k if this is the first article
if article.lowest_partnum:
article.nzf.md5of16k = hashlib.md5(decoded_data[:16384]).digest()
nzf.md5of16k = hashlib.md5(data[:16384]).digest()
# Try the rename, even if it's not the first article
# For example when the first article was missing
article.nzf.nzo.verify_nzf_filename(article.nzf, yenc_filename)
nzf.nzo.verify_nzf_filename(nzf, yenc_filename)
# CRC check
if not crc_correct:
if crc_correct is None:
logging.info("CRC Error in %s", article.article)
raise BadData(decoded_data)
raise BadData(data)
return decoded_data
article.crc32 = crc_correct
return data
def decode_uu(article: Article, raw_data: List[bytes]) -> bytes:
def decode_uu(article: Article, raw_data: bytearray) -> bytes:
"""Try to uu-decode an article. The raw_data may or may not contain headers.
If there are headers, they will be separated from the body by at least one
empty line. In case of no headers, the first line seems to always be the nntp
@@ -275,10 +281,7 @@ def decode_uu(article: Article, raw_data: List[bytes]) -> bytes:
raise BadUu
# Line up the raw_data
with BytesIO() as encoded_data:
for data in raw_data:
encoded_data.write(data)
raw_data = encoded_data.getvalue().split(b"\r\n")
raw_data = raw_data.split(b"\r\n")
# Index of the uu payload start in raw_data
uu_start = 0
@@ -292,7 +295,7 @@ def decode_uu(article: Article, raw_data: List[bytes]) -> bytes:
# Try to find an empty line separating the body from headers or response
# code and set the expected payload start to the next line.
try:
uu_start = raw_data[:limit].index(b"") + 1
uu_start = raw_data[:limit].index(bytearray(b"")) + 1
except ValueError:
# No empty line, look for a response code instead
if raw_data[0].startswith(b"222 "):
@@ -373,9 +376,8 @@ def decode_uu(article: Article, raw_data: List[bytes]) -> bytes:
# Store the decoded data
decoded_data.write(decoded_line)
# Mark as decoded and set the type to uu; the latter is still needed in
# Set the type to uu; the latter is still needed in
# case the lowest_partnum article was damaged or slow to download.
article.decoded = True
article.nzf.type = "uu"
if article.lowest_partnum:
@@ -385,7 +387,9 @@ def decode_uu(article: Article, raw_data: List[bytes]) -> bytes:
if not article.nzf.filename_checked and uu_filename:
article.nzf.nzo.verify_nzf_filename(article.nzf, uu_filename)
return decoded_data.getvalue()
data = decoded_data.getvalue()
article.crc32 = crc32(data)
return data
def search_new_server(article: Article) -> bool:

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

2
sabnzbd/deobfuscate_filenames.py Executable file → Normal file
View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -344,10 +344,14 @@ class DirectUnpacker(threading.Thread):
def have_next_volume(self):
"""Check if next volume of set is available, start
from the end of the list where latest completed files are
Make sure that files are 100% written to disk by checking md5sum
Make sure that files are 100% written to disk by checking nzf.assembled
"""
for nzf_search in reversed(self.nzo.finished_files):
if nzf_search.setname == self.cur_setname and nzf_search.vol == (self.cur_volume + 1) and nzf_search.md5sum:
if (
nzf_search.setname == self.cur_setname
and nzf_search.vol == (self.cur_volume + 1)
and nzf_search.assembled
):
return nzf_search
return False
@@ -414,7 +418,6 @@ class DirectUnpacker(threading.Thread):
"%s\\" % long_path(extraction_path),
]
else:
# Don't use "-ai" (not needed for non-Windows)
# The -scf forces the output to be UTF8
command = [
sabnzbd.newsunpack.RAR_COMMAND,
@@ -423,6 +426,7 @@ class DirectUnpacker(threading.Thread):
"-idp",
"-scf",
"-o+",
"-ai",
password_command,
rarfile_path,
"%s/" % extraction_path,

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -19,10 +19,11 @@
sabnzbd.dirscanner - Scanner for Watched Folder
"""
import asyncio
import os
import time
import logging
import threading
from typing import Generator, Set, Optional, Tuple
import sabnzbd
from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES, VALID_NZB_FILES
@@ -30,6 +31,9 @@ import sabnzbd.filesystem as filesystem
import sabnzbd.config as config
import sabnzbd.cfg as cfg
DIR_SCANNER_LOCK = threading.RLock()
VALID_EXTENSIONS = set(VALID_NZB_FILES + VALID_ARCHIVES)
def compare_stat_tuple(tup1, tup2):
"""Test equality of two stat-tuples, content-related parts only"""
@@ -44,18 +48,10 @@ def compare_stat_tuple(tup1, tup2):
return True
def clean_file_list(inp_list, folder, files):
async def clean_file_list(inp_list, files):
"""Remove elements of "inp_list" not found in "files" """
for path in sorted(inp_list):
fld, name = os.path.split(path)
if fld == folder:
present = False
for name in files:
if os.path.join(folder, name) == path:
present = True
break
if not present:
del inp_list[path]
for path in set(inp_list.keys()).difference(files):
del inp_list[path]
class DirScanner(threading.Thread):
@@ -68,7 +64,15 @@ class DirScanner(threading.Thread):
def __init__(self):
super().__init__()
self.newdir()
self.loop: Optional[asyncio.AbstractEventLoop] = None
self.scanner_task: Optional[asyncio.Task] = None
self.lock = asyncio.Lock() # Prevents concurrent scans
self.error_reported = False # Prevents multiple reporting of missing watched folder
self.dirscan_dir = cfg.dirscan_dir.get_path()
self.dirscan_speed = cfg.dirscan_speed()
cfg.dirscan_dir.callback(self.newdir)
cfg.dirscan_speed.callback(self.newspeed)
try:
dirscan_dir, self.ignored, self.suspected = sabnzbd.filesystem.load_admin(SCAN_FILE_NAME)
if dirscan_dir != self.dirscan_dir:
@@ -79,34 +83,24 @@ class DirScanner(threading.Thread):
# successfully processed ones that cannot be deleted
self.suspected = {} # Will hold name/attributes of suspected candidates
self.loop_condition = threading.Condition(threading.Lock())
self.shutdown = False
self.error_reported = False # Prevents multiple reporting of missing watched folder
self.dirscan_dir = cfg.dirscan_dir.get_path()
self.dirscan_speed = cfg.dirscan_speed() or None # If set to 0, use None so the wait() is forever
self.busy = False
cfg.dirscan_dir.callback(self.newdir)
cfg.dirscan_speed.callback(self.newspeed)
def newdir(self):
"""We're notified of a dir change"""
self.ignored = {}
self.suspected = {}
self.dirscan_dir = cfg.dirscan_dir.get_path()
self.dirscan_speed = cfg.dirscan_speed()
self.start_scanner()
def newspeed(self):
"""We're notified of a scan speed change"""
# If set to 0, use None so the wait() is forever
self.dirscan_speed = cfg.dirscan_speed() or None
with self.loop_condition:
self.loop_condition.notify()
self.dirscan_speed = cfg.dirscan_speed()
self.start_scanner()
def stop(self):
"""Stop the dir scanner"""
self.shutdown = True
with self.loop_condition:
self.loop_condition.notify()
if self.loop:
asyncio.run_coroutine_threadsafe(self.shutdown(), self.loop)
def save(self):
"""Save dir scanner bookkeeping"""
@@ -115,99 +109,168 @@ class DirScanner(threading.Thread):
def run(self):
"""Start the scanner"""
logging.info("Dirscanner starting up")
self.shutdown = False
while not self.shutdown:
# Wait to be woken up or triggered
with self.loop_condition:
self.loop_condition.wait(self.dirscan_speed)
if self.dirscan_speed and not self.shutdown:
self.scan()
self.loop = asyncio.new_event_loop()
def scan(self):
"""Do one scan of the watched folder"""
try:
self.start_scanner()
self.loop.run_forever()
finally:
self.loop.close()
def run_dir(folder, catdir):
try:
files = os.listdir(folder)
except OSError:
if not self.error_reported and not catdir:
logging.error(T("Cannot read Watched Folder %s"), filesystem.clip_path(folder))
self.error_reported = True
files = []
def start_scanner(self):
"""Start the scanner if it is not already running"""
with DIR_SCANNER_LOCK:
if not self.loop:
logging.debug("Can not start scanner because loop not found")
return
for filename in files:
if self.shutdown:
break
path = os.path.join(folder, filename)
if os.path.isdir(path) or path in self.ignored or filename[0] == ".":
continue
if not self.scanner_task or self.scanner_task.done():
self.scanner_task = asyncio.run_coroutine_threadsafe(self.scanner(), self.loop)
if filesystem.get_ext(path) in VALID_NZB_FILES + VALID_ARCHIVES:
try:
stat_tuple = os.stat(path)
except OSError:
def get_suspected_files(
self, folder: str, catdir: Optional[str] = None
) -> Generator[Tuple[str, Optional[str], Optional[os.stat_result]], None, None]:
"""Generator listing possible paths to NZB files"""
if catdir is None:
cats = config.get_categories()
else:
cats = {}
try:
with os.scandir(os.path.join(folder, catdir or "")) as it:
for entry in it:
path = entry.path
if path in self.ignored:
# We still need to know that an ignored file is still present when we clean up
yield path, catdir, None
continue
else:
self.ignored[path] = 1
continue
if path in self.suspected:
if compare_stat_tuple(self.suspected[path], stat_tuple):
# Suspected file still has the same attributes
# If the entry is a catdir then recursion
if entry.is_dir():
if not catdir and entry.name.lower() in cats:
yield from self.get_suspected_files(folder, entry.name)
continue
else:
del self.suspected[path]
if stat_tuple.st_size > 0:
logging.info("Trying to import %s", path)
# Wait until the attributes are stable for 1 second, but give up after 3 sec
# This indicates that the file is fully written to disk
for n in range(3):
time.sleep(1.0)
if filesystem.get_ext(path) in VALID_EXTENSIONS:
try:
stat_tuple_tmp = os.stat(path)
# https://docs.python.org/3/library/os.html#os.DirEntry.stat
# On Windows, the st_ino, st_dev and st_nlink attributes of the stat_result are always set
# to zero. Call os.stat() to get these attributes.
if sabnzbd.WIN32:
stat_tuple = os.stat(path)
else:
stat_tuple = entry.stat()
except OSError:
continue
if compare_stat_tuple(stat_tuple, stat_tuple_tmp):
break
stat_tuple = stat_tuple_tmp
else:
# Not stable
continue
# Add the NZB's
res, _ = sabnzbd.nzbparser.add_nzbfile(path, catdir=catdir, keep=False)
if res < 0:
# Retry later, for example when we can't read the file
self.suspected[path] = stat_tuple
elif res == 0:
self.error_reported = False
else:
self.ignored[path] = 1
yield path, catdir, None
continue
if path in self.suspected:
if not compare_stat_tuple(self.suspected[path], stat_tuple):
# Suspected file attributes have changed
del self.suspected[path]
yield path, catdir, stat_tuple
except:
if not self.error_reported and not catdir:
logging.error(T("Cannot read Watched Folder %s"), filesystem.clip_path(folder))
logging.info("Traceback: ", exc_info=True)
self.error_reported = True
async def when_stable_add_nzbfile(self, path: str, catdir: Optional[str], stat_tuple: os.stat_result):
"""Try and import the NZB but wait until the attributes are stable for 1 second, but give up after 3 sec"""
logging.info("Trying to import %s", path)
# Wait until the attributes are stable for 1 second, but give up after 3 sec
# This indicates that the file is fully written to disk
for n in range(3):
await asyncio.sleep(1.0)
try:
stat_tuple_tmp = os.stat(path)
except OSError:
continue
if compare_stat_tuple(stat_tuple, stat_tuple_tmp):
break
stat_tuple = stat_tuple_tmp
else:
# Not stable
return
# Add the NZB's
res, _ = sabnzbd.nzbparser.add_nzbfile(path, catdir=catdir, keep=False)
if res < 0:
# Retry later, for example when we can't read the file
self.suspected[path] = stat_tuple
elif res == 0:
self.error_reported = False
else:
self.ignored[path] = 1
def scan(self):
"""Schedule a scan of the watched folder"""
if not self.loop:
return
if not (dirscan_dir := self.dirscan_dir):
return
asyncio.run_coroutine_threadsafe(self.scan_async(dirscan_dir), self.loop)
async def scan_async(self, dirscan_dir: str):
"""Do one scan of the watched folder"""
async with self.lock:
if sabnzbd.PAUSED_ALL:
return
files: Set[str] = set()
futures: Set[asyncio.Task] = set()
for path, catdir, stat_tuple in self.get_suspected_files(dirscan_dir):
files.add(path)
if path in self.ignored or path in self.suspected:
continue
if stat_tuple.st_size > 0:
futures.add(asyncio.create_task(self.when_stable_add_nzbfile(path, catdir, stat_tuple)))
await asyncio.sleep(0)
# Remove files from the bookkeeping that are no longer on the disk
clean_file_list(self.ignored, folder, files)
clean_file_list(self.suspected, folder, files)
# Wait for the paths found in this scan to finish
await asyncio.gather(clean_file_list(self.ignored, files), clean_file_list(self.suspected, files), *futures)
if not self.busy:
self.busy = True
dirscan_dir = self.dirscan_dir
if dirscan_dir and not sabnzbd.PAUSED_ALL:
run_dir(dirscan_dir, None)
async def scanner(self):
"""Periodically scan the directory and add NZB files to the queue"""
while True:
if not (dirscan_speed := self.dirscan_speed):
break
try:
dirscan_list = os.listdir(dirscan_dir)
except OSError:
if not self.error_reported:
logging.error(T("Cannot read Watched Folder %s"), filesystem.clip_path(dirscan_dir))
self.error_reported = True
dirscan_list = []
if not (dirscan_dir := self.dirscan_dir):
break
cats = config.get_categories()
for dd in dirscan_list:
dpath = os.path.join(dirscan_dir, dd)
if os.path.isdir(dpath) and dd.lower() in cats:
run_dir(dpath, dd.lower())
self.busy = False
await self.scan_async(dirscan_dir)
await asyncio.sleep(dirscan_speed)
async def shutdown(self):
"""Cancel all tasks and stop the loop"""
loop = asyncio.get_event_loop()
# Get all tasks except for this one
tasks = filter(lambda task: task is not asyncio.current_task(), asyncio.all_tasks())
# Cancel them all
for task in tasks:
task.cancel()
# Wait for the tasks to be done
await asyncio.gather(*tasks, return_exceptions=True)
loop.stop()

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -29,14 +29,16 @@ import random
import sys
import ssl
from typing import List, Dict, Optional, Union
from concurrent.futures import ThreadPoolExecutor
import sabnzbd
from sabnzbd.decorators import synchronized, NzbQueueLocker, DOWNLOADER_CV
from sabnzbd.newswrapper import NewsWrapper, NNTPPermanentError
import sabnzbd.config as config
import sabnzbd.cfg as cfg
from sabnzbd.misc import from_units, nntp_to_msg, get_server_addrinfo, helpful_warning, int_conv
from sabnzbd.misc import from_units, get_server_addrinfo, helpful_warning, int_conv
from sabnzbd.utils.happyeyeballs import happyeyeballs
from sabnzbd.constants import SOFT_QUEUE_LIMIT
# Timeout penalty in minutes for each cause
@@ -55,6 +57,8 @@ _SERVER_CHECK_DELAY = 0.5
_BPSMETER_UPDATE_DELAY = 0.05
# How many articles should be prefetched when checking the next articles?
_ARTICLE_PREFETCH = 20
# Minimum expected size of TCP receive buffer
_DEFAULT_CHUNK_SIZE = 32768
TIMER_LOCK = RLock()
@@ -116,7 +120,6 @@ class Server:
optional=False,
retention=0,
):
self.id: str = server_id
self.newid: Optional[str] = None
self.restart: bool = False
@@ -218,6 +221,28 @@ class Server:
self.request = True
Thread(target=self._request_info_internal).start()
def get_article(self):
"""Get article from pre-fetched and pre-fetch new ones if necessary.
Articles that are too old for this server are immediately marked as tried"""
if self.article_queue:
return self.article_queue.pop(0)
elif self.next_article_search < time.time():
# Pre-fetch new articles
self.article_queue = sabnzbd.NzbQueue.get_articles(self, sabnzbd.Downloader.servers, _ARTICLE_PREFETCH)
if self.article_queue:
article = self.article_queue.pop(0)
# Mark expired articles as tried on this server
if self.retention and article.nzf.nzo.avg_stamp < time.time() - self.retention:
sabnzbd.Downloader.decode(article)
while self.article_queue:
sabnzbd.Downloader.decode(self.article_queue.pop())
else:
return article
else:
# No available articles, skip this server for a short time
self.next_article_search = time.time() + _SERVER_CHECK_DELAY
return None
def reset_article_queue(self):
logging.debug("Resetting article queue for %s", self)
for article in self.article_queue:
@@ -250,6 +275,8 @@ class Downloader(Thread):
"bandwidth_limit",
"bandwidth_perc",
"sleep_time",
"recv_pool",
"recv_threads",
"paused_for_postproc",
"shutdown",
"server_restarts",
@@ -279,6 +306,10 @@ class Downloader(Thread):
self.sleep_time_set()
cfg.downloader_sleep_time.callback(self.sleep_time_set)
self.recv_threads: int = cfg.receive_threads()
self.recv_pool: Optional[ThreadPoolExecutor] = ThreadPoolExecutor(self.recv_threads)
logging.debug("Receive threads: %s", self.recv_threads)
self.paused_for_postproc: bool = False
self.shutdown: bool = False
@@ -503,7 +534,7 @@ class Downloader(Thread):
# Make sure server address resolution is refreshed
server.info = None
def decode(self, article, raw_data: Optional[List[bytes]] = None, data_size: Optional[int] = None):
def decode(self, article, raw_data: Optional[bytearray] = None, raw_data_size: Optional[int] = None):
"""Decode article and check the status of
the decoder and the assembler
"""
@@ -518,39 +549,45 @@ class Downloader(Thread):
return
# Send to decoder-queue
sabnzbd.Decoder.process(article, raw_data, data_size)
sabnzbd.Decoder.process(article, raw_data, raw_data_size)
# See if we need to delay because the queues are full
logged_counter = 0
decoder_full = sabnzbd.Decoder.queue_full()
assembler_full = sabnzbd.Assembler.queue_full()
while not self.shutdown and (decoder_full or assembler_full):
# Only log/update once every second, to not waste any CPU-cycles
if not logged_counter % 10:
# Make sure the BPS-meter is updated
sabnzbd.BPSMeter.update()
# Update who is delaying us
sabnzbd.BPSMeter.delayed_decoder += int(decoder_full)
sabnzbd.BPSMeter.delayed_assembler += int(assembler_full)
logging.debug(
"Delayed - %d seconds - Decoder queue: %d - Assembler queue: %d",
logged_counter / 10,
sabnzbd.Decoder.decoder_queue.qsize(),
sabnzbd.Assembler.queue.qsize(),
)
decoder_level = sabnzbd.Decoder.queue_level()
assembler_level = sabnzbd.Assembler.queue_level()
# Wait and update the queue sizes
time.sleep(0.1)
logged_counter += 1
decoder_full = sabnzbd.Decoder.queue_full()
assembler_full = sabnzbd.Assembler.queue_full()
# Sleep for an increasing amount of time, depending on queue sizes.
if decoder_level > SOFT_QUEUE_LIMIT or assembler_level > SOFT_QUEUE_LIMIT:
time.sleep((decoder_level + assembler_level - SOFT_QUEUE_LIMIT) / 2)
sabnzbd.BPSMeter.delayed_decoder += int(decoder_level > SOFT_QUEUE_LIMIT)
sabnzbd.BPSMeter.delayed_assembler += int(assembler_level > SOFT_QUEUE_LIMIT)
while not self.shutdown and (sabnzbd.Decoder.queue_level() >= 1 or sabnzbd.Assembler.queue_level() >= 1):
# Only log/update once every second, to not waste any CPU-cycles
if not logged_counter % 10:
# Make sure the BPS-meter is updated
sabnzbd.BPSMeter.update()
# Update who is delaying us
logging.debug(
"Delayed - %d seconds - Decoder queue: %d - Assembler queue: %d",
logged_counter / 10,
sabnzbd.Decoder.decoder_queue.qsize(),
sabnzbd.Assembler.queue.qsize(),
)
# Wait and update the queue sizes
time.sleep(0.1)
logged_counter += 1
def run(self):
# First check IPv6 connectivity
sabnzbd.EXTERNAL_IPV6 = sabnzbd.misc.test_ipv6()
logging.debug("External IPv6 test result: %s", sabnzbd.EXTERNAL_IPV6)
logging.debug("switchinterval = %s", sys.getswitchinterval())
# Then we check SSL certificate checking
sabnzbd.CERTIFICATE_VALIDATION = sabnzbd.misc.test_cert_checking()
logging.debug("SSL verification test: %s", sabnzbd.CERTIFICATE_VALIDATION)
@@ -564,10 +601,13 @@ class Downloader(Thread):
BPSMeter.update()
next_bpsmeter_update = 0
# can_be_slowed variables
can_be_slowed: Optional[float] = None
can_be_slowed_timer: float = 0.0
next_stable_speed_check: float = 0.0
# Sleep check variables
last_max_chunk_size: int = 0
max_chunk_size: int = _DEFAULT_CHUNK_SIZE
# Debugging code for v4 test release
sleep_count_start: float = time.time()
sleep_count: int = 0
time_slept: float = 0
# Check server expiration dates
check_server_expiration()
@@ -633,32 +673,13 @@ class Downloader(Thread):
server.request_info()
break
# Get article from pre-fetched ones or fetch new ones
if server.article_queue:
article = server.article_queue.pop(0)
else:
# Pre-fetch new articles
server.article_queue = sabnzbd.NzbQueue.get_articles(server, self.servers, _ARTICLE_PREFETCH)
if server.article_queue:
article = server.article_queue.pop(0)
# Mark expired articles as tried on this server
if server.retention and article.nzf.nzo.avg_stamp < now - server.retention:
self.decode(article)
while server.article_queue:
self.decode(server.article_queue.pop())
# Move to the next server, allowing the next server to already start
# fetching the articles that were too old for this server
break
else:
# Skip this server for a short time
server.next_article_search = now + _SERVER_CHECK_DELAY
break
nw.article = server.get_article()
if not nw.article:
break
server.idle_threads.remove(nw)
server.busy_threads.append(nw)
nw.article = article
if nw.connected:
self.__request_article(nw)
else:
@@ -695,43 +716,44 @@ class Downloader(Thread):
logging.info("Shutting down")
break
# If less data than possible was received then it should be ok to sleep a bit
if self.sleep_time:
if last_max_chunk_size > max_chunk_size:
logging.debug("New max_chunk_size %d -> %d", max_chunk_size, last_max_chunk_size)
max_chunk_size = last_max_chunk_size
elif last_max_chunk_size < max_chunk_size / 3:
time_before = time.time()
time.sleep(self.sleep_time)
now = time.time()
# Debugging code for v4 test release
if now - time_before > self.sleep_time + 0.02:
logging.debug("Slept %.5f seconds, sleep_time = %s", now - time_before, self.sleep_time)
time_slept += now - time_before
sleep_count += 1
if sleep_count_start + 20 < now:
if sleep_count > 21:
logging.debug(
"Slept %d times for an average of %.5f seconds the last %.2f seconds. sleep_time = %s",
sleep_count,
time_slept / sleep_count,
now - sleep_count_start,
self.sleep_time,
)
sleep_count_start = now
sleep_count = 0
time_slept = 0
last_max_chunk_size = 0
# Use select to find sockets ready for reading/writing
readkeys = self.read_fds.keys()
if readkeys:
read, _, _ = select.select(readkeys, (), (), 1.0)
# Add a sleep if there are too few results compared to the number of active connections
if self.sleep_time:
if can_be_slowed and len(read) < 1 + len(readkeys) / 10:
time.sleep(self.sleep_time)
# Initialize by waiting for stable speed and then enable sleep
if can_be_slowed is None or can_be_slowed_timer:
# Wait for stable speed to start testing
if not can_be_slowed_timer and now > next_stable_speed_check:
if BPSMeter.get_stable_speed(timespan=10):
can_be_slowed_timer = now + 8
can_be_slowed = 1
else:
next_stable_speed_check = now + _BPSMETER_UPDATE_DELAY
# Check 10 seconds after enabling slowdown
if can_be_slowed_timer and now > can_be_slowed_timer:
# Now let's check if it was stable in the last 10 seconds
can_be_slowed = BPSMeter.get_stable_speed(timespan=10)
can_be_slowed_timer = 0
if not can_be_slowed:
self.sleep_time = 0
logging.debug("Downloader-slowdown: %r", can_be_slowed)
else:
read = []
BPSMeter.reset()
time.sleep(1.0)
max_chunk_size = _DEFAULT_CHUNK_SIZE
with DOWNLOADER_CV:
while (
(sabnzbd.NzbQueue.is_empty() or self.no_active_jobs() or self.paused_for_postproc)
@@ -748,184 +770,196 @@ class Downloader(Thread):
if not read:
continue
for selected in read:
nw = self.read_fds[selected]
article = nw.article
server = nw.server
if self.recv_threads > 1:
for nw, bytes_received, done in self.recv_pool.map(self.__recv, read):
if bytes_received > last_max_chunk_size:
last_max_chunk_size = bytes_received
self.__handle_recv_result(nw, bytes_received, done)
if self.bandwidth_limit:
self.__check_speed()
else:
for selected in read:
nw, bytes_received, done = self.__recv(selected)
if bytes_received > last_max_chunk_size:
last_max_chunk_size = bytes_received
self.__handle_recv_result(nw, bytes_received, done)
if self.bandwidth_limit and bytes_received:
self.__check_speed()
try:
bytes_received, done, skip = nw.recv_chunk()
except:
bytes_received, done, skip = (0, False, False)
def __recv(self, selected):
nw = None
try:
nw = self.read_fds[selected]
bytes_received, done = nw.recv_chunk()
return nw, bytes_received, done
except ssl.SSLWantReadError:
return nw, 0, False
except:
return nw, 0, True
if skip:
continue
def __check_speed(self):
BPSMeter = sabnzbd.BPSMeter
if BPSMeter.bps + BPSMeter.sum_cached_amount > self.bandwidth_limit:
BPSMeter.update()
while BPSMeter.bps > self.bandwidth_limit:
time.sleep(0.01)
BPSMeter.update()
if bytes_received < 1:
self.__reset_nw(nw, "server closed connection", wait=False)
continue
def __handle_recv_result(self, nw: NewsWrapper, bytes_received: int = 0, done: bool = False):
if not bytes_received:
if done:
self.__reset_nw(nw, "server closed connection", wait=False)
return
article = nw.article
server = nw.server
sabnzbd.BPSMeter.update(server.id, bytes_received)
if nw.status_code != 222 and not done:
if not nw.connected or nw.status_code == 480:
if not self.__finish_connect_nw(nw):
return
if nw.connected:
logging.info("Connecting %s@%s finished", nw.thrdnum, nw.server.host)
self.__request_article(nw)
elif nw.status_code == 223:
done = True
logging.debug("Article <%s> is present", article.article)
elif nw.status_code == 211:
logging.debug("group command ok -> %s", nw.nntp_msg)
nw.group = nw.article.nzf.nzo.group
nw.reset_data_buffer()
self.__request_article(nw)
elif nw.status_code in (411, 423, 430):
done = True
logging.debug(
"Thread %s@%s: Article %s missing (error=%s)",
nw.thrdnum,
nw.server.host,
article.article,
nw.status_code,
)
nw.reset_data_buffer()
elif nw.status_code == 500:
if article.nzf.nzo.precheck:
# Assume "STAT" command is not supported
server.have_stat = False
logging.debug("Server %s does not support STAT", server.host)
else:
BPSMeter.update(server.id, bytes_received)
# Assume "BODY" command is not supported
server.have_body = False
logging.debug("Server %s does not support BODY", server.host)
nw.reset_data_buffer()
self.__request_article(nw)
if self.bandwidth_limit:
if BPSMeter.bps + BPSMeter.sum_cached_amount > self.bandwidth_limit:
BPSMeter.update()
while BPSMeter.bps > self.bandwidth_limit:
time.sleep(0.01)
BPSMeter.update()
if done:
# Successful data, clear "bad" counter
server.bad_cons = 0
server.errormsg = server.warning = ""
if nw.status_code != 222 and not done:
if not nw.connected or nw.status_code == 480:
try:
nw.finish_connect(nw.status_code)
if sabnzbd.LOG_ALL:
logging.debug(
"%s@%s last message -> %s", nw.thrdnum, nw.server.host, nntp_to_msg(nw.data)
)
nw.clear_data()
except NNTPPermanentError as error:
# Handle login problems
block = False
penalty = 0
display_msg = " [%s]" % error.msg
logging.debug("Server login problem: %s", error.msg)
if error.code in (502, 400, 481, 482) and clues_too_many(error.msg):
# Too many connections: remove this thread and reduce thread-setting for server
# Plan to go back to the full number after a penalty timeout
if server.active:
errormsg = T("Too many connections to server %s") % display_msg
if server.errormsg != errormsg:
server.errormsg = errormsg
logging.warning(T("Too many connections to server %s"), server.host)
# Don't count this for the tries (max_art_tries) on this server
self.__reset_nw(nw, send_quit=True)
self.plan_server(server, _PENALTY_TOOMANY)
server.threads -= 1
elif error.code in (502, 481, 482) and clues_too_many_ip(error.msg):
# Account sharing?
if server.active:
errormsg = T("Probable account sharing") + display_msg
if server.errormsg != errormsg:
server.errormsg = errormsg
name = " (%s)" % server.host
logging.warning(T("Probable account sharing") + name)
penalty = _PENALTY_SHARE
block = True
elif error.code in (452, 481, 482, 381) or (
error.code in (500, 502) and clues_login(error.msg)
):
# Cannot login, block this server
if server.active:
errormsg = T("Failed login for server %s") % display_msg
if server.errormsg != errormsg:
server.errormsg = errormsg
logging.error(T("Failed login for server %s"), server.host)
penalty = _PENALTY_PERM
block = True
elif error.code in (502, 482):
# Cannot connect (other reasons), block this server
if server.active:
errormsg = T("Cannot connect to server %s [%s]") % ("", error.msg)
if server.errormsg != errormsg:
server.errormsg = errormsg
logging.warning(T("Cannot connect to server %s [%s]"), server.host, error.msg)
if clues_pay(error.msg):
penalty = _PENALTY_PERM
else:
penalty = _PENALTY_502
block = True
elif error.code == 400:
# Temp connection problem?
if server.active:
logging.debug("Unspecified error 400 from server %s", server.host)
penalty = _PENALTY_VERYSHORT
block = True
else:
# Unknown error, just keep trying
if server.active:
errormsg = T("Cannot connect to server %s [%s]") % ("", display_msg)
if server.errormsg != errormsg:
server.errormsg = errormsg
logging.warning(T("Cannot connect to server %s [%s]"), server.host, error.msg)
penalty = _PENALTY_UNKNOWN
block = True
if block or (penalty and server.optional):
retry_article = False
if server.active:
if server.required:
sabnzbd.Scheduler.plan_required_server_resume()
retry_article = True
else:
server.deactivate()
if penalty and (block or server.optional):
self.plan_server(server, penalty)
# Note that the article is discard for this server if the server is not required
self.__reset_nw(nw, retry_article=retry_article, send_quit=True)
continue
except:
logging.error(
T("Connecting %s@%s failed, message=%s"),
nw.thrdnum,
nw.server.host,
nntp_to_msg(nw.data),
)
# No reset-warning needed, above logging is sufficient
self.__reset_nw(nw, retry_article=False)
# Update statistics and decode
article.nzf.nzo.update_download_stats(sabnzbd.BPSMeter.bps, server.id, nw.data_position)
self.decode(article, nw.get_data_buffer(), nw.data_position)
if nw.connected:
logging.info("Connecting %s@%s finished", nw.thrdnum, nw.server.host)
self.__request_article(nw)
if sabnzbd.LOG_ALL:
logging.debug("Thread %s@%s: %s done", nw.thrdnum, server.host, article.article)
elif nw.status_code == 223:
done = True
logging.debug("Article <%s> is present", article.article)
# Reset connection for new activity
nw.soft_reset()
# Request a new article immediately if possible
if nw.connected and server.active and not (self.paused or self.shutdown or self.paused_for_postproc):
nw.article = server.get_article()
if nw.article:
self.__request_article(nw)
return
server.busy_threads.remove(nw)
server.idle_threads.append(nw)
self.remove_socket(nw)
elif nw.status_code == 211:
logging.debug("group command ok -> %s", nntp_to_msg(nw.data))
nw.group = nw.article.nzf.nzo.group
nw.clear_data()
self.__request_article(nw)
def __finish_connect_nw(self, nw: NewsWrapper) -> bool:
server = nw.server
try:
nw.finish_connect(nw.status_code)
if sabnzbd.LOG_ALL:
logging.debug("%s@%s last message -> %s", nw.thrdnum, server.host, nw.nntp_msg)
nw.reset_data_buffer()
except NNTPPermanentError as error:
# Handle login problems
block = False
penalty = 0
errormsg = None
logging.debug("Server login problem: %s", error.msg)
if error.code in (502, 400, 481, 482) and clues_too_many(error.msg):
# Too many connections: remove this thread and reduce thread-setting for server
# Plan to go back to the full number after a penalty timeout
errormsg = T("Too many connections to server %s [%s]") % (server.host, error.msg)
if server.active:
# Don't count this for the tries (max_art_tries) on this server
self.__reset_nw(nw, send_quit=True)
self.plan_server(server, _PENALTY_TOOMANY)
server.threads -= 1
elif error.code in (502, 481, 482) and clues_too_many_ip(error.msg):
# Login from (too many) different IP addresses
errormsg = T(
"Login from too many different IP addresses to server %s [%s] - https://sabnzbd.org/multiple-adresses"
) % (server.host, error.msg)
penalty = _PENALTY_SHARE
block = True
elif error.code in (452, 481, 482, 381) or (error.code in (500, 502) and clues_login(error.msg)):
# Cannot login, block this server
errormsg = T("Failed login for server %s [%s]") % (server.host, error.msg)
penalty = _PENALTY_PERM
block = True
elif error.code in (502, 482):
# Cannot connect (other reasons), block this server
errormsg = T("Cannot connect to server %s [%s]") % (server.host, error.msg)
if clues_pay(error.msg):
penalty = _PENALTY_PERM
else:
penalty = _PENALTY_502
block = True
elif error.code == 400:
# Temp connection problem?
logging.debug("Unspecified error 400 from server %s", server.host)
penalty = _PENALTY_VERYSHORT
block = True
else:
# Unknown error, just keep trying
errormsg = T("Cannot connect to server %s [%s]") % (server.host, error.msg)
penalty = _PENALTY_UNKNOWN
block = True
if block or (penalty and server.optional):
retry_article = False
if server.active:
if server.required:
sabnzbd.Scheduler.plan_required_server_resume()
retry_article = True
else:
server.deactivate()
if penalty and (block or server.optional):
self.plan_server(server, penalty)
# Note that the article is discard for this server if the server is not required
self.__reset_nw(nw, retry_article=retry_article, send_quit=True)
elif nw.status_code in (411, 423, 430):
done = True
logging.debug(
"Thread %s@%s: Article %s missing (error=%s)",
nw.thrdnum,
nw.server.host,
article.article,
nw.status_code,
)
nw.clear_data()
elif nw.status_code == 500:
if article.nzf.nzo.precheck:
# Assume "STAT" command is not supported
server.have_stat = False
logging.debug("Server %s does not support STAT", server.host)
else:
# Assume "BODY" command is not supported
server.have_body = False
logging.debug("Server %s does not support BODY", server.host)
nw.clear_data()
self.__request_article(nw)
if done:
# Successful data, clear "bad" counter
server.bad_cons = 0
server.errormsg = server.warning = ""
# Update statistics and decode
article.nzf.nzo.update_download_stats(BPSMeter.bps, server.id, nw.data_size)
self.decode(article, nw.data, nw.data_size)
if sabnzbd.LOG_ALL:
logging.debug("Thread %s@%s: %s done", nw.thrdnum, server.host, article.article)
# Reset connection for new activity
nw.soft_reset()
server.busy_threads.remove(nw)
server.idle_threads.append(nw)
self.remove_socket(nw)
# Set error for server and warn user if it was first time thrown
if errormsg and server.active and server.errormsg != errormsg:
server.errormsg = errormsg
logging.warning(errormsg)
return False
except:
logging.error(
T("Connecting %s@%s failed, message=%s"),
nw.thrdnum,
nw.server.host,
nw.nntp_msg,
)
# No reset-warning needed, above logging is sufficient
self.__reset_nw(nw, retry_article=False)
return True
def __reset_nw(
self,

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2007-2022 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2007-2023 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -36,7 +36,7 @@ def utob(str_in: AnyStr) -> bytes:
def ubtou(str_in: AnyStr) -> str:
"""Shorthand for converting unicode bytes to UTF-8 string"""
if not isinstance(str_in, bytes):
if isinstance(str_in, str):
return str_in
return str_in.decode("utf-8")

View File

@@ -67,8 +67,7 @@ def is_listed_ext(ext: str, ext_list: list) -> bool:
thus return false for extensions such as 'r007' despite the substring match on 'r00').
"""
for item in ext_list:
RE_EXT = sabnzbd.misc.convert_filter(item)
if RE_EXT:
if RE_EXT := sabnzbd.misc.convert_filter(item):
try:
if len(RE_EXT.match(ext).group()) == len(ext):
return True
@@ -121,6 +120,14 @@ def is_writable(path: str) -> bool:
return True
def is_size(filepath: str, size: int) -> bool:
"""Return True if filepath exists and is specified size"""
try:
return os.path.getsize(filepath) == size
except:
return False
_DEVICES = (
"con",
"prn",
@@ -177,10 +184,13 @@ def has_win_device(filename: str) -> bool:
return False
CH_ILLEGAL = "/"
CH_LEGAL = "+"
CH_ILLEGAL_WIN = '\\/<>?*|"\t:'
CH_LEGAL_WIN = "++{}!@#'+-"
CH_ILLEGAL = "\0/"
CH_LEGAL = "_+"
CH_ILLEGAL_WIN = '\\/<>?*|":'
CH_LEGAL_WIN = "++{}!@#'-"
for i in range(1, 32):
CH_ILLEGAL_WIN += chr(i)
CH_LEGAL_WIN += "_"
def sanitize_filename(name: str) -> str:
@@ -614,8 +624,7 @@ def set_chmod(path: str, permissions: int, allow_failures: bool = False):
def set_permissions(path: str, recursive: bool = True):
"""Give folder tree and its files their proper permissions"""
if not sabnzbd.WIN32:
custom_permissions = sabnzbd.cfg.permissions()
if custom_permissions:
if custom_permissions := sabnzbd.cfg.permissions():
# If user set permissions, parse them
custom_permissions = int(custom_permissions, 8)
@@ -1212,8 +1221,7 @@ def backup_exists(filename: str) -> bool:
def backup_nzb(nzb_path: str):
"""Backup NZB file, return path to nzb if it was saved"""
nzb_backup_dir = sabnzbd.cfg.nzb_backup_dir.get_path()
if nzb_backup_dir:
if nzb_backup_dir := sabnzbd.cfg.nzb_backup_dir.get_path():
logging.debug("Saving copy of %s in %s", get_filename(nzb_path), nzb_backup_dir)
shutil.copy(nzb_path, nzb_backup_dir)

Some files were not shown because too many files have changed in this diff Show More