Compare commits

..
2374 Commits
Author SHA1 Message Date
mnightingale 112d449446 Continue with the other RSS feed URIs when one fails 2026-09-11 14:35:33 +02:00
SABnzbd Automation cfde583ccc Update translatable texts
[skip ci]
2026-09-10 10:41:17 +00:00
Safihre 846c7b79b9 Correct Remember Me tooltip text 2026-09-10 12:40:40 +02:00
Safihre b18cdc38f8 Robustly strip HTML tags to prevent XSS
Previous HTML stripping could allow malformed or unclosed tags to pass through, potentially leading to Cross-Site Scripting (XSS) vulnerabilities if completed by the browser.

This change updates the regex to aggressively remove all HTML tags, even incomplete ones. The `knockout-extensions.js` code also now universally escapes HTML, removing a potential bypass. New tests confirm this behavior.
2026-09-10 12:37:01 +02:00
Safihre 26e17a47a5 Catch unexpected errors during RAR inspection
Malformed RAR file metadata can raise exceptions other than `rarfile.Error` (e.g., `ValueError` on a bad seek). Catching these broader exceptions prevents the assembler from crashing during inspection.
2026-09-10 12:37:01 +02:00
mnightingale 4e28b082f5 Avoid rebuilding lists when sorting the queue and checking for duplicates 2026-09-10 11:47:34 +02:00
mnightingale f372698127 Write the queue admin once per batch when removing or adding many jobs 2026-09-10 11:47:34 +02:00
mnightingale 2db268e9a6 Insert queued jobs with bisect and queue each priority group in arrival order 2026-09-10 11:47:34 +02:00
mnightingale b69bd10725 Add tests covering NzbQueue add, remove, reorder, priority and sorting 2026-09-10 11:47:34 +02:00
T3553 29699890d5 fix background color for .table-server-connections thead 2026-09-09 17:52:44 +02:00
SABnzbd Automation 0561dca19a Update translatable texts
[skip ci]
2026-09-08 20:45:23 +00:00
mnightingale b6bb27bf9b Only raise the forwarded-header advice for a peer that could be a proxy of ours 2026-09-08 22:44:12 +02:00
Michael Nightingale d73cdc7397 Stop treating routable special-purpose ranges as a local network 2026-09-08 22:44:12 +02:00
Michael Nightingale c01371a6af Refuse requests whose client a forwarded header hides 2026-09-08 22:44:12 +02:00
Michael Nightingale d8188b5428 Split subnet normalization out of ip_in_subnet 2026-09-08 22:44:12 +02:00
Michael Nightingale 7d9056736f Assert what the address tests were only evaluating 2026-09-08 22:44:12 +02:00
Safihre 9c76f05b69 Defer hachoir import for media duration checks
The hachoir library is a large dependency (~5-10MB memory usage) that is exclusively used by the `get_media_duration` function. By moving its import statement inside this function, hachoir is only loaded when its functionality is actively needed, reducing the application's overall memory footprint.
2026-09-08 22:37:01 +02:00
Safihre 675d7714ca Skip symlink tests if creation is not possible
On Windows, creating symbolic links requires either an elevated shell or Developer Mode. This introduces a runtime check to verify if symlinks can be created. Tests that rely on symlink creation are now skipped if this check fails, preventing unnecessary test failures in environments without the required permissions.
2026-09-08 14:56:29 +02:00
Safihre bcd1585ea1 Set timeout for translations job
Prevents the workflow from running indefinitely.
2026-09-08 13:24:58 +02:00
Safihre 9d365facaa Import same_directory for path validation 2026-09-08 12:17:17 +02:00
Safihre 948500799a Skip filesystem link behavior tests on Windows
These tests rely on a specific behavior of '..' in paths involving symbolic links, which differs on Windows where '..' is collapsed before the filesystem resolves links.
2026-09-08 12:16:47 +02:00
mnightingale d8815ef983 Treat a dangling link as a taken name and refuse it as a write target 2026-09-08 11:19:38 +02:00
mnightingale ff537363c6 Sanitize each part before checking it for traversal or the admin folder 2026-09-08 11:19:37 +02:00
mnightingale b58a25df07 Pin the tarfile behaviour that contains members against links in the destination 2026-09-08 11:19:36 +02:00
mnightingale 1ce8faafeb Contain renames using the resolved paths so links cannot redirect them 2026-09-08 11:19:35 +02:00
mnightingale 7dbecb0a2d Skip links and other non-regular members when extracting tar files 2026-09-08 11:19:34 +02:00
Safihre 8343f182aa Pass Discord webhook secrets to release workflow 2026-09-08 11:14:07 +02:00
renovate[bot] d3f691e695 Update all dependencies (#3617)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-07 04:49:02 +00:00
Safihre d25d857fc4 Remove ISSUES.txt and refer to wiki for known issues 2026-09-04 11:47:44 +02:00
Safihre 64f342ca1d Use dedicated token for tools update workflow
Replaces `github.token` with `secrets.AUTOMATION_GITHUB_TOKEN` to provide consistent and appropriate permissions for automated tasks like creating pull requests.
2026-09-04 11:43:30 +02:00
Safihre ab3ba4a53a Add Discord integration for release notes
Posts release notes automatically to designated Discord webhooks, supporting separate channels for pre-release and stable builds.
2026-09-04 11:37:54 +02:00
github-actions[bot]andSABnzbd Automation 169a42b08c 7-Zip 26.03 (#3615)
Co-authored-by: SABnzbd Automation <bugs@sabnzbd.org>
2026-09-04 11:35:45 +02:00
Safihre 6cbe811d10 Restore checkboxes color 2026-09-04 09:03:26 +02:00
SABnzbd Automation 33ff6800d2 Update translatable texts
[skip ci]
2026-09-04 06:50:18 +00:00
mnightingale ec61683097 Downloader hot path improvements (#3604)
* Guard the speed counters with their own lock so updates are not lost

* Update the speed counters without taking the Downloader lock

* Skip the downloader sleep once the loop rather than the connection is the limit

* Remove unused variable
2026-09-04 08:49:35 +02:00
SABnzbd Automation 069f978e64 Update translatable texts
[skip ci]
2026-09-03 09:25:36 +00:00
Safihre c65ce5d5aa Add tooltip to explain search filters in queue and history
Provide users with guidance on advanced search capabilities, including filter options like `cat:`, `status:`, and `priority:`.
Closes #3558
2026-09-03 11:24:44 +02:00
mnightingale 443b34ce55 Check the speed limit on its own lock so a held back connection does not hold up the Downloader 2026-09-02 22:13:55 +02:00
mnightingale fbe07dfb7e Refresh the time after waiting so the statistics keep their interval 2026-09-02 22:11:44 +02:00
mnightingale 168622ea47 Remove the unused MultiAddQueue and use a plain queue 2026-09-02 22:10:34 +02:00
Safihre ab702860df Refactor color scheme implementation
Moves theme-specific styles into main CSS files for each interface,
leveraging `color-scheme` and `light-dark()` CSS functions. This
consolidates styling, reduces HTTP requests, and improves automatic
dark/light mode detection based on OS preferences.
2026-09-02 22:02:33 +02:00
mnightingale 4a999a1908 Fix macOS tray crashing when the notification center is unavailable 2026-09-01 20:05:34 +02:00
mnightingale 975c552a6a Safer open folder from macOS menu 2026-09-01 18:47:03 +02:00
mnightingale 20915cc626 Fix mobile dropdown menu styling 2026-08-31 17:44:22 +02:00
mnightingale 4fde6e490c Update jQuery UI to 1.14.2 2026-08-31 16:32:13 +02:00
mnightingale 58c3c13954 Update jQuery to 3.7.1 2026-08-31 16:32:13 +02:00
mnightingale 7b3d1d41ab Load one copy of jQuery, jQuery UI and Bootstrap instead of two 2026-08-31 16:32:13 +02:00
mnightingale cb1102d992 Match navbar heights between styles 2026-08-31 14:31:01 +02:00
mnightingale ecf5e27c04 Let the browser hold static files for good 2026-08-31 08:58:41 +02:00
mnightingale cd96dadcc3 Send the restart request below the configured URL base 2026-08-31 08:58:41 +02:00
mnightingale fb2660dbb9 Serve Glitter's scripts as files the browser can cache 2026-08-31 08:58:41 +02:00
renovate[bot] f9cb5b302b Update all dependencies 2026-08-31 08:56:46 +02:00
SABnzbd Automation 614b3faca6 Update translatable texts
[skip ci]
2026-08-30 18:59:36 +00:00
mnightingale e4162b093a Store the API connection info per config file so instances do not collide 2026-08-30 20:59:01 +02:00
mnightingale e1009e1e92 Install the browser and its system dependencies in one step 2026-08-30 17:01:15 +02:00
mnightingale f8781e1e35 Only resolve the hostname when the access list actually uses it 2026-08-30 17:01:15 +02:00
mnightingale be5d394ebd Tolerate the reload that deleting a server triggers 2026-08-30 17:01:15 +02:00
mnightingale 55285c5cf9 Skip the save button's artificial one second delay with Playwright's clock 2026-08-30 17:01:15 +02:00
mnightingale c3f6b2d582 Keep pytest-playwright out of the pytest session tavern nests inside a test 2026-08-30 17:01:15 +02:00
mnightingale 5088e14fa6 Drive the functional tests with Playwright instead of Selenium 2026-08-30 17:01:15 +02:00
mnightingale 139b4a52b6 Run test coroutines on a thread of their own when a loop is already running 2026-08-30 17:01:15 +02:00
mnightingale 7a852e8654 Pin h11, which uvicorn requires and selenium was supplying by accident 2026-08-30 17:01:15 +02:00
mnightingale fd9acd2ea8 Serve the urlgrabber tests from a local server instead of httpbin 2026-08-30 17:01:15 +02:00
SABnzbd Automation eb673d3956 Update translatable texts
[skip ci]
2026-08-30 08:11:49 +00:00
mnightingale f7513c05b9 Stop the nested tavern session collecting the xdist worker cache dirs (#3599) 2026-08-30 10:11:14 +02:00
Safihre e3bc15e8e6 Make Compact Great Again 2026-08-28 14:48:13 +02:00
Safihre b263c6cfe6 Replace anonymous session cookie with stable CSRF identity (#3596)
Previously, UI access for login-bypassed clients relied on issuing a stateless "anonymous session" cookie to enable CSRF protection. This commit removes that cookie mechanism.

Instead, when the login is bypassed (e.g., for local clients without credentials), the CSRF token is now bound to a stable, internal "anonymous" identity. This maintains robust CSRF protection for browser interactions without requiring an explicit session cookie, simplifying overall session management.
2026-08-28 11:19:54 +02:00
mnightingale d990a17424 Enable direct_decode by default, paced against what the disk can do (#3586)
* Watch whether the download directory keeps up with writes placed where they belong

* Default direct_decode on, refusing a sink while the destination is not keeping up

* Measure what the destination drains and report it as a rate

* Pace the downloader against the measured write rate rather than the cache level

* Handle SparseUnsupported and do not disable direct_write just because it's unsupported for a file

* Let sabctools carve the write totals into intervals instead of tracking them here

* sabctools 9.7.1
2026-08-27 16:19:43 +02:00
SABnzbd Automation 38c2a7bca7 Update translatable texts
[skip ci]
2026-08-27 12:40:32 +00:00
Safihre e2a4d9953b Improve NNTP error reporting with raw server messages
Instead of interpreting and translating common NNTP error messages (e.g., authentication failure, too many connections) into generic localized strings, this change passes the raw server response directly to the user. This provides more accurate and specific diagnostic information for troubleshooting server-related issues.
Closes #3563
2026-08-27 14:39:41 +02:00
Safihre 5696a667e7 Show in-progress status for server tests
Add an `alert-info` class to the result box while a server test is running,
providing visual feedback to the user that the process is ongoing.
2026-08-27 14:25:06 +02:00
SABnzbd Automation 0651dd7a3a Update translatable texts
[skip ci]
2026-08-27 11:05:45 +00:00
mnightingale b192a7eca4 Persistent sessions, CSRF tokens, and no apikey in the web interface (#3559)
* Add a session store that keeps web-UI logins in the admin folder

* Authenticate the web interface with session cookies and CSRF tokens

* Stop embedding the apikey in the web interface

* Cover the session, CSRF and apikey changes
2026-08-27 13:05:12 +02:00
SABnzbd Automation 75f7db398a Update translatable texts
[skip ci]
2026-08-27 09:55:59 +00:00
Safihre 90f092a1a5 Automate LinuxServer.io Docker image builds
Trigger the corresponding LinuxServer.io Docker image build (develop for
pre-releases, master for stable) after a SABnzbd release, ensuring the
Docker images are kept up-to-date.
2026-08-27 11:54:55 +02:00
mnightingale f498147189 Restrict mode-based API key logic to actual API routes
The `mode` parameter in API calls enables specific behaviors and key bypasses (e.g., 'version', 'auth', NZB-key). Previously, this logic was applied universally by `check_apikey`. This change ensures such `mode`-based logic is only honored when accessing the dedicated `/api` endpoint, preventing potential API key bypasses on other web UI routes.
2026-08-25 13:24:22 +02:00
mnightingale e36d989ee5 Sanitize PP-values 2026-08-25 13:24:13 +02:00
Safihre e0acbd75e2 Harden paths that could overwrite __ADMIN__ files
Prevent directory creation in `renamer` to overwrite `__ADMIN__`
Check the whole new path for `__ADMIN__` in `renamer`
Drop `__ADMIN__` from names that are allowed to have sub-directories
Resolve the path before checking it against `__ADMIN__`
2026-08-25 13:22:12 +02:00
Safihre 2ce13bdd9a Prevent directory traversal in Deobfuscate 2026-08-25 13:21:57 +02:00
Safihre 93546e5b7a Add SafeUnpickler to guard against pickle-attacks (#3585)
* Add SafeUnpickler to guard against pickle-attacks

* Harden pickle unpickler with explicit allowlist

The previous `SafeUnpickler` allowed any class from `sabnzbd.*` by wildcard, which could still enable deserialization attacks if a "gadget class" (e.g., with a malicious `__del__` method) was present within our own package.

This commit renames the class to `RestrictedUnpickler` and changes its logic to only allow classes explicitly defined in `_SAFE_GLOBALS`. This significantly enhances security by preventing the unpickling of any unlisted classes, including those from within `sabnzbd`. Adds `os.stat_result` and `sabnzbd.nzb.*` classes to the allowlist for compatibility.
2026-08-24 22:40:04 +02:00
mnightingale 5973e5b6ed Stop tests that create NZBs from racing (#3590) 2026-08-24 09:00:03 +02:00
SABnzbd Automation 0fe92487b6 Update translatable texts
[skip ci]
2026-08-24 05:38:32 +00:00
renovate[bot] 743ff89cff Update all dependencies (#3591)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-24 07:37:39 +02:00
SABnzbd Automation 43f22b579f Update translatable texts
[skip ci]
2026-08-21 12:48:13 +00:00
Safihre 817ea452ba Correct wording for Quota period size 2026-08-21 14:47:33 +02:00
SABnzbd Automation 8c21f47f4c Update translatable texts
[skip ci]
2026-08-21 09:08:57 +00:00
mnightingale 3813a810ed Write articles through sabctools.FileWriter, and optionally straight from the decoder (#3562)
* Use sabctools.FileWriter for article writes

* Keep the FileWriter open on the NzbFile, bounded by an LRU

* Stream decoded articles straight to their file

* Fail the article, not the connection, when a streaming write fails

* Pause on a disk error from a streamed write

A full disk cannot be fixed by fetching the article again, so mirror the assembler
and pause instead of spending its retries and failing the job as incomplete.

* Treat an exhausted quota as a full disk

* Use sabctools 9.7.0
2026-08-21 11:08:24 +02:00
github-actions[bot]andSABnzbd Automation 602464349f par2cmdline-turbo 1.5.0 (#3584)
Co-authored-by: SABnzbd Automation <bugs@sabnzbd.org>
2026-08-20 18:27:18 +02:00
Safihre bdd821233f Re-enable par2cmdline in tools-update workflow 2026-08-20 17:30:33 +02:00
mnightingale 611dfa74d2 Fix applying changes to RSS filters (#3582) 2026-08-20 09:55:26 +02:00
coopa11yandcoopa11y 21d639bf5f Announce news server test results to screen readers (#3566)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-08-19 11:31:14 +02:00
coopa11yandcoopa11y 6d897a5f23 Announce notification test results to screen readers (#3567)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-08-19 11:31:06 +02:00
mnightingale 537ac2e7a4 Tighten IPv6 and Host header handling (#3564)
* Refuse unbracketed IPv6 addresses in the Host header

* Bracket the IPv6 client address logged with warnings

* Decide the Secure cookie attribute from the request scope
2026-08-19 11:30:13 +02:00
mnightingale cb2c44cfc2 Unpack rar sets that par2 moved into a subfolder (#3553)
* Reproduce bug

* Let sanitize_filename keep par2 sub-directories

Par2 sets can store their files inside a folder, always using a forward slash as
separator no matter which platform created the set. We replaced that slash with an
underscore, so the name could never match what par2 called the file.

With allow_subdirs the separator is kept and every part is sanitized on its own.
The result stays local to the folder it is used in: empty parts, "." and ".." are
dropped, so neither a leading slash nor any amount of traversal can point outside.

* Write files into the sub-directory par2 names them in

The name from the par2 pack is what we already rename files to, but the separator
was stripped so the file landed flat with an underscore. Post-processing then had
to move it into place afterwards, which is how the volumes ended up somewhere the
unpacker did not look.

Assemble straight into the sub-directory instead. get_unique_filepath() creates the
folder and returns the name relative to the download folder, so nzf.filename now
holds that relative name. analyze_rar_filename() takes the basename, so a setname
still matches what rar_unpack() derives from a path with setname_from_path().

* Match existing files in sub-directories on retry

check_existing_files() listed the job folder without descending into it, so on a
retry the volumes par2 put in a folder of their own were never matched and got
downloaded again.

List the sub-directories too, skipping the admin folder, and match on the name
relative to the job folder. Rename bookkeeping is normalized to the platform
separator, par2 always reports a forward slash.

* Find rar sets in the job's sub-directories

* Wait for the direct unpacker to finish

* Update nzf.setname and nzf.vol after deobfuscating names

* Fix double extraction

* Ruff
2026-08-19 11:13:39 +02:00
mnightingale adde7b961c Fix rss "Clear Downloaded" did not appear to do anything (#3569) 2026-08-18 12:30:38 +02:00
mnightingale 9639d651f4 Don't let uvicorn logging pollute the log and notifications (#3579) 2026-08-18 12:26:26 +02:00
mnightingale f481496e5d Fix rss clearing at startup and downloaded items still in the feed (#3576)
* Only purge unconfigured rss feeds at startup

* Only perform remove obsolete actions if the feed was read

* Update seen_at so downloaded items are not removed while still in the feed

* Increase hardcoded retention to 7 days
2026-08-18 11:46:51 +02:00
renovate[bot]andSafihre e0bf9218bb Update all dependencies (#3575)
* Update all dependencies

* Add feedparser-sgmllib

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-08-18 10:01:04 +02:00
Safihre 19b597d21b Add static cache busting for Config Auto colorscheme 2026-08-18 08:50:08 +02:00
mnightingale 86a2025eca Use root relative URLs (#3572) 2026-08-17 21:57:20 +02:00
SABnzbd Automation 0996998ed9 Update translatable texts
[skip ci]
2026-08-17 18:58:34 +00:00
mnightingale 583617f0a9 Fix submission of server forms when priority, displayname, or notes changes (#3578) 2026-08-17 20:57:42 +02:00
mnightingale d45a1d8bf0 Fix pytest-xdist failure due to selenium driver in class global (#3573)
* Fix pytest-xdist failure due to selenium driver in class global

* ruff
2026-08-16 22:41:03 +02:00
SABnzbd Automation 2e99fd6fd0 Update translatable texts
[skip ci]
2026-08-16 13:47:18 +00:00
mnightingale cf26260910 Fix display of downloaded rss history (#3570) 2026-08-16 15:46:28 +02:00
mnightingale 59218a687d Fix race in TestAddingNZBsClean and share the NZB-adding helpers (#3571)
Jobs are listed in the history output as soon as they enter the
post-processing queue, and a stopped job has its status set to Failed at
the very start of process_job. The duplicate alternative is only released
near the end of it, so waiting for the job to show up in the history as
failed does not guarantee the alternative was already released. The gap
is tiny when running serially, but wide enough to fail the test under the
load of pytest-xdist. Wait for the label to be dropped instead.

Also move the helpers shared by both adding-NZB test classes into a base
class in testhelper, so the clean tests no longer have to import the
other test module to copy its methods.
2026-08-16 15:46:05 +02:00
Safihre 61df709a04 Add static cache busting for Auto colorscheme
Yes ugly, but it works for major updates
2026-08-12 10:55:18 +02:00
Safihre 1fcada54f9 Fetch full history for Claude AI review workflow
The Claude AI code action requires the complete Git history to properly diff pull requests against their base branches.
2026-08-11 13:31:29 +01:00
SABnzbd Automation 289b91a3de Update translatable texts
[skip ci]
2026-08-11 12:29:08 +00:00
mnightingale 35d5355f49 Replace CherryPy with Uvicorn and Starlette (#3550)
* Migrate web interface from CherryPy to Uvicorn/Starlette

Squashed rebase of feature/uvicorn (34 commits) onto develop, reconciled
with ~3 months of intervening develop changes.

Replaces the CherryPy webserver and request handling with Uvicorn/Starlette
across the API, web interface, RSS, config pages and related modules.

Reconciliation with develop during the rebase:
- api.py: kept develop's security/behaviour fixes (orphan path-traversal
  guard, expanded log redaction incl. host_whitelist and
  remote_label_replacement, get_dconfig single-return, get_retryable_jobs,
  connections default, translated NNTP test errors) on top of the Starlette
  request/response rewrite.
- interface.py: ported the RSS route handlers to develop's DB-backed
  RSSRepository API (process_feed, rss_repository / find_job_by_url /
  clear_feed / clear_downloaded / flag_downloaded).
- misc.py: kept develop's hachoir-based get_media_duration.
- requirements.txt: dropped the CherryPy stack, adopted develop's newer pins.

Also applied ruff --fix (PEP 604 unions, builtin generics) to align with
develop's lint config.

Verified: ruff check, black --check, and the affected test suites
(9413 passed, 1 skipped) all pass.

* Update starlette/uvicorn versions

* Fix race issues in global rss state

* Fix test race in server shutdown

The uvicorn migration turned /shutdown (and the shutdown API) into fire-and-forget: it spawned shutdown_program() in a background thread and replied immediately, whereas develop ran it synchronously and only replied once halt() had persisted all state. Because the module-scoped test teardown doesn't wait for the process to exit, the next module's clean_cache_dir wiped the shared cache dir (and reused the fixed port) while the previous instance was still saving state and holding the port — producing the three intermittent failures (deleted sabnzbd.log → "File log disabled or not found"; un-persisted [sorters] → KeyError; stale instance → missing wizard .quoteBlock).

* Fix robots and description, add favicon

* Remove remains of http basic auth

* Setup Starlette once configuration is available, fix static file relative cwd and url_base config

* abort_and_show_error when webserver fails to start

* Guard stopping webserver that never started

* Delegate XFF handling to ProxyHeadersMiddleware

* Merged params at request.state.params instead of modifying private apis

* Both shutdown routes share implementation and do not block event loop

* Run sync handlers via run_in_threadpool and facilitate eventual migration to async

* Pool database connections

* Online backup of database due to WAL changes

* Fix exception on None request.client (test clients or unix sockets)

* Fix flakey tests due to process not fully shutting down

* Restore X-Frame-Options behaviour via middleware

* Fix set_config_default with multiple keywords

* Remove broken logging call

* Restore api logging functionality

* Cache-Control: no-store

* Login only via POST

* Remove 401 (basic-auth) and add 404 handling via redirect

* Fix crash when shutdown not an int

* Use BaseRedirectResponse helper

* Remove trailing slashes from wizard routes

* URL helper, absolute URLs everywhere, fixes issues with nested navigation

* Fix scheduler adding multiple daysofweek

* Restore CherryPy api behaviour merging body with query params (body wins)

* Clearer documentation of get_request_params and request_params

* First stage supporting gradual api async

* Fix rss ajax consuming flash

* Restore access log functionality

* Hostname check in middleware

* Request logging in middleware

* Param parsing in middleware

* Security checks in middleware

* secured_expose is now purely route registration

* Lookup api handler once per request

* Fix flakey alert dialogs

* Trigger restart via BackgroundTask

* Restore CherryPy first param wins and get/post consistency

* Remove dead code

* Secure cookies based on protocol the client used

* Fix various issues with port_is_free

1. port_is_free answered the wrong question. It connect-probed ("is something answering?") rather than bind-probed ("can I bind?"). A port could report free and then kill startup at uvicorn's bind().
2. The bind-all remap crossed address families. :: was mapped to 127.0.0.1, probing IPv4 for an IPv6 bind — a regression against portend, which maps :: → ::1.
3. The call sites passed the wrong host. browserhost is a client-reachable address; the thing that has to be bindable is web_host.
4. Errors were swallowed. A bare except OSError hid gaierror, so an unresolvable host reported "free".
5. find_free_port had a port-0 trap. Under a bind-probe, currentport=0 always succeeds and returned 0 — the old failure sentinel. Now guarded, and None instead of 0.
6. Ports 80/443 were misdiagnosed. EACCES was folded into "occupied", producing ten futile probes and a panic claiming another program held the port. PermissionError now propagates to a dedicated panic explaining the actual remedies.
7. The tests were largely tautological. Three tests covering one branch, an IPv6 test with no IPv6 in it, a timeout test that never engaged the timeout, TOCTOU-prone fixed-range probes, no SO_REUSEADDR on the helper listener, and nothing asserting the property that matters — that "free" implies bindable.
8. A portability bug I introduced, then fixed. I'd baked Linux SO_REUSEADDR overlap semantics into four assertions; macOS differs. Now platform-aware, with the IPv6 regression re-covered by checking the socket family directly.

* Claim the bind address for uvicorn on startup, resolves "49" in err handling from cherrypy

* Rename function BaseRedirectResponse to base_redirect_response

* Restore error response on change web directory

* Add missing typings

* Fix return type of retry job for future types

* A better fix for xdist compatibility - test overwrote db_path

* Secure session cookies (rss flash)

* Inline or remove some functions

* Retry job futuretype behaviour

* Sneak a worksteal fix in

* Test and fix retry_job futuretype behaviour
2026-08-11 13:27:51 +01:00
mnightingale ec6ba3baae Speed up tests with pytest-xdist (#3546)
* Speed up tests with pytest-xdist

* Ignore request failures when the server disappeared

* Fix tests which modify module globals

* Fix lang change leaking

* Fix transaction compilation order breaking tests

* Always load a clean config and fix related tests

* No module globals

* Fix other test classes assigning module level by making calls

* Replace from sabnzbd.cfg import so monkeypatch works

* More global poisoning

* Fix dependant tests which worksteal breaks

* More global vars

* Drop loadscope until more failures are resolved

* Due to how pytest-xdist is implemented, the -s/--capture=no option does not work

* monkeypatch db_path

* Also patch startup_done

* loadscope
2026-08-10 17:44:18 +01:00
Safihre d6474cb695 Skip par2cmdline update for now due to custom macOS binaries 2026-08-10 14:11:30 +01:00
Safihre 4520de77ad Correct ssdp.py for black formatting 2026-08-10 12:44:20 +01:00
Safihre ada9d83593 Refine file extension utilities for efficiency and robustness
Adopt `frozenset` for extension collections to enable faster lookups and ensure immutability. Add explicit `utf-8` encoding to file reads to prevent locale-dependent issues when identifying text/NZB files. Optimize by caching results of `all_possible_extensions` to avoid redundant computations.
2026-08-10 12:36:16 +01:00
Safihre 58386e0b61 Refine local self-signed certificate generation
Adds `BasicConstraints` to the generated certificates for better compliance and explicitly marks them as non-CA. Changes the `SubjectAlternativeName` extension to non-critical, improving client compatibility. Improves robustness in SAN list generation and adds type hints for clarity.
2026-08-10 12:30:42 +01:00
SABnzbd Automation 4601f4b690 Update translatable texts
[skip ci]
2026-08-10 11:25:53 +00:00
coopa11yandcoopa11y fd191d1b79 Add screen reader names to Glitter and Config dialogs (#3545)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-08-10 12:25:17 +01:00
Safihre 5014673f87 Improve SSDP XML generation and refine module implementation
Escapes dynamic data in the SSDP device description XML to prevent issues with special characters and improve robustness. Enhances code clarity and maintainability through explicit constructor parameters, type hints, and updated docstrings. Also adds debug logging for SSDP broadcast failures and renames the module-level singleton for better Python convention.
2026-08-10 12:24:30 +01:00
SABnzbd Automation 14ce150b31 Update translatable texts
[skip ci]
2026-08-10 10:50:18 +00:00
coopa11yandcoopa11y 8e39722359 Improve Glitter queue and history table accessibility (#3539)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-08-10 12:49:33 +02:00
Safihre ba36e62695 Refactor Config object (#3552) 2026-08-10 09:24:53 +02:00
SABnzbd Automation 250a4dbf2a Update translatable texts
[skip ci]
2026-08-10 07:24:37 +00:00
Safihre 3867cefa0a Update version to 5.2.0-dev 2026-08-10 09:23:52 +02:00
Safihre d530764a6d Allow collaborators to trigger Claude review 2026-08-10 08:59:37 +02:00
renovate[bot] b5a7385d48 Update all dependencies (#3557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-10 06:10:25 +00:00
Safihre 40860c68ca Correct Notifications page display 2026-08-08 21:34:48 +02:00
mnightingale 3213cd74cf Rebuild macOS par2 binary (#3554) 2026-08-08 11:52:17 +02:00
Safihre b8838c4728 Improvements to Notification options display 2026-08-07 11:03:39 +02:00
Safihre 047ed77dd4 Remove stray MULTIPAR_COMMAND 2026-08-07 10:11:51 +02:00
Safihre 78cb553b14 Fix config UI selection and update direct unpack log message
Correctly pre-select the 'all' option for `history_retention_option` in the config UI by using the correct variable.
2026-08-06 16:15:09 +02:00
jcfp c5ebea7bbd use XDG_CURRENT_DESKTOP as an alternative GUI indicator (#3551) 2026-08-06 11:42:51 +02:00
Safihre 7b02c74386 Add missing guard_restart to https_chain 2026-08-06 10:43:21 +02:00
SABnzbd Automation 0c3464e6a2 Update translatable texts
[skip ci]
2026-08-05 17:15:11 +00:00
Ben Hamilton (Ben Gertzfield) d889d4fd30 Don't log warning during clean shutdown (#3548) (#3549)
`SIGTERM` is an expected part of a clean shutdown.

Previously, the signal handler posted a log warning for any signal received.

This PR turns down the log level to info for `SIGTERM` (non-Windows only).

Tested:

% python3 -m venv venv
% source venv/bin/activate
% pip install -r dependencies.txt
% python3 -OO SABnzbd.py

In another terminal, ran `kill -TERM $PID`.

Confirmed in logs that log level was now set to `INFO`:

```
2026-08-05 08:37:10,296::INFO::[__init__:217] Signal 15 caught, saving and exiting...
```

Full logs:

https://gist.github.com/bhamiltoncx/2f8845b63c52e47fc4f00de263c21152
2026-08-05 19:12:55 +02:00
Safihre 70f89e98e8 Update text files for 5.1.0RC2 2026-08-03 15:54:12 +02:00
Safihre 2cb12a07c9 Update 'Mark as Completed' link to a button 2026-08-03 14:53:42 +02:00
mnightingale 3d7f5d4289 Relax disk space requirements when not unpacking and on the same device (#3535)
* Test existing behaviour

* Relax disk space requirements when not unpacking and the same device
2026-08-03 11:44:11 +02:00
Safihre 3abf4c7bdb Update sabctools to 9.6.3 2026-08-03 11:07:34 +02:00
mnightingale 947b2b815c Fix assembler ready bytes accounting (#3538) 2026-08-03 09:01:29 +02:00
thezoggy d167fb0fe7 fix active pagination for light theme (#3541) 2026-08-03 08:52:22 +02:00
renovate[bot] b7da5b6684 Update actions/setup-python action to v7 (#3543)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-03 08:42:06 +02:00
Andre Popovitch df9c57f539 Prevent shutdown deadlock when a second signal arrives during halt (#3537) 2026-08-03 08:40:32 +02:00
renovate[bot] d5a7f8631c Update dependency jaraco.functools to v4.6.0 (#3542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-03 08:29:34 +02:00
mnightingale dcb618ce99 Improve wait for direct unpacker to finish (#3540) 2026-08-02 21:16:07 +02:00
mnightingale dc5620a52c cgroup-aware memory limits for the article cache (#3528)
* Apply memory limits from cgroups

* Apply cgroup limits to article cache

* Fix this bug

* _physical_memory return None when undetermined

* Mark platform on test group

* Remove MemoryInfo dataclass

* Cap memory with reservation

* Keep the slightly broken 32 vs 64 bit code

* 512 *MEBI because the numbers look nicer
2026-07-31 09:42:47 +03:00
mnightingale 40a3941b9e Fix os.umask race and unnecessary (#3530) 2026-07-30 11:24:06 +03:00
mnightingale eb9229d326 Prevent concurrent dirscanner scans (#3529) 2026-07-29 22:51:41 +03:00
coopa11yandcoopa11y 0411e8acc1 Label schedule time, enable, and delete controls for screen readers (#3525)
* Label schedule time, enable, and delete controls

* Use ARIA label for schedule enable control

---------

Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-28 21:12:47 +03:00
mnightingale f405b8927a Reduce BPS allocations and fix scale (#3527)
* Replace per-second bps list copy

* Consistent x-axis scale after startup

* Advance time when padding
2026-07-28 19:50:14 +03:00
mnightingale 47a507f5a6 Fix flaky test_api_queue_sort test and to_unit at boundaries (#3522)
* Fix flaky sort test by comparing at the same resolution

* Fix consistency of values printed at reduced precision

* Replace the float-string roundtrip with rounding and adjust to next unit if required

* Comment styling
2026-07-28 17:59:47 +03:00
Amajiro bdca9715b2 Add Ayatana AppIndicator tray support on GNOME (#3508)
* Add Ayatana AppIndicator tray support on GNOME

* Only load tray icon fallback backends when needed
2026-07-28 17:44:00 +03:00
SABnzbd Automation 0954ac143d Update translatable texts
[skip ci]
2026-07-28 14:43:46 +00:00
coopa11yandcoopa11y 9122633907 Label SABnzbd login fields and help link for screen readers (#3524)
* Label SABnzbd login fields and help link

* Use ARIA labels for login fields

---------

Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-28 17:42:48 +03:00
renovate[bot] 1b6aea3afb Update all dependencies (#3526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-27 08:43:03 +03:00
coopa11yandcoopa11y af10190e0b Improve Glitter status table accessibility (#3523)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-26 20:07:31 +03:00
SABnzbd Automation 1acfc5139c Update translatable texts
[skip ci]
2026-07-26 13:28:53 +00:00
Parsa YazdaniandQuixThe2nd 404060373b feat: add 'Sort by Remaining Size' queue sort option (#3512)
* feat: add 'Sort by Remaining Size' queue sort option

Add a new 'remaining_bytes' sort field that sorts the queue by absolute
remaining bytes (bytes - bytes_tried), complementing the existing
'remaining' sort which uses percentage downloaded and the 'size' sort
which uses total bytes.

Changes:
- nzbqueue.py: add remaining_bytes sort field, fix update_sort_order()
  to parse field+direction from config instead of hardcoding 'remaining'
- skintext.py: add Glitter-sortRemainingBytesAsc/Desc translation strings,
  update auto_sort explanation text
- Glitter UI: add dropdown entries and JS handlers for both directions
- Config: add auto_sort options for remaining_bytes asc/desc
- Tests: parametrize remaining_bytes asc/desc against sizeleft slot field

* style: wrap long string for Black formatting

* fix: limit remaining-size sorting to ascending

---------

Co-authored-by: QuixThe2nd <QuixThe2nd@users.noreply.github.com>
2026-07-26 16:28:08 +03:00
coopa11yandcoopa11y a84544bef8 Improve Glitter message accessibility (#3518)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-25 12:50:52 +03:00
coopa11yandcoopa11y f38b602924 Improve interface options form accessibility (#3516)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-25 11:50:58 +03:00
mnightingale db57321cb8 Fix postproc scripts on Windows (#3514)
* Verify external_processing failure on Windows

* Implement fix

* Clip complete_dir and newfiles in external_processing
2026-07-25 11:50:20 +03:00
mnightingale b825636d3f Fix crc32 may be being combined out-of-order (#3519) 2026-07-25 11:47:23 +03:00
SABnzbd Automation fa3f8735ea Update translatable texts
[skip ci]
2026-07-25 05:04:06 +00:00
mnightingale c359b21d89 Ruff styling for move None to the end of the type union (#3517) 2026-07-25 08:03:27 +03:00
coopa11yandcoopa11y 3ab1782dc2 Improve Add NZB form accessibility (#3511)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-22 22:15:35 +03:00
Safihre 91c228353b Correct Signal Wakeup FD Registration for DirScanner
When `DirScanner` is initialized on the main thread, `asyncio.new_event_loop()` can register its self-pipe as the process-wide signal wakeup FD. As the `DirScanner`'s loop runs and is closed on a separate thread, this registration would become stale, potentially breaking signal delivery during application shutdown. Explicitly unregistering the FD prevents this issue.
2026-07-21 15:39:10 +02:00
coopa11yandcoopa11y 1336d66f78 Restore keyboard access to queue actions (#3503)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-21 15:25:04 +02:00
coopa11yandcoopa11y 1f7bec651d Improve Glitter history row accessibility (#3504)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-20 10:24:13 +02:00
SABnzbd Automation 8f02e59c31 Update translatable texts
[skip ci]
2026-07-20 08:24:01 +00:00
coopa11yandcoopa11y efb16cc69b Improve Glitter search and pagination accessibility (#3505)
* Improve Glitter search and pagination accessibility

* Fixed: Preserve pagination keyboard shortcuts

---------

Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-20 10:23:24 +02:00
SABnzbd Automation f6020aa9f7 Update translatable texts
[skip ci]
2026-07-20 06:35:11 +00:00
renovate[bot] 2d2b88e771 Update all dependencies (#3509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-20 08:34:32 +02:00
SABnzbd Automation 6731da2d68 Update translatable texts
[skip ci]
2026-07-17 10:23:59 +00:00
Safihre cf8ab5a8d5 Suggest NNTP pipelining increase for high-latency connections
During NNTP server tests, detect high latency and low pipelining settings.
Provide a helpful warning to users to consider increasing their 'Articles per request'
setting to improve download speed.

Closes #3284
2026-07-17 12:23:17 +02:00
Safihre 636aa91e21 Restore queue action buttons 2026-07-17 08:58:52 +02:00
Safihre a1c9a8aab1 Update text files for 5.1.0RC1 2026-07-16 21:50:07 +02:00
Safihre 73e7dd8084 Update sabctools to 9.6.2 2026-07-16 21:48:27 +02:00
SABnzbd Automation 6eb257388b Update translatable texts
[skip ci]
2026-07-16 19:25:19 +00:00
mnightingale ba2099d006 Add RSS Age rule (#3498)
* RSS age rule

* Support years (y) and months (mo) and do not approximate durations in seconds

* Better handling of entries with no age

* Formatting

* Allow >=, =>, <=, and =< aliases

* Implement feedback

* Fix existing issue with From SxxEyy in default row

* Test unitless ages
2026-07-16 21:24:41 +02:00
Safihre 8f044bb19e Remove Frugal Usenet IPv6 hostname mappings
@sanderjo they added IPv6 to their main host and the tests caught it :)
2026-07-16 21:20:30 +02:00
Safihre 889fbf688d Correct CSS for queue rows
After #3477
2026-07-16 21:17:53 +02:00
Safihre ab879cc7d0 Add workflow for manual Claude AI code reviews
Allows maintainers to trigger an AI code review on a pull request by commenting `@claude`.
2026-07-16 21:05:55 +02:00
SABnzbd Automation 5b7a89ffb8 Update translatable texts
[skip ci]
2026-07-16 05:52:39 +00:00
coopa11yandcoopa11y 1eed5c7866 Improve Glitter queue row accessibility (#3477)
* Improve Glitter queue row action labels

* Simplify queue row accessibility labels

---------

Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-16 07:51:36 +02:00
Safihre 44777dc3cf Add Python 3.15-dev to integration testing matrix
Install libxml2 and libxslt for integration testing
2026-07-14 16:04:10 +02:00
mnightingale c91b53d290 Add SAB_FILES environment variable for postproc scripts (#3497)
* Add SAB_FILES environment variable for postproc scripts

* Test external_processing SAB_* environment variables
2026-07-14 14:34:33 +02:00
SABnzbd Automation ef2ee17c13 Update translatable texts
[skip ci]
2026-07-13 07:52:55 +00:00
mnightingale a2aec15a38 Remove unwanted extensions after unpack (#3493) 2026-07-13 09:52:20 +02:00
mnightingale 73af985e60 Optimise scanning for orphan jobs and retry all (#3492)
* Optimise scanning for orphan jobs and retry all

* Require start and limit for build_history
2026-07-13 09:26:17 +02:00
SABnzbd Automation 988955374c Update translatable texts
[skip ci]
2026-07-13 05:01:16 +00:00
renovate[bot] 28eaa6c20d Update all dependencies (#3495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-13 07:00:26 +02:00
mnightingale 5c247e008c Fix test for when rarfile flags has_header_encryption after a failed password attempt (#3491) 2026-07-10 22:02:23 +02:00
Safihre bf02e9da44 Add defusedxml to release requirements 2026-07-10 15:46:07 +02:00
Safihre fb9dbcf824 Update text files for 5.1.0Beta3 2026-07-10 15:36:19 +02:00
Safihre 6a85b2daea Update sabctools dependency to 9.6.1 2026-07-10 15:30:04 +02:00
Safihre a2ac2b0435 Refactor RAR volume information extraction and deobfuscation
Modernizes `get_rar_extension` to leverage the `rarfile` library's internal header parsing, significantly improving the robustness and reliability of RAR volume number and original extension detection.

The `rar_renamer` function in post-processing is also refactored for improved clarity and maintainability, including the extraction of a dedicated helper function for renaming and various code simplifications.
2026-07-10 11:13:41 +02:00
mnightingale 8a92f4ac71 Verify RAR5 passwords when header encryption is not used (#3490)
* Verify RAR5 passwords when header encryption is not used

* Make flow a bit closer to rarfile

* Spelling

* Add note to trusting header verification

* Spelling

* Delegate to rarfile 4.3 where possible and cache rar*_s2k

* Explicit types instead of TypeVar

* Remove duplicate test and add a header encryption with correct password

* Verify after parse

* Rename method and explicit cache size

* Remove dead code

* Clearer verify after parse

* Performance early exit

* Clarify early exit

* Update comment, usually same password and salt

* Copy parse doc
2026-07-10 11:05:59 +02:00
Safihre 2556ef10c2 Refactor Windows registry interaction
Modernizes Windows Registry interaction by leveraging `with` statements for automatic
key closure, improving resource management and preventing potential leaks.

Simplifies registry value operations (get, set, delete) and consistently defines
full key paths in `reg_info`, reducing boilerplate. Adds type hints to enhance
code readability and maintainability.
2026-07-10 11:00:56 +02:00
Safihre 661b4ae535 Use native API for FAT filesystem detection on macOS
The previous method for detecting FAT filesystems on macOS relied on parsing `df` and `mount` command output, which is brittle and prone to issues with command output variations.

This change replaces the shell command parsing with a more robust and idiomatic approach using Foundation.framework's `NSURL` API. This directly queries the volume's localized format description, ensuring accurate identification of MS-DOS (FAT12/FAT16/FAT32) volumes while correctly distinguishing them from ExFAT.

Adds unit tests for the `isFAT` function to verify basic functionality and error handling.

Closes #3483
2026-07-10 10:28:08 +02:00
Safihre 0bcb28d576 Correctly fix dots-styling in pagination 2026-07-09 12:08:09 +02:00
Safihre 02ced74783 Validate SABnzbd web UI availability in snap build workflow
The previous smoke test only verified that the snap binary could be executed. This change enhances the CI workflow to confirm the SABnzbd web UI starts successfully and responds on its default port after snap installation, improving the robustness of the build pipeline.
2026-07-09 11:08:30 +02:00
renovate[bot] 8afb8a91e2 Update all dependencies (#3487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-06 14:16:16 +02:00
Safihre dc421047d3 Render Config UI tooltips in body
Closes #3486
2026-07-04 20:32:28 +02:00
Safihre 7fd2848278 Skip DNS and public IP lookups without a selftest host
The `dnslookup` and `public_ip` functions rely on a configured `selftest_host`. This change prevents unnecessary network attempts and provides explicit debug logging when the host is not set.
Closes #3485
2026-07-04 20:27:44 +02:00
Safihre ef8df5b578 Consolidate Python versioning in build workflow
Moves the `PYTHON_VERSION` environment variable to a global scope in `build_release.yml`. This ensures consistent Python versions across build jobs (Windows and macOS) and centralizes it for easier future updates (e.g., via Renovate).
2026-07-03 14:09:41 +02:00
SABnzbd Automation 1b4525656f Update translatable texts
[skip ci]
2026-07-03 11:08:44 +00:00
coopa11yandcoopa11y fd6d8c71c7 Improve Config search accessibility (#3476)
Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-07-03 13:07:20 +02:00
SABnzbd Automation 2e202eca23 Update translatable texts
[skip ci]
2026-07-03 07:23:36 +00:00
Safihre 6b76603c60 Add workflow for automated bundled tool updates (#3482)
* Add workflow for automated bundled tool updates

Introduces a GitHub Actions workflow to automatically check for new releases of unrar, 7-Zip, and par2cmdline-turbo. When new versions are found, it creates a pull request with the updated binaries for review.

* Use preinstalled 7Zip so we don't execute any downloaded executables

Leverage the preinstalled 7-Zip utility on GitHub Actions runners to
extract Windows UnRAR.exe and 7za.exe. This prevents executing internet executables with write-permission GH-token.

* Inline the unrar version detection

And rename to RAW_VERSION
2026-07-03 09:23:04 +02:00
Safihre e929a0c6b6 Use media duration for accurate sample detection (#3475)
* Use media duration for accurate sample detection

Enhances the `is_sample()` logic to reduce false positives for files
whose names contain "sample" or "proof" but are actually full-length
content.

Integrates the `hachoir` library to parse media files and extract their
duration. Files are only considered samples if their duration is less
than or equal to `SAMPLE_MAX_DURATION` (default 2 minutes).

If media duration cannot be determined (e.g., not a media file or
parsing fails), the detection falls back to the name-based approach.

* Refactor `is_sample` function to accept single path argument
2026-07-02 14:15:10 +02:00
jcfp ee8d9bdcf9 unrar 7.23 (#3478) 2026-07-01 21:50:38 +02:00
SABnzbd Automation d9cd7a72b1 Update translatable texts
[skip ci]
2026-06-30 18:16:24 +00:00
coopa11yandcoopa11y 6112ded96b Improve Glitter header menu labels (#3471)
* Improve Glitter header menu labels

* Improve Glitter header label localization

---------

Co-authored-by: coopa11y <coopa11y@users.noreply.github.com>
2026-06-30 20:15:40 +02:00
SABnzbd Automation dbe7cb336d Update translatable texts
[skip ci]
2026-06-29 10:18:38 +00:00
Safihre 376fc8a1bf Refactor Windows system tray icon implementation
Replaces the generic `SysTrayIconThread` base class with a dedicated `sabtraywin` module.
Added several optimizations and refactoring of the original sabtray code that was very ancient.
2026-06-29 12:18:04 +02:00
mnightingale 9e09817722 Abort postproc unrar on prompt (#3463)
* Abort postproc rar unpacker if prompted for volume or to retry

* Skip empty but preserve trailing whitespace when not whole lines

* Strings and fail_msg for write error / retry

* Not necessary not pausing for volumes and will output "Cannot find volume" and be handled

* dont sleep it waits anyway
2026-06-29 10:36:46 +02:00
renovate[bot] 6db37d9883 Update all dependencies (#3474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-29 10:18:02 +02:00
Safihre 2a9e9954a8 Stop Renovate from updating cryptography
It is already pinned for macOS release and open-ended for all others (like the CI-tests).
2026-06-29 09:59:49 +02:00
Safihre e3e7fcf361 Prevent path traversal in orphaned job APIs
Adds security checks to `_api_delete_orphan` and `_api_add_orphan` endpoints
to ensure that operations are restricted strictly to the download directory.
This mitigates potential path traversal vulnerabilities, preventing
unauthorized file deletion or modification outside the intended scope.
Reported as GHSA-hxwh-mmrg-p8f5
2026-06-28 12:33:04 +02:00
thezoggy b057bc6afc pagination dot dark fix (#3472)
Fixes https://github.com/sabnzbd/sabnzbd/issues/3470
2026-06-27 23:16:52 +02:00
thezoggy 1b368a4278 26.02 - Some bugs and vulnerabilities were fixed. (#3469) 2026-06-26 18:37:46 +02:00
Safihre a55251f698 Adjust Windows artifact uploads for SignPath requirements
Unsigned Windows binaries and installers are now uploaded with `archive: true` for release tags. This creates a "zip-in-zip" layout that SignPath requires for consuming artifacts.
2026-06-26 14:46:54 +02:00
Safihre 196241d2cc Update text files for 5.1.0Beta2 2026-06-25 16:36:30 +02:00
Safihre 5b3cf86f68 Track files during cleanup to prevent removing unrelated files (#3462)
* Track files during cleanup to prevent removing unrelated files

* Remove redundant path normalization

The `os.path.abspath` function already includes path normalization,
rendering the explicit call to `os.path.normpath` redundant
when used in conjunction. Removing it simplifies the code
without changing its behavior.
2026-06-25 15:01:41 +02:00
mnightingale 6289b74470 Fix contiguous ready check article.on_disk or article.failed should skip (#3467) 2026-06-24 22:19:11 +02:00
mnightingale e9ff8a1595 Improve rarfile performance with RAR3 archives using header encryption and long passwords (#3466)
* Improve rarfile performance with RAR3 archives using header encryption and long passwords

* nzo password is optional anyway

* sabctools 9.5.0
2026-06-24 22:01:46 +02:00
SABnzbd Automation 972f4832c1 Update translatable texts
[skip ci]
2026-06-22 12:11:48 +00:00
Safihre 560e342460 Update Danish, Spanish, Hebrew, and Italian translations 2026-06-22 14:10:45 +02:00
SABnzbd Automation 7b90868007 Update translatable texts
[skip ci]
2026-06-22 08:26:21 +00:00
Safihre e21798b163 Conditionally push local translation edits to Transifex
The `translations.yml` workflow now fetches `fetch-depth: 2` and uses `git show`
to detect if the current commit includes local `.po` file changes. If local
translation edits are present, `tx push --translation` is used; otherwise,
only `--source` is pushed. This prevents accidental overwrites of Transifex
translations with outdated local files when no `.po` changes were intended.

This commit also includes updated translations in various `.po` files and adds
guidance for translators to `po_to_json.py` for consistency.
2026-06-22 10:24:51 +02:00
renovate[bot] 9b33f4ce85 Update all dependencies (#3464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-22 09:08:33 +02:00
Safihre 7daa0159ec Add Renovate manager for Transifex CLI
Configures Renovate to automatically track and update the `transifex/cli`
version specified in the `translations.yml` GitHub Actions workflow.
2026-06-19 14:33:50 +02:00
Safihre f0d3e6b8b9 Restrict stale bot to 'Support' labeled issues
Once we confirm a request or bug, the Support label is removed
2026-06-19 14:06:44 +02:00
SABnzbd Automation 82aa38c087 Update translatable texts
[skip ci]
2026-06-19 07:10:52 +00:00
mnightingale 228e7e650e Implement article-level retry (#3435)
* Implement article-level retry

* Remove count because bit_count is 3.10

* Fix errors importing files without article db

* Fix bookkeeping of bytes downloaded and on_disk status for complete existing files

* Legacy queue tests

* Bitmap types

* Add docs to Bitmap

* Match renamed files

* Add repair_job tests

* Need to remember failed state

* Only finish_import when required and defer setting on_disk state

* KISS

Closes #2735
2026-06-19 09:10:19 +02:00
Safihre 89e8788b03 Improve installer compression with solid LZMA
Configure NSIS to use solid LZMA compression, which deduplicates identical files and shrinks the overall installer size.
2026-06-16 14:47:42 +02:00
Safihre 3e1812280e Set ujson specific version pin again 2026-06-16 12:05:40 +02:00
Safihre 5d3286654e Enforce explicit dependency pinning for improved build security
All direct and transitive dependencies are now explicitly listed in
`requirements.txt` files, and `pip install` commands consistently use
`--no-dependencies`.

This approach ensures that only the specified versions are installed,
enhancing supply chain security and build reproducibility by preventing
automatic dependency resolution. The `--upgrade` flag was removed from
these installations as it is no longer necessary with fully pinned
dependencies.
2026-06-16 11:54:11 +02:00
Safihre cdb87866ae Add PO-to-JSON script for AI-assisted translations
Since all the AI tools suck at dealing with the po files directly
2026-06-16 10:54:26 +02:00
Safihre 8919aa7ec0 Remove INSTALL.txt and update documentation references
The `INSTALL.txt` file has been removed, as all installation instructions are now exclusively maintained on the project wiki. This updates `README.md` and build artifacts to reflect this change.

Additionally, `COPYRIGHT.txt` has been updated to include a new active team member, streamline translation contributor credits, and provide a direct link to GNU licenses. A minor CSS adjustment for the mobile UI is also included.
2026-06-15 14:05:47 +02:00
Safihre 4d6df7dd22 Remove no-binary workaround for charset-normalizer
The explicit `--no-binary` flag for `charset-normalizer` is no longer required in the release build workflow, simplifying dependency installation.
2026-06-15 11:34:46 +02:00
Safihre 6f342dade5 Streamline release artifact handling and enforce Windows signing
This update improves the release workflow by:
*   Configuring GitHub Actions `upload-artifact` to transfer files directly without unnecessary zipping, simplifying artifact retrieval for subsequent jobs.
*   Integrating `pefile` to perform an Authenticode signature check on the Windows installer, ensuring all official releases are properly signed.
2026-06-15 10:26:24 +02:00
Safihre 957d0fcd01 Apprise now supports paho-mqtt 2.1.0 2026-06-15 08:54:00 +02:00
renovate[bot] 662dfb7f21 Update all dependencies (#3460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-15 04:33:14 +00:00
Safihre 7c08959460 Tavern issue resolved so unpinning pytest 2026-06-14 21:37:22 +02:00
Safihre fee562d57f Increase default NNTP server connections to 16
Updates the default number of connections from 8 to 16 in the server configuration and wizard UI templates. This change aims to improve performance for users who do not explicitly configure this setting.

Additionally, ensures the API server test function defaults to at least 1 connection when none is specified.

Relates to #3284
2026-06-14 13:34:22 +02:00
Safihre 643e5182f7 Pin pytest<9.1 to work around tavern FormattedExcinfo import
pytest 9.1 removed FormattedExcinfo from _pytest._code.code, which tavern still imports unconditionally, breaking test collection on Python 3.11+.
Reported upstream: https://github.com/taverntesting/tavern/issues/1054
2026-06-14 13:11:42 +02:00
Safihre 129aae79a1 Pin cryptography version for macOS universal2 builds
Versions 49.0.0 and higher are arm64-only, which prevents universal2
wheel distribution. This ensures continued compatibility for macOS.
See https://github.com/pyca/cryptography/issues/13520
2026-06-14 12:01:25 +02:00
SABnzbd Automation ca93b63ca8 Update translatable texts
[skip ci]
2026-06-14 09:40:23 +00:00
Safihre 83ac44eabc Update text files for 5.1.0Beta1 2026-06-14 11:39:43 +02:00
SABnzbd Automation 3c922ee087 Update translatable texts
[skip ci]
2026-06-12 13:16:00 +00:00
mnightingaleandSafihre dcfe8b076f Support extracting tar files (#3456)
* Support extracting tar files

* Set fail_msg when Python is too old

* Update error to "Unpacking failed, TAR support requires Python 3.12 or later", set per set/file, and don't regard as a failure if unsupported

* Update sabnzbd/newsunpack.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* Use UNWANTED_FILE_PERMISSIONS (stat.S_ISUID and stat.S_ISGID) are already removed by tar_filter but this is cleaner

* TAR extraction test including non-executable check

* ruff

* Skip executable check on Windows

* Remove helloworld.sh

* get_unique_filename

* Test path traversal, owner/group and permissions

* Fix duplicate file issues with one_folder

* Rename filter

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-06-12 15:15:23 +02:00
Safihre f1486e2d4b Add drop down menu options to the additional queue columns
Closes #2227

Beware that this causes extra CPU usage.
Claude has diagnosed:
What it almost certainly is: paint/raster cost of native form controls. Every refresh tick the progress bar width and text change, which invalidates a paint region spanning most of the row. Chrome re-rasterizes damaged tiles wholesale, and the selects sit in those tiles. A <select> — especially one with custom styling like ours, which knocks Chrome off the native-theme fast path — is much more expensive to rasterize than plain text, and there are 4 of them per row, re-painted every second while downloading. Rasterization runs on Chrome's compositor/raster threads, which is exactly the kind of cost that shows up in the browser Task Manager but is invisible to JS-side profiling (which is why my layout measurement showed no difference). Form controls also carry extra accessibility-tree bookkeeping on each DOM-adjacent change, which adds a little more.
2026-06-12 15:11:04 +02:00
Safihre aee1cd8e41 Improve NSIS installer and uninstaller robustness
Enhance installer and uninstaller logic to ensure more reliable operation:

- Properly stop, delete, and manage the Windows service during uninstall.
- Implement more robust process termination for SABnzbd.exe.
- Add checks to prevent accidental deletion of unrelated directories.
- Dynamically calculate and display the installed size in Add/Remove Programs.
- Correctly target user-specific settings during uninstallation.
2026-06-12 12:04:53 +02:00
Safihre 1ee9f56041 Correct pt_BR language code typo 2026-06-12 11:31:55 +02:00
Safihre 777db20158 Skip special Apple files during Moving stage
See https://forums.sabnzbd.org/viewtopic.php?t=27251
2026-06-11 13:52:59 +02:00
Safihre e969276828 Extend custom toggle switch styling to login and wizard 2026-06-11 11:40:11 +02:00
Safihre e3acbdc8c2 Use commit hash for static asset cache busting
Closes #3457
2026-06-11 11:10:43 +02:00
Safihre cc5c0037a5 Minor style fixes for front-end and variable names 2026-06-11 08:54:08 +02:00
mnightingale 45aafe0774 Also purge rss history for downloaded items (#3452) 2026-06-09 20:30:18 +02:00
Safihre afae687b6a Fix macOS app restart via LaunchServices
Previously, restarting the frozen macOS application directly launched the raw binary in Terminal.app. This change uses `open -n` and the application's bundle path to ensure the app relaunches correctly as a graphical application, providing a clean environment and proper menu-bar context. Fixes #3455.
2026-06-09 16:42:19 +02:00
Safihre 740eb442a8 Add toggle switches to Interface Settings modal 2026-06-08 23:02:45 +02:00
mnightingale a141dc942b Purge rss by seen_at (#3454) 2026-06-08 20:22:38 +02:00
Safihre 83d167415a Refine toggle styling implementation for Firefox compatibility
Replaces the `::after` pseudo-element with CSS `background-image` properties to draw the toggle's movable knob and its shadow.
2026-06-08 16:58:22 +02:00
Safihre 5c4d2f1d9f Improve on toggle redesign 2026-06-08 15:38:08 +02:00
Safihre 09c338dd5b Change checkboxes in Config to toggle 2026-06-08 14:44:31 +02:00
Safihre bff7d559f9 Refine button and navigation tab interactive states 2026-06-08 09:04:29 +02:00
SABnzbd Automation 51985d3bf6 Update translatable texts
[skip ci]
2026-06-08 04:48:38 +00:00
renovate[bot] 1f3cd7adbd Update all dependencies (#3453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-08 06:48:04 +02:00
SABnzbd Automation 1f9a87e64f Update translatable texts
[skip ci]
2026-06-07 12:26:33 +00:00
Safihre 508ae12c8f Add warning for Windows connection limit
On Windows, `select()` has a hard limit of 512 connections. This change adds a check at startup to warn the user if their configured connections exceed this limit, preventing potential crashes.

Closes #3429
2026-06-07 14:25:49 +02:00
Safihre 92489bb624 Configure Renovate to track Python and sabctools versions
Adds custom managers to allow Renovate to detect and propose updates for the Python version used in the build workflow and the `SABCTOOLS_VERSION_REQUIRED` constant. Removes `sabctools` from the ignore list to enable these updates.
2026-06-07 13:03:03 +02:00
Safihre fa982d4f69 Update macOS build Python to 3.14.5 2026-06-07 12:42:59 +02:00
SABnzbd Automation 64f55c0834 Update translatable texts
[skip ci]
2026-06-07 06:43:44 +00:00
mnightingale babd8517e9 Database SQLite storage for RSS feeds (#3253)
* Store RSS in database

* Use context manager for rss repository in most instances

* Combine _evaluate_entry and _process_entry
2026-06-07 08:43:14 +02:00
Safihre 0950393b82 Correctly format tests based on new rules and remove star imports 2026-06-05 14:34:17 +02:00
Safihre 08bcddf8d2 Style login and wizard pages after recent changes 2026-06-05 14:32:04 +02:00
Safihre eae5f164e6 Correct rounding of the Warnings box 2026-06-05 10:39:07 +02:00
Safihre d5700bf8a3 Apply C4 linter rules for collection usage
Refactors collection initializations and comprehensions to use more concise and idiomatic Python syntax, such as set literals (`{...}`) instead of `set([...])`, empty dictionary literals (`{}`) instead of `dict()`, and `dict.fromkeys` for `str.maketrans`.
Also removes unnecessary list creation within `any()` calls.
2026-06-05 09:04:05 +02:00
Safihre d969d3df1a Skip File Rename When Paths Are Identical
Adds an explicit check to prevent unnecessary rename operations when the target path is the same as the original file's path. This provides clearer debug logging and avoids redundant filesystem calls.

Closes #3449, #3442
2026-06-04 13:59:40 +02:00
Safihre 5e3126cd14 Define NzoInfo with TypedDict
Explicitly defines the structure and types for the `nzo_info` dictionary.

Also introduces `BadArticleType` as a `Literal` type and cleans up
`__init__.py` by removing internal saver classes from the public API.
2026-06-04 12:48:05 +02:00
Safihre f3ef46e5c2 Add concurrency control to translations workflow
Cancel in-progress runs on the same branch to prevent redundant executions and conserve resources.
2026-06-04 11:08:31 +02:00
mnightingale ca5e02f2f1 Sanitise host_whitelist and login/request public IP addresses (#3437)
* Sanitise host_whitelist and login/request IP addresses

* Keep json keys

* Remove all IPv4 and IPv6 from logs

* Less crazy remote label replacements

* Remove unused import

* Sanitise public ipv4/ipv6 and test

* Add loopback/link-local test cases

* Switch is_local_addr to is_lan_addr because the former allows user configuration of trusted addresses

* Remove prefix group, ip regex should be good enough
2026-06-04 11:06:07 +02:00
renovate[bot] dc870495c5 Update all dependencies (#3448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 11:05:39 +02:00
VisorCraft a6491750f7 Fix false "not writable" warning from non-atomic writability self-test (#3446)
directory_is_writable_with_file() removed its fixed-name temp file in a
non-atomic exists/remove/open/remove sequence wrapped in a blanket
"except Exception: return False". If the test file was removed between the
write and the final os.remove (e.g. by a concurrent writability check), the
FileNotFoundError was swallowed and reported as "is not writable at all.
This blocks downloads." -- a false negative on a fully writable folder.

Make the result depend only on creating and writing the file; treat cleanup
as best-effort. Genuine write failures still return False, and the unicode
and special-character capability checks are unchanged.

Adds regression tests for the cleanup race and for a genuine write failure.
2026-06-04 10:50:45 +02:00
mnightingale 6dacc71cb4 Add guards to blocking connections to prevent them processing the queue (#3444) 2026-06-04 10:48:48 +02:00
thezoggy 23c00b571c unrar 7.22 (#3447) 2026-06-03 10:02:02 +02:00
SABnzbd Automation cc61dc974b Update translatable texts
[skip ci]
2026-05-26 14:54:59 +00:00
mnightingale 7f421a3c0b Add logging of unhandled connection exceptions and wait_for result (#3440) 2026-05-26 16:54:19 +02:00
Safihre 2740ad20b6 Enable lazy evaluation of type hints in decorators
Addresses a runtime error encountered when using native union syntax (PEP 604) with `threading.Lock` and `RLock` in type hints. As factory functions, they cannot be directly used with `|` without `from __future__ import annotations`.
2026-05-26 16:54:05 +02:00
Safihre 57e371aba5 Pin tempora to 5.8.1
Tempora 5.9.0 introduced an incompatibility with jaraco.classes that caused issues. Downgrade to the previous stable version and prevent Renovate from automatically updating it again.
Closes #3441
2026-05-26 16:45:58 +02:00
Safihre c1096dc0ab Update type hints to use native union syntax and TypeAlias
Migrate to `A | B` syntax for unions (PEP 604) and introduce `typing.TypeAlias` for complex types, leveraging features available in Python 3.10+. This also updates `socket.timeout` to `TimeoutError` and adds `UP045` to Ruff ignores.
2026-05-26 16:44:49 +02:00
Safihre 08bdd12298 Enable slots for dataclasses
For improved performance. New in Python 3.10
2026-05-26 15:54:36 +02:00
Safihre 7b2e139e45 Update ruff target Python version to 3.10 2026-05-26 15:54:35 +02:00
renovate[bot] 1ce1440df8 Update all dependencies (#3436)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-26 15:53:21 +02:00
cardpuncher a7c897f2ad Add French & Turkish translations to appdata.xml (#3439)
Validation still passing:
$ appstreamcli validate --pedantic org.sabnzbd.sabnzbd.appdata.xml
✔ Validation was successful.
2026-05-26 14:38:21 +02:00
Safihre a344726c68 Drop support for Python 3.9
Luckily no Ubuntu LTS versions uses it!
https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/python/
2026-05-26 14:34:19 +02:00
Safihre b0c31c7e10 Pin tempora for Python 3.9 2026-05-26 09:50:46 +02:00
mnightingale 2c530fee47 Remove disableDelays because config is not defined (#3438) 2026-05-26 06:50:24 +02:00
Ryan HollisterandClaude Sonnet 4.6 25d20f0f08 Fix RuntimeError: dictionary changed size during iteration in stop_idle_jobs (#3432)
* Fix RuntimeError from dict mutation in stop_idle_jobs (#3431)

Collecting exhausted articles into a snapshot list while holding
nzf.lock, then calling register_article outside the iteration.
This prevents RuntimeError when register_article -> nzf.remove_article
pops from nzf.articles (a dict) while stop_idle_jobs is iterating it.

The original code in fd3ece31c used `nzf.articles[:]` which was safe
when articles was a list. When 44d94226e changed articles to a dict
the protective copy was dropped, leaving bare dict iteration that
mutates mid-loop.

The collect-then-act pattern matches nzf_remove_list in nzb/object.py
and the empty-nzo list already used in stop_idle_jobs itself. It also
correctly calls register_article outside nzf.lock, consistent with its
own "not locked for performance" contract.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Apply Black formatting to nzbqueue.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Soften comment per maintainer feedback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 22:33:14 +02:00
SABnzbd Automation 3aaebed274 Update translatable texts
[skip ci]
2026-05-23 20:20:13 +00:00
Safihre f12725eea5 Adjust new rounded UI layout and spacing for consistency
Refines margins, paddings, and element positioning across various components to improve visual harmony and alignment with the modernized interface design.
2026-05-23 22:17:28 +02:00
Safihre dbf8ef15ef Refactor theming to use CSS variables
This modernizes the theming architecture by defining core colors as CSS variables,
allowing themes like 'Night' to override them concisely. This approach improves
maintainability and removes dynamic styling previously handled by JavaScript.
2026-05-23 22:05:46 +02:00
Safihre de5abc95f5 Further improvements to styling revamp 2026-05-23 22:05:45 +02:00
Safihre 04379e3faa Change main interface to more rounded version 2026-05-23 22:05:45 +02:00
mnightingale fec57377db Fix warnings when retrying jobs that have missing renamed files and fix the causes (#3428) 2026-05-23 18:59:44 +02:00
mnightingale 2f4750f77d Match previous RSS parsing behaviour (#3425)
* Match to previous RSS behaviour

* Cleanup logic due to normalisation

* Tests comparing 4.5.5 outcome

* Remove comment - fixed since 4.5.5

* Consistent types for prio, rule, season, and episode

* Rename matching_rule_index

* Fix type warnings
2026-05-22 22:34:30 +02:00
SABnzbd Automation 820442bdbd Update translatable texts
[skip ci]
2026-05-21 08:06:58 +00:00
Safihre e63648c9c4 Give the Config a little bit more modern feeling 2026-05-21 10:06:01 +02:00
Safihre a8751c5e77 Add extra logging when removing Movie category 2026-05-18 15:22:05 +02:00
renovate[bot] 196a92550c Update all dependencies (#3422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-18 09:12:28 +02:00
SABnzbd Automation 526fcd3544 Update translatable texts
[skip ci]
2026-05-18 07:08:02 +00:00
Safihre f817e4f0fb Work around pyproject.toml handling in snap build
The Python plugin attempts to `pip install -U .` when `pyproject.toml`
is present. As SABnzbd is an application source tree and not a
pip-installable package, this temporarily hides `pyproject.toml`
during the build step to prevent an incorrect installation attempt.
2026-05-18 09:07:20 +02:00
mnightingale d7ca91e395 Try to clean the cache dir multiple times (#3419) 2026-05-16 22:43:07 +02:00
SABnzbd Automation e3c8d79dae Update translatable texts
[skip ci]
2026-05-16 14:16:43 +00:00
Safihre 2cb472f690 Allow setting options for URL-grabbing jobs
And correct mistake in priority-API field, which was 0 (int) instead of "Normal" fallback.
2026-05-16 16:15:43 +02:00
Safihre caee1d3bfe Front-end would show job with invalid date as URL-fetching
Closes #3418
2026-05-16 14:49:12 +02:00
Safihre 8069361faa Replace unreliable directory access check
The `os.access()` function can produce false negatives for directory writability, particularly in environments like NFS with UID mapping or root-squashing.

This change replaces the `os.access()` call with a direct I/O test (creating and deleting a temporary file) to ensure accurate and reliable verification of directory permissions.
2026-05-15 21:41:16 +02:00
Safihre 02c567fd8c Use reduced progress bar width in compact layout
Apply the table-header-progress-smaller class (25% width) to both queue and
history when compact layout is enabled, matching the behavior when extra columns
are shown. This provides more horizontal space for longer NZB titles.

Fixes #3414
2026-05-15 21:10:16 +02:00
Safihre 60f555117c Limit GitHub Actions workflow concurrency
Configures `concurrency` for the build, snap, and integration testing workflows. This prevents multiple concurrent runs of the same workflow on the same branch and automatically cancels older, in-progress runs when a new one is triggered.
2026-05-15 16:26:27 +02:00
Safihre f259e47110 URLGrabber would crash on new installs
Closes #3417
2026-05-15 14:45:01 +02:00
mnightingale 10ffcb2c82 Check SAB_CACHE_DIR exists first and allow to already exist (#3415) 2026-05-15 14:43:29 +02:00
mnightingale 1564ee3ccf Remove unreliable test (#3416) 2026-05-15 14:42:30 +02:00
SABnzbd Automation b6b992e521 Update translatable texts
[skip ci]
2026-05-15 07:39:06 +00:00
Safihre 290f85ca1c Extend Cleanup List with filename and path pattern matching (#3413)
* Extend Cleanup List with filename and path pattern matching

Previously limited to cleaning up files based only on their extensions, the 'Cleanup List' now supports more flexible matching. Users can specify:
- Exact filenames (e.g., `Thumbs.db`)
- Wildcard filename patterns (e.g., `*.tmp`, `cleanup.*`)
- Relative path patterns (e.g., `images/*`, `*/test.jpg`)

This enhancement provides greater control and flexibility for automated post-processing cleanup.
2026-05-15 09:38:22 +02:00
Safihre 80840ce743 Modernize Python type hints and enable Pyupgrade checks
Enable Pyupgrade (`UP`) checks in Ruff, which drives the modernization of type hints.
This includes replacing `typing.Deque` with `collections.deque` and `typing.Tuple` with built-in `tuple` where applicable, improving consistency and adhering to modern Python conventions.
2026-05-13 22:09:24 +02:00
Safihre 0434dca45f Enable additional Ruff checks and implement fixes 2026-05-13 21:50:32 +02:00
Safihre 81bc2a384f Add F401 unused imports check
This change enables `F401` (unused import) checks in Ruff and configures per-file ignores for intentional top-level imports. The newly enforced check led to the removal of several unused imports across the codebase.

Additionally, the module existence check for `certifi` was modernized to use `importlib.util.find_spec` for a more efficient and robust approach.
2026-05-13 20:37:55 +02:00
mnightingale 2184964d78 Reduce time to test (#3412)
* Remove UI delays

* Everything using set_config, set_platform, or pyfakefs

* tmp_path

* Scroll to top seems unnecessary but make it wait until it's done

* Remove sleep from test_rss_basic_flow

* Remove sleeps from test_daemonizing

* Define pytest markers

* Reduce sleep in test_queue_repair

* Remove sleeps from clean_cache_dir

* Suppress failures to connect during startup

* Reduce cache sleeps

* Reduce sleeps checking app started

* Reduce sleep removing cache dir
2026-05-13 18:49:41 +02:00
Safihre b942e06297 Introduce Ruff linter for improved code quality
Integrates the Ruff linter into the CI workflow alongside Black. This enhances code quality and consistency by catching common issues. Addresses an initial `F821` (undefined name) finding in `__init__.py` identified by Ruff, ensuring explicit module referencing.
2026-05-13 14:25:06 +02:00
SABnzbd Automation 5598db0d9e Update translatable texts
[skip ci]
2026-05-13 12:00:14 +00:00
Safihre f7ad95f298 Consolidate RSS feed processing and remove 'Apply filters' action
Performance of Apply Feed is good enough that we can run it on any filter change.
2026-05-13 13:59:17 +02:00
Safihre 61e30ab419 Generalize .gitignore rules for hidden directories
Replaces numerous specific ignore entries (e.g., `.idea`, `.vscode`, `.cache`, editor backups) with a blanket rule to ignore all hidden root-level directories (`.*/`). Necessary exceptions like `.github/` and `.tx/` are explicitly un-ignored. This approach simplifies maintenance and prevents accidental commits of new tool-generated files.
2026-05-13 13:41:56 +02:00
SABnzbd Automation 90798e5e4d Update translatable texts
[skip ci]
2026-05-11 13:57:52 +00:00
Safihre 8be8af018f Refactor RSS processing for clarity and option precedence
Refactor RSS feed processing logic to enhance clarity and ensure correct precedence for resolved options. Renames functions and variables for better understanding, and inlines feed configuration logic. Adds new tests to verify how category, post-processing, script, and priority settings are applied hierarchically. Also provides a default display for empty RSS log categories.
2026-05-11 15:45:24 +02:00
Safihre 7abb39d02d Move black config to pyproject
So later we can also add ruff
2026-05-10 12:00:01 +02:00
Safihre 2668f1cd26 Refactor NzbObject admin data file path property
Renames `data_file_path()` to `admin_data_file_path` and converts it into a `@property`.
2026-05-08 09:59:08 +02:00
mnightingale 2a28a00c19 Simplify postproc queue storage and resolve serialization issues (#3406)
* Simplify postproc queue storage and resolve serialization issues

* Revert save in end_job

* Not copying anymore, lock prevents history_queue from changing and the rest just reads nzo properties

* Keep compatibility with previous version files and load from absolute paths

* Calculate path once

* Expect relative to download_dir preferred
2026-05-08 09:06:11 +02:00
mnightingale 9d7ab53685 Only acquire nzo lock when reserving filenames (#3411) 2026-05-07 08:58:34 +02:00
mnightingale 95f3b9fcc1 Save nzo after last file_done even if before next_save (#3410) 2026-05-06 19:21:04 +02:00
SABnzbd Automation ae170c6879 Update translatable texts
[skip ci]
2026-05-06 12:45:45 +00:00
Safihre 0831f0c202 Update version to 5.1.0-dev 2026-05-06 14:44:53 +02:00
mnightingale fc214a7ef9 Reserve filenames in NZO (#3407) 2026-05-06 10:35:44 +02:00
mnightingale cb0bb885c4 Fix remove_article incorrect return (#3408) 2026-05-06 10:30:51 +02:00
Safihre 053c51bb58 Fix webhost resolution for bracketed IPv6 addresses
The `socket.getaddrinfo` function cannot directly process IPv6 literal addresses like `[::]` when they include brackets. Stripping these brackets ensures that host resolution and fallback logic correctly identify and use the specified IPv6 bind addresses, preventing lookup failures.
Closes #3404
2026-05-06 09:07:48 +02:00
mnightingale c1860aa4c4 Fix stuck queue due to article fetcher not being cleared (#3400) 2026-05-06 08:51:34 +02:00
mnightingale 4d14d663b3 Cleanup file_done logic (#3405) 2026-05-05 21:56:22 +02:00
mnightingale ee3cd747b9 Use UUID4 for nzo_id and rekey existing duplicates (#3395)
* Replace duplicate nzo_ids in history database and use uuid4

* Remove SABnzbd_nzo on reuse

* Keep SABnzbd_nzo_ prefix for future jobs

* Try loading from multiple normal and future paths

* Purege NZO_FILE

* Rename NZO_FILE

* Allow failed migration to rollback
2026-05-05 10:39:49 +02:00
mordax7 5f933ddc21 Fix spurious FileExistsError logs when download directories already exist (#3397)
create_all_dirs checks if a directory exists before creating it, but
this can still fail with FileExistsError if another thread creates it
in between, or if the filesystem returns stale information. The error
gets caught by the generic OSError handler and logged as a failure,
even though the directory is actually there and everything is fine.

Handle FileExistsError separately so that existing directories are
silently accepted instead of being treated as errors.
2026-05-04 20:03:21 +02:00
Safihre 98dc183881 Add test for 3.0.0 legacy queue format restoration
Moved sys.modules call higher, so it is always applied
2026-05-04 17:04:03 +02:00
Safihre 791650960b Fix PostProcessor handling of empty queues (#3390)
* Fix PostProcessor handling of empty queues

Consolidate the logic for clearing the `work_available` signal and continuing the loop when no jobs are present. This removes a redundant initial check and centralizes the empty queue handling within the `queue.Empty` exception block, ensuring consistent behavior when no work is available.

* Fix PostProcessor's empty queue handling condition

The `handle_empty_queue` function is now only called when both the fast and slow job queues are explicitly empty. This prevents premature invocation when only one queue is exhausted, ensuring the end-of-queue state is correctly detected.
2026-05-04 14:50:58 +02:00
mnightingale e8fef31a3e Fix RSS default priority (#3399) 2026-05-03 23:09:29 +02:00
mnightingale d48a2f89c6 Fix missing nzb imports (#3394) 2026-05-03 19:44:35 +02:00
Safihre d8e572f091 Add compatibility for pre-5.0 queue files
Closes #3388
2026-05-01 22:30:38 +02:00
SABnzbd Automation 51ea306d9f Update translatable texts
[skip ci]
2026-04-30 14:12:38 +00:00
Safihre 4ded1e242e Use github-actions user for translations updates
The `translations.yml` workflow commits generated updates to the repository. This change explicitly grants `contents: write` permission, removes the custom `AUTOMATION_GITHUB_TOKEN`, and streamlines redundant `git config` setup, relying on the default `GITHUB_TOKEN` for all repository modifications.
2026-04-30 16:11:38 +02:00
Safihre 7bdfb54bee Limit GitHub Actions workflow permissions
Explicitly define the minimum required permissions for various GitHub Actions workflows. This adheres to the principle of least privilege, enhancing security by limiting the scope of access granted to the GITHUB_TOKEN.
2026-04-30 15:51:52 +02:00
Safihre 96975050b5 Increase Renovate minimum release age to 14 days
Further reduces the risk of immediately adopting new dependency versions by allowing more time for potential issues or vulnerabilities to be discovered.
2026-04-30 11:06:57 +02:00
thezoggy b84fd1526a unrar 7.21 (#3385) 2026-04-30 07:58:49 +02:00
thezoggy 0ec9194d78 7-Zip 26.01 (#3386) 2026-04-30 07:52:49 +02:00
Safihre 2cb598309d Add type field to issue templates 2026-04-29 16:25:26 +02:00
SABnzbd Automation 1d91b9acf3 Update translatable texts
[skip ci]
2026-04-29 08:14:12 +00:00
Safihre c776f086cd Secure Transifex CLI installation in workflow
To mitigate supply-chain attack risks, this changes the Transifex CLI installation method. Instead of executing a shell script from the `master` branch, a specific version (v1.6.17) is now downloaded directly as a pre-built binary from GitHub releases. This ensures a consistent, verified tool version is used in a workflow that commits directly to the repository.
2026-04-28 23:50:59 +02:00
SABnzbd Automation 8d83240b1a Update translatable texts
[skip ci]
2026-04-28 21:24:40 +00:00
Safihre f1f9be77d7 Replace git-auto-commit-action with native git commands
Remove reliance on an external GitHub Action by using standard `git` commands for committing and pushing translation updates. This aligns with the strategy of minimizing third-party dependencies in workflows.
2026-04-28 23:20:40 +02:00
Safihre e5eb66bc7b Set minimum release age to 7 days for Renovate dependency updates
Reducing the supply chain-attack risk of immediately adopting versions.
2026-04-28 23:08:10 +02:00
renovate[bot] 5ef63fd414 Update all dependencies (#3384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-27 01:01:31 +00:00
29c3513cd4 Use SNAP_NAME env var for more precise snap detection (#3382)
* Use SNAP_NAME env var for more precise snap detection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Apply linter quote style fix

Solves #3381

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: sanderjo <sander.jonkers+github@github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 19:09:09 +02:00
renovate[bot] d45295e4ee Update all dependencies (#3378)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 07:52:34 +02:00
Safihre 395f8dc4c5 Only build snaps for tags and relevant file changes 2026-04-14 18:01:18 +02:00
Safihre 375cc4955d Put releasing a new version behind manual approval 2026-04-14 09:42:13 +02:00
Safihre 6ff8aa7cef Update text files for 5.0.0RC3 2026-04-13 18:46:00 +02:00
renovate[bot] 0117941422 Update all dependencies (#3376)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 01:39:43 +00:00
Safihre 004e4e68eb Strip newlines from translated skin template strings
Ensures that translations do not break HTML or JavaScript rendering by removing newlines and carriage returns before the strings are cached and returned.

Closes #3375
2026-04-12 22:57:57 +02:00
jcfp a72bb62a9d Check nsis exists before use (#3374) 2026-04-10 12:18:45 +02:00
Safihre db17c69cd0 Update text files for 5.0.0RC2 2026-04-10 10:56:34 +02:00
Safihre c6d3b1ebf3 Tavern issue fixed 2026-04-10 10:21:34 +02:00
renovate[bot]andSafihre a0feeb66c1 Update all dependencies (#3371)
* Update all dependencies

* Restore compatibility

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-04-07 07:10:25 +00:00
SABnzbd Automation dbd71a3786 Update translatable texts
[skip ci]
2026-04-06 20:38:51 +00:00
Safihre 71b6550661 Language use in NSIS should be stable 2026-04-06 22:38:08 +02:00
SABnzbd Automation 41755e1219 Update translatable texts
[skip ci]
2026-04-06 20:28:03 +00:00
Safihre c9486e0939 Also auto-update the NSIS file translations 2026-04-06 22:27:18 +02:00
SABnzbd Automation 2d6880cff3 Update translatable texts
[skip ci]
2026-04-06 07:12:35 +00:00
Safihre 6dda8125f7 Merge make_dmg into main package.py (#3372)
* Fix icon variable assignment and adjust icon location

* Add pyobjc-framework-Quartz to requirements

* Change DMG icon path to logo-arrow.svg

Updated the icon path for the DMG build process.

* Integrate make_dmg into package.py

* Remove 'format' key from package configuration

Removed 'format' key from configuration dictionary.
2026-04-06 09:04:05 +02:00
Safihre 4ea496ea6f Check for more signs of encryption
Rarfile throws a BadRarFile that it couldn't decode due to possibly wrong password.
2026-04-03 14:56:44 +02:00
Safihre 706dddcac9 Add HTML Readme also for the macOS installer 2026-04-03 11:00:20 +02:00
Safihre b002df09f9 Convert Readme to HTML for Windows installer 2026-04-03 11:00:15 +02:00
Safihre a587212c00 Revert "No longer pin some dependencies"
This reverts commit f6b60ac140.
2026-04-03 10:13:52 +02:00
SABnzbd Automation 998766e7f8 Update translatable texts
[skip ci]
2026-04-03 07:02:49 +00:00
Safihre 128d969429 Remove notice about SABHelper from <3.0 version 2026-04-03 08:54:10 +02:00
Safihre 7b6f6801c7 Notify users that ARM64 version is available 2026-04-03 08:52:22 +02:00
SABnzbd Automation fbbe250f54 Update translatable texts
[skip ci]
2026-04-03 06:46:24 +00:00
Safihre f6b60ac140 No longer pin some dependencies 2026-04-03 08:45:28 +02:00
SABnzbd Automation 5d4d512108 Update translatable texts
[skip ci]
2026-03-31 19:45:45 +00:00
mnightingale 74541f2d51 Fix server test if connection closed (#3367) 2026-03-31 21:44:59 +02:00
Safihre c05a3ceef0 Correct SabCTools version check
It would stop working if we release version 10.X
2026-03-31 15:12:19 +02:00
Safihre f60da12ae6 Skip extract_pot tests on Python 3.9 2026-03-31 14:47:41 +02:00
SABnzbd Automation 17a4ea9e35 Update translatable texts
[skip ci]
2026-03-31 12:04:45 +00:00
Safihre 468ab93568 Update extract_pot and pygettext
Seems we accidentally forgot some translations
2026-03-31 14:02:40 +02:00
Safihre 978be46be4 Refactor .mo file generation
Updated msgfmt to latest version
2026-03-31 13:41:49 +02:00
Safihre f2ad9e6582 Tweaks to make_dmg 2026-03-30 14:24:06 +02:00
Safihre dc542e4bef Tweaks to SABnzbd.spec 2026-03-30 14:17:25 +02:00
Safihre 1bc685fee3 Small tweaks to snapcraft.yml 2026-03-30 11:04:20 +02:00
Safihre 7e9dc78429 Change text files for 5.0.0RC1 2026-03-30 10:43:05 +02:00
Safihre ce2c2f86d0 Add .claude to gitignore 2026-03-30 10:38:47 +02:00
renovate[bot]andSafihre 08443409be Update all dependencies (#3365)
* Update all dependencies

* Allow older requests for Python <3.9

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-03-30 07:53:55 +00:00
Joe Kappus f2d4347e1b builder/package.py: stop mangling test data (#3364)
Broke tests on Debian/Ubuntu, they reported it, never figured it out.

(#2274)

On Gentoo we skipped the failing test for years but 'just plain fails'
didn't sit right with me. We found the tests only fail using release
tarball, not git.

package.py script 'fixes' the line endings on .txt extensions but doesn't
account for a stillrarbutnotagoodname.txt rar binary in the test data.

This breaks tests on anyone using the release tarballs. So we skip mangling
the test data to allow for downstream CI to work.
2026-03-25 07:49:03 +01:00
Safihre cd5acde5d2 Set pipeling requests to 2 for new servers (#3362) 2026-03-23 22:51:02 +01:00
Safihre 1c6e5e0deb Generalize (most) filenames to NFC form
Closes #2858, #1633
But might not be enough. We will see.
2026-03-23 22:50:40 +01:00
mnightingale 903582fb36 Fix checking for unwanted files in rars once password is known (#3360) 2026-03-23 20:27:00 +01:00
Safihre 9b2c9621a9 Generalize diskspace check arguments 2026-03-23 11:41:30 +01:00
Safihre a1eb3284f2 Set Download Folder minimum space to 500M by default
See #3346
2026-03-23 09:09:07 +01:00
Safihre a4b04ae224 Perform Complete diskspace check at 90% instead of 95% 2026-03-23 09:02:20 +01:00
mnightingale baa52e4acf Perform diskspace check on complete directory for nzo (#3346)
* Perform diskspace check on complete directory for nzo

* Always check complete_dir even if complete_free is 0

* Slots require 3.10

* Fix direct unpack calculation

* Schedule resume against download_dir, complete_dir, or an arbitrary path

* Document params

* Replace Diskspace with returning a tuple

* Fix the broken things

* Add diskspace tests
2026-03-23 09:01:24 +01:00
renovate[bot] 5bfa4c8bac Update all dependencies (#3359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 00:37:22 +00:00
Safihre 14e00b366e Update text files for 5.0.0Beta4 2026-03-20 23:30:05 +01:00
mnightingale 449157e0fb Set filename_checked after the check to prevent race (#3357) 2026-03-19 22:06:15 +01:00
SABnzbd Automation 89b3b97093 Update translatable texts
[skip ci]
2026-03-19 14:50:51 +00:00
mnightingale 40e4012e41 Upgrade sabctools to 9.4.0 (#3356) 2026-03-19 15:50:07 +01:00
mnightingale 2c91e61d8e Fix premature end_job when registering article promotes a par2 (#3354) 2026-03-16 15:07:16 +01:00
renovate[bot]andSafihre 934d81de91 Update all dependencies (#3353)
* Update all dependencies

* Unlock ujson dep for older Python

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-03-16 09:24:21 +01:00
SABnzbd Automation 48eefbda37 Update translatable texts
[skip ci]
2026-03-16 08:15:41 +00:00
mnightingale ddb7c1fe9b Fix likely cause of stuck jobs (#3351) 2026-03-16 09:12:56 +01:00
Safihre 1833173bac Remove DIR_LOCK and only use UNIQUE_PATH_LOCK where needed
Closes #3342
2026-03-13 12:27:09 +01:00
Safihre 6cc19033f8 Use Snap beta channel for non-stable releases 2026-03-13 11:48:43 +01:00
Safihre 69208db699 Also push stable Snap releases to candidate 2026-03-13 11:34:32 +01:00
Safihre c43b11bd7c Only push to stable Snap channel for stable releases 2026-03-13 11:25:41 +01:00
Safihre 7daade5ec6 Update text files for 5.0.0Beta3 2026-03-13 11:18:20 +01:00
SABnzbd Automation f5aa4d9e85 Update translatable texts
[skip ci]
2026-03-13 10:07:14 +00:00
Safihre 08d02fb2b6 Remove empty_postproc
#3336
2026-03-13 11:06:18 +01:00
mnightingale 594e303265 Check next_request before changing the value (#3345)
* Check next_request before changing value

* Make other discarding the same pattern
2026-03-13 10:17:28 +01:00
mnightingale 73eba2f6a3 Remove continue inside finally clause (#3348) 2026-03-13 09:33:46 +01:00
mnightingale 82dca07ee1 Fix history api race causing stale data (#3350) 2026-03-13 09:33:25 +01:00
mnightingale 40e97400a6 Fix race when direct unpacker is killed (#3349) 2026-03-12 22:34:18 +01:00
mnightingale d80d4f57b5 Execute file_done actions even if assemble failed (#3344)
* Execute file_done actions even if assemble failed

* Fix for tests since they call Assembler.assemble directly

* Attempt final steps even if assemble raises a non-IOError exception
2026-03-12 10:54:20 +01:00
mnightingale 562f308844 Abort DirectUnpack on retryable errors (#3343)
* Abort DirectUnpack on retryable errors

* Fix direct unpacker race conditions
2026-03-12 10:50:16 +01:00
mnightingale a5a182468d Ignore missing data and consume OSError (#3339)
* Ignore missing data and consume IOError on ENOSPC

* Revert data variable for future changes

* Merge the exceptions

* Adjust comment
2026-03-10 14:53:06 +01:00
Safihre 01f8b9b11b Remove several unused imports 2026-03-10 14:52:28 +01:00
Safihre 47db831b17 Correct availability check for case of all missing par2 2026-03-09 16:27:22 +01:00
Safihre 9113ca4aeb Ignore mypy version of charset-normalizer 2026-03-09 14:23:20 +01:00
Safihre 9c2cd68a1f Replace chardet by charset_normalizer
It's already a requirement and latest chardet broke our tests and we barely use it anyway.
2026-03-09 12:59:48 +01:00
mnightingale 81e78814c8 Fix deadlock from downloader receive thread (#3341) 2026-03-09 11:44:26 +01:00
renovate[bot]andSafihre eab219f88a Update all dependencies (#3340)
* Update all dependencies

* Require manual compile for universal2 chardet

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-03-09 08:16:32 +00:00
SABnzbd Automation 7c4b095dce Update translatable texts
[skip ci]
2026-03-05 19:52:45 +00:00
mnightingale 34e018ffc9 Limit rar passwords to 127 characters (#3338) 2026-03-05 20:52:01 +01:00
Safihre 00300eef05 Always run post-processing script, even for failed jobs
#3336
2026-03-03 16:29:59 +01:00
SABnzbd Automation 46d057c40e Update translatable texts
[skip ci]
2026-03-03 14:59:41 +00:00
Safihre bf09f916d4 nntp authinfo not sanitised in exported logfile
Closes #3335
2026-03-03 15:58:41 +01:00
SABnzbd Automation fbd4a75ee7 Update translatable texts
[skip ci]
2026-03-02 19:42:44 +00:00
mnightingale 0007f61d68 Improve direct write helpful warning message and add link to the wiki (#3334) 2026-03-02 20:41:56 +01:00
SABnzbd Automation 909d951f3d Update translatable texts
[skip ci]
2026-03-01 10:03:13 +00:00
renovate[bot]andSafihre 24c4365d4a Update all dependencies (#3333)
* Update all dependencies

* Fixes for older python

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-03-01 10:02:31 +00:00
Safihre 07c5c40d58 Update text files for 5.0.0Beta2 2026-02-27 14:16:03 +01:00
Safihre ba7446daac Prevent logging sensitive information in the URLs called by Apprise
Closes #3328
2026-02-27 14:10:56 +01:00
mnightingale e8791f9c7b Leave the log header unsanitized (#3324) 2026-02-23 10:01:02 +01:00
SABnzbd Automation aa64cd8e0a Update translatable texts
[skip ci]
2026-02-23 09:00:50 +00:00
mnightingale ea84aefaf4 Fix queuing requests on reset connections (#3332) 2026-02-23 09:59:49 +01:00
mnightingale 9b1b503ce6 Allow direct write usage without the cache (#3326) 2026-02-20 09:06:30 +00:00
mnightingale bc4c4bbcfa Fix adding articles to cache for finished jobs (#3325) 2026-02-19 22:16:08 +00:00
mnightingale 33072154d2 Reduce assembler trigger (#3322)
* Tweak assembler trigger

* Inline assembler_trigger calculation
2026-02-17 15:04:09 +00:00
SABnzbd Automation f9c5b8fc41 Update translatable texts
[skip ci]
2026-02-17 15:03:25 +00:00
mnightingale 4f3ee059f9 Increase test file size for sparse support detection (#3319)
* Increase test file size for sparse support detection

* Document why testing with a 1 MiB file
2026-02-17 15:02:44 +00:00
mnightingale d7b7377b42 Upgrade sabctools to 9.3.2 (#3323) 2026-02-16 21:24:02 +00:00
thezoggy 787c51fa8e 7zip 26.0 + par2cmdline-turbo 1.4.0 (#3321) 2026-02-16 09:25:29 +00:00
SABnzbd Automation 8bc81bc4ce Update translatable texts
[skip ci]
2026-02-16 02:23:59 +00:00
renovate[bot] 4a8f7ef98c Update all dependencies (#3320)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-16 02:23:20 +00:00
mnightingale aa87657552 Prevent enqueuing requests while force_disconnect is set (#3318) 2026-02-12 08:48:51 +01:00
Safihre 4917885ea1 Simplify black formatting validation step 2026-02-10 13:22:45 +01:00
mnightingale 8c7a70b6c4 Add socket for read/write if next request or partial write (#3313)
* Add for read/write if next request or partial write

* Refactor to also call on partial write but no full response path and add comments
2026-02-10 10:18:10 +01:00
mnightingale 7f8d7d80d2 Make conditional_cache exception safe and exclude force from the key (#3317) 2026-02-09 21:27:15 +01:00
SABnzbd Automation 40ea82a8bb Update translatable texts
[skip ci]
2026-02-09 15:45:29 +00:00
Safihre 2122503762 Update copyright to 2026 2026-02-09 16:44:38 +01:00
mnightingale 507edc3ddf Revert allow_new_fetcher for stuck jobs (#3314) 2026-02-09 09:07:14 +01:00
renovate[bot] 920e23e11e Update dependency setuptools to v82 (#3315)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-09 02:20:51 +00:00
SABnzbd Automation e898f92f49 Update translatable texts
[skip ci]
2026-02-08 15:26:45 +00:00
mnightingale 9a37306ce5 Only increment next index if expected (#3312) 2026-02-08 16:26:03 +01:00
mnightingale 47e71912d5 Ignore all OSError from FakeNNTPServer (#3309) 2026-02-06 18:18:18 +01:00
mnightingale b90be6e35a Allow new fetcher for stuck articles (#3308) 2026-02-06 18:17:32 +01:00
mnightingale 4e7a70c5e7 Fix server retention not always applied (#3304)
* Fix server retention not always applied

* Comment why safe to discard remaining queue and not check retention for each
2026-02-06 13:04:16 +01:00
Safihre 9fc2215fc8 Skip orjson on Python 3.9 2026-02-06 12:01:31 +01:00
Safihre cba63c0c3e No longer specify cryptography version
To support win_arm64 again
See https://github.com/pyca/cryptography/pull/14216
2026-02-06 12:01:30 +01:00
renovate[bot] 2b62846122 Update all dependencies 2026-02-05 19:13:22 +00:00
thezoggy cb5030d152 bump mac to build with python 3.14.3 (#3307) 2026-02-05 20:12:49 +01:00
thezoggy 499e9639e9 unrar 7.20 (#3306) 2026-02-05 20:12:23 +01:00
Safihre e1ea4f1e7e Update text files for 5.0.0Beta1 2026-02-02 15:26:00 +01:00
mnightingale e40098d0e7 Remove sleep when cache is full (#3300)
* Remove cache full sleep

* Remove override_trigger
2026-02-02 10:27:48 +01:00
SABnzbd Automation 5025f9ec5d Update translatable texts
[skip ci]
2026-02-02 08:15:36 +00:00
mnightingale 26a485374c Only wake servers while requests are available (#3299) 2026-02-02 09:14:54 +01:00
mnightingale 5b3a8fcd3f Fix nzb deadlocks (#3298)
* Fix nzb deadlocks

* Keep the lock behaviour unchanged but ensure correct order
2026-01-30 17:23:57 +01:00
mnightingale 44447ab416 Add more logging to stop_idle_jobs (#3294)
* Add more logging to stop_idle_jobs

* Would log too much

* Reduce logging a little

* Tweak message

* Spelling

* Log first articles
2026-01-30 15:24:52 +01:00
mnightingale 040573c75c Fix deadlock in hard_reset/remove_socket (#3297) 2026-01-29 18:14:22 +01:00
mnightingale 16a6936053 Bind socket throughout test but don't listen and configure a timeout (#3296) 2026-01-29 12:07:27 +01:00
mnightingale e2921e7b9c Add guards to process_nw_read (#3295) 2026-01-29 08:10:12 +01:00
mnightingale e1cd1eed83 Remove unused logging arguments (#3293) 2026-01-27 20:35:23 +01:00
SABnzbd Automation a4de704967 Update translatable texts
[skip ci]
2026-01-26 18:07:10 +00:00
mnightingale d9f9aa5bea Fix adding sockets mid-connect (#3291)
* Do not add sockets that are not already connected

* Don't preemptively mark thread busy

* Clear nntp instance on failed connect

* Just use reset_nw like everywhere else

* Track when the socket is connected and idle connections can handle requested when connected (completed auth) or socket_connected

* Add tests for connection state handling

* Windows is really slow at this

* Rename connected to ready and socket_connected to connected
2026-01-26 19:06:22 +01:00
renovate[bot]andSafihre f4b73cf9ec Update all dependencies (#3292)
* Update all dependencies

* pycparser dropped support for Python 3.9

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-01-26 11:09:39 +01:00
SABnzbd Automation ddc84542eb Update translatable texts
[skip ci]
2026-01-26 09:50:06 +00:00
Safihre 9624a285f1 Add Apprise documentation URL to Notifications page 2026-01-26 10:45:11 +01:00
Safihre 43a9678f07 Do not show tracebacks externally
Releastes to #3286
2026-01-23 13:36:46 +01:00
mnightingale 4ee41e331c Handle SSLWantWriteError exceptions and buffer writes (#3289)
* Handle SSLWantWriteError

* Add buffer for non-blocking writes
2026-01-23 09:21:32 +01:00
mnightingale 062dc9fa11 Fix assembler waiting for failed article (#3290) 2026-01-23 07:12:16 +01:00
SABnzbd Automation d215d4b0d7 Update translatable texts
[skip ci]
2026-01-21 20:44:06 +00:00
Safihre 04711886d9 Bump next release from 4.6 to 5.0 due to major changes
No release yet, just text bumps
2026-01-21 21:42:59 +01:00
mnightingale a19b3750e3 Handle non-fatal errors during read (#3280)
* Handle non-fatal errors during read

* sabctools 9.3.1
2026-01-21 21:18:58 +01:00
mnightingale eff5f663ab Add database indexes (#3283)
* Add database indexes

* Remove completed bytes index

* Allow duplicate query to short circuit

* Remove duplicate indexes

* Remove most of the query changes
2026-01-20 11:52:49 +01:00
mnightingale 46c98acff3 Fix inconsistent NzbFile sorting (#3276)
* Fix inconsistent NzbFile sorting

* Add more groups and tiers

* Black formatting
2026-01-20 11:06:02 +01:00
renovate[bot] df5fad29bc Update all dependencies (#3285)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 13:04:31 +01:00
SABnzbd Automation 27d222943c Update translatable texts
[skip ci]
2026-01-19 11:43:49 +00:00
Safihre 3384beed24 Make black 26.1.0 happy again - almost 2026-01-19 12:42:51 +01:00
mnightingale bf41237135 Trigger assemble when next is available and it has been 5 seconds (#3281) 2026-01-17 09:53:06 +01:00
mnightingale 3d4fabfbdf Log socket exception type on write error (#3279) 2026-01-16 22:08:16 +01:00
mnightingale cf14e24036 Revert pipelining stat/head check (#3278) 2026-01-15 21:12:20 +01:00
Safihre d0c2b74181 Add current version/environment metadata to _api_showlog
Closes #3277
2026-01-15 10:02:34 +01:00
mnightingale d21a111993 Fix pipelining connection read/write logic errors (#3272)
* Fix commands which fail to be sent are lost

* Force macOS to use the select implementation

* Do not recreate lock when reinitialised

* Suppress errors when closing socket to ensure socket is closed

* Make connection errors on read or write both only wait 5 seconds before reconnecting

* Fix selector selection

* Only check generation under lock

* Use PollSelector
2026-01-12 15:19:07 +01:00
mnightingale 3e7dcce365 Fix queue cannot be loaded (#3271)
* Fix queue cannot be restored

* Also change init

* Add a test

Fixes #3269
2026-01-12 09:54:59 +01:00
renovate[bot] 5594d4d6eb Update dependency urllib3 to v2.6.3 (#3274)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-12 01:34:09 +00:00
SABnzbd Automation 605a1b30be Update translatable texts
[skip ci]
2026-01-11 21:42:10 +00:00
mnightingale a2cb861640 Fix bug when bandwidth limit is removed (#3273) 2026-01-11 22:41:27 +01:00
mnightingale df1c0915d0 Recreate frènch_german_demö test data (#3268) 2026-01-09 10:59:51 +01:00
mnightingale 4d73c3e9c0 Adjust monitored socket events as required to prevent hot looping (#3267)
* Adjust monitored socket events as required to prevent hot looping

* Prevent write hot looping

* Guard against pending recursive call

* Already have EVENT_READ and don't need to handle it in two places
2026-01-08 15:14:59 +01:00
Safihre 17dcff49b2 Generalize locking strategy (#3264)
* Use per-nzo/nzf lock in wrapper

* Replace global TryList lock with per-nzo one

* Offset does require file_lock
2026-01-06 17:00:27 +01:00
mnightingale 220186299b Do not throttle flushing cache during shutdown (#3265)
* Add a deadline for flushing cache contents on shutdown and don't throttle

* Revert "Add a deadline for flushing cache contents on shutdown and don't throttle"

This reverts commit e405b4c4f4.

* Always flush the whole cache but don't sleep when shutting down
2026-01-06 16:58:39 +01:00
Safihre ae30be382b Merge platform specific memory functions into single 2026-01-06 13:38:06 +01:00
SABnzbd Automation 13b10fd9bb Update translatable texts
[skip ci]
2026-01-06 11:46:06 +00:00
mnightingale d9bb544caf Always enqueue when file_done (#3263) 2026-01-06 12:45:25 +01:00
SABnzbd Automation bf2080068c Update translatable texts
[skip ci]
2026-01-06 09:03:40 +00:00
mnightingale b4e8c80bc9 Implement Direct Write (#3236)
* Implement direct write

* Support direct_write changes at runtime

* Check sparse support when download_dir changes

* Fixes to reverting to append mode and add tests

* Single write path, remove truncate, improve tests, add test for append mode with out of order direct writes

* assert expected nzf.assembler_next_index

* bytes_written_sequentially assertions

* Slim tests and mock load_article as a dictionary

* More robust bytes_written_sequentially

* Worked but guard Python -1 semantics

* os.path.getsize silly

* Add test with force followed by append to gaps

* Split flush_cache into its own function so the loop does not need to clear the article variable

* Fewer private functions

* Extract article cache limit for waiting constant

* Move option back to specials

* Use Status.DELETED for clarity

* Use nzo.lock in articlecache

* Document why assembler_next_index increments

* Remove duplicated code from write

* load_data formatting

* Create files with the same permissions as with open(...)

* Options are callable

* Fix crash if direct writing from cache but has been deleted

* Fix crash in next_index check via article cache

* Fix assembler waiting for register_article and cache waiting for assembler to write

* Simplify flush_cache loop and only log once per second

* Document why we would leave the assembler when forced at the first not tried article

* When skippedwe can't increment the next_index

* Rename bytes_written_sequentially to sequential_offset improve comments and logic

* Don't need to check when the config changes, due to the runtime changes any failure during assembly will disable it

* Remove unused constant

* Improve append triggering based on contiguous bytes ready to write to file and add a trigger to direct write

* Throttle downloader threads when direct writing out of order

* Clear ready_bytes when removed from queue

* Rework check_assembler_levels sleeping to have a deadline, be based on if the assembler actual pending bytes, and if delaying could have any impact

* Always write first articles if filenames are checked

* Rename force to allow_non_contiguous so it is clearer what it means

* Article is required

* Tweak delay triggers

* Fix for possible dictionary changed size during iteration

* postproc only gets the nzo

* Rename constants and remove redundant calculation

* For safety just key by nzf_id

* Not redundant because capped at 500M

* Tweak a little more

* Only delay if assembler is busy

* Remove unused constant and rename the remaining one

* Calculate if direct write is allowed when cache limit changes

* Allow direct writes to bypass trigger

* Avoid race to requeue

* Breakup the queuing logic so its understandable
2026-01-06 10:03:00 +01:00
Safihre 33aa4f1199 Revert "OptionBool should return bool"
This reverts commit ecb36442d3.

It messes up the sabnzbd.ini reading/writing!
2026-01-05 15:58:54 +01:00
Safihre ecb36442d3 OptionBool should return bool
Hmm why wasn't this the case?
2026-01-05 14:50:35 +01:00
Safihre 0bbe34242e Stop updating uvicorn branch 2026-01-05 09:51:55 +01:00
renovate[bot] 7c6abd9528 Update all dependencies (#3258)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-05 01:53:32 +00:00
Safihre 448c034f79 Simplify get_windows_memory 2026-01-03 22:03:26 +01:00
mnightingale 9d5cf9fc5b Fix binding outgoing ip test when ipv6 is available (#3257) 2026-01-02 15:53:48 +01:00
mnightingale 4f9d0fb7d4 Fix connection test failing when bad credentials are used (#3256) 2026-01-02 15:03:04 +01:00
mnightingale 240d5b4ff7 Fix failing downloader tests and make tests less fragile (#3254)
* Fix failing downloader tests and make tests less fragile

* Implement feedback

* Spelling and only sleep if necessary

* Grammar is hard
2026-01-02 15:02:34 +01:00
SABnzbd Automation a2161ba89b Update translatable texts
[skip ci]
2026-01-02 11:50:29 +00:00
Safihre 68e193bf56 Use blocking writes instead of buffering (#3248) 2026-01-02 12:49:42 +01:00
SABnzbd Automation b5dda7c52d Update translatable texts
[skip ci]
2025-12-30 08:24:04 +00:00
mnightingale b6691003db Refactor RSS flow (#3247) 2025-12-30 09:23:20 +01:00
Safihre ed655553c8 Pausing the queue with Force'd downloads doesn't let them download
Closes #3246
2025-12-29 12:37:44 +01:00
Safihre 316b96c653 Add context folder with documents for AI-tools 2025-12-29 12:12:58 +01:00
mnightingale 62401cba27 Simplify RSS rule evaluation (#3243) 2025-12-29 10:50:55 +01:00
renovate[bot] 3cabf44ce3 Update dependency pyinstaller-hooks-contrib to v2025.11 (#3244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-29 08:55:14 +01:00
mnightingale a637d218c4 Refactor preparing the rss config (#3242)
* Refactor preparing the rss config

* Defaults, bool, and iteration
2025-12-24 21:47:15 +01:00
Safihre 63c03b42a9 Update text files for 4.6.0Beta2 2025-12-22 22:00:02 +01:00
SABnzbd Automation 4539837fad Update translatable texts
[skip ci]
2025-12-22 20:53:43 +00:00
Safihre a0cd48e3f5 Notify user if they run AMD64 version on ARM64 Windows machine
Closes #3235
2025-12-22 21:52:58 +01:00
Safihre ceeb7cb162 Add Windows ARM64 binary 2025-12-22 21:25:17 +01:00
SABnzbd Automation f9f4e1b028 Update translatable texts
[skip ci]
2025-12-22 15:40:48 +00:00
Safihre 6487944c6c Move Pipelining setting to Server-level 2025-12-22 16:38:46 +01:00
renovate[bot]andSafihre 239fddf39c Update all dependencies (develop) (#3238)
* Update all dependencies

* Compare fakefs result after sorting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-12-22 12:45:00 +00:00
SABnzbd Automation 8ada8b2fd9 Update translatable texts
[skip ci]
2025-12-19 11:41:18 +00:00
Safihre b19bd65495 Show error in case of failed NZB upload
Closes #3233
2025-12-19 12:40:34 +01:00
Safihre e3ea5fdd64 Update appdata file with Flathub suggestions
@jcfp
2025-12-19 11:54:53 +01:00
Safihre 4fdb89701a Add release URL's to appdata 2025-12-19 11:42:36 +01:00
SABnzbd Automation 9165c4f304 Update translatable texts
[skip ci]
2025-12-18 20:10:14 +00:00
mnightingale 4152f0ba6a Increase max pipelining (#3234) 2025-12-18 20:09:24 +00:00
SABnzbd Automation 3eaab17739 Update translatable texts
[skip ci]
2025-12-16 09:04:29 +00:00
Safihre 578bfd083d Update text files 4.6.0 Beta 1 2025-12-16 10:03:41 +01:00
renovate[bot] dd464456e4 Update all dependencies (#3231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 02:08:17 +00:00
mnightingale e7a0255359 Make behaviour after reset more robust (#3229)
* Make behaviour after reset more robust

* Remove use of hasattr and rename to generation

* I had a feeling this would be a circular reference

* Reset and increment generation under lock
2025-12-14 22:39:48 +01:00
mnightingale 2e1281d9e8 Fix nzb types (#3230) 2025-12-14 15:46:14 +01:00
SABnzbd Automation efecefdd3b Update translatable texts
[skip ci]
2025-12-09 20:22:55 +00:00
Safihre a91e718ef5 Split nzbstuff into separate files for Article, NzbFile and NzbObject (#3221) 2025-12-09 21:21:51 +01:00
mnightingale b420975267 Fix read/write actions after reset_nw (#3223) 2025-12-09 19:39:49 +01:00
SABnzbd Automation c4211df8dc Update translatable texts
[skip ci]
2025-12-08 21:37:36 +00:00
Safihre e182707d3a Update text files for 4.6.0Alpha2 2025-12-08 22:36:51 +01:00
Safihre 05cbd9d7c4 Correct process_nzb_only_download and add tests 2025-12-08 11:42:22 +01:00
Safihre 6e8683349f Keep NZB name prefix when processing multiple NZBs
Closes #3217
2025-12-08 10:27:16 +01:00
Safihre adb4816552 Update to Python 3.14.2 2025-12-08 10:27:16 +01:00
renovate[bot] 3914290c11 Update all dependencies (#3219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-08 01:00:54 +00:00
Safihre f76bf55b4a Handle aborted Direct Unpack better
Closes #3212
2025-12-05 16:18:17 +01:00
SABnzbd Automation 1cde764336 Update translatable texts
[skip ci]
2025-12-05 12:34:16 +00:00
mnightingale 44d94226ec Pipelining and performance optimisations (#3199)
* Pipelining and performance optimisations

* Refactor to remove handle_remainder and add on_response callback to allow inspecting of nntp messages

* Logic fix if there are sockets but nothing to read/write

* Fix logic errors for failed article requests

* Fix logic for reconfiguring servers

* Add guard_restart callback to pipelining_requests

* Fix article download stats

* Fix current article request shown via api

* Removal of DecodingStatus

* Fix circular reference

* Cleanup imports

* Handle reset_nw and hard_reset for inflight requests

* Improve __request_article behaviour using discard helper

* Article should be None here (before auth) but just in case

* Remove command_queue_condition unnecessary with the pull rather than push queue system

* During reset discard any data received prior to sending quit request

* Circular references again

* Revert to using bytearray

* Revert "During reset discard any data received prior to sending quit request"

This reverts commit ed522e3e80.

* Simpler interaction with sabctools

* Temporarily use the sabctools streaming decoder branch

* Fix most uu tests

* Reduce maximum pipelining requests

* Fix the squiggly line

* Remove some LOG_ALL debug code

* Make get_articles return consistent (None) - it now populates the server deque

* Reduce NNTP_BUFFER_SIZE

* Rename PIPELINING_REQUESTS to DEF_PIPELINING_REQUESTS

* A little refactoring

* Reduce default pipelining until it is dynamic

* Use BoundedSemaphore and fix the unacquired release

* Use crc from sabctools for uu and make filename logic consistent wit yenc

* Use sabctools 9.0.0

* Fix Check Before Download

* Move lock to NzbFile

* Use sabctools 9.1.0

* Minor change

* Fix 430 on check before download

* Update sabnews to work reliably with pipelining

* Minor tidy up

* Why does only Linux complain about this

* Leave this as it was

* Remove unused import

* Compare enum by identity

* Remove command_queue and just prepare a single request
Check if it should be sent and discard when paused

* Kick-start idle connections

* Modify events sockets are monitored for
2025-12-05 13:33:35 +01:00
Safihre e8e8fff5bf Prevent filepath creation before first article is processed (#3215) 2025-12-05 13:18:27 +01:00
SABnzbd Automation 1b04e07d40 Update translatable texts
[skip ci]
2025-12-04 14:14:01 +00:00
Safihre 54db889f05 Update sfv help text
Closes #3214 and #3213
2025-12-04 15:13:07 +01:00
Safihre 777d279267 Only clear work-flag for post processing when needed 2025-12-01 16:40:59 +01:00
Safihre 75be6b5850 Use Event's to handle Post Processing queue
See #3209
2025-12-01 15:28:05 +01:00
Safihre a4657e2bd3 Correct rar-version logging line 2025-12-01 11:36:10 +01:00
renovate[bot] 095b48ca47 Update all dependencies (#3210)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 01:32:06 +00:00
renovate[bot] d459f69113 Update all dependencies (#3204)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 01:49:05 +00:00
mnightingale 2ecdd0b940 Optimise bpsmeter to avoid repeat lookups and try/except (#3203) 2025-11-22 14:46:21 +01:00
Safihre 73a4ad50e5 Allow longer build timeout for Snap amr64 build 2025-11-21 12:02:41 +01:00
Safihre 9b59e24961 Lower macOS build version to support older clients 2025-11-21 11:50:45 +01:00
Safihre 27e164763e Remove unused imports and shorten build timeouts 2025-11-21 11:29:53 +01:00
Safihre eb544d85c7 Update text files for 4.6.0Alpha1 2025-11-21 11:02:24 +01:00
Safihre ad85a241df Enable verify_xff_header by default 2025-11-21 10:12:47 +01:00
Safihre e4d8642b4f Correct mobile layout if Full Width is enabled 2025-11-21 10:12:19 +01:00
Safihre 77b35e7904 Re-enable all Python versions for CI tests 2025-11-21 10:05:01 +01:00
Safihre f8a0b3db52 Remove hostname resolution in get_webhost
#3131
2025-11-21 10:00:12 +01:00
Safihre 9c8b26ab4e Use new removeprefix and removesuffix 2025-11-21 10:00:11 +01:00
Safihre 67a5a552fd Add missing typing hints to several files 2025-11-21 10:00:10 +01:00
Safihre 80f57a2b9a Drop support for Python 3.8 2025-11-21 10:00:09 +01:00
Safihre baaf7edc89 Windows tray icon disappears after Explorer restart
Closes #3200
2025-11-20 16:05:52 +01:00
Safihre 2d9f480af1 Only measure real write time during disk speed test 2025-11-20 15:34:34 +01:00
L-CieandL-Cie 2266ac33aa Address low throughput reporting in diskspeed.py (#3197)
* increased buffer, mesaurement time, changed file management and calcucation of result

* Write smaller chunks first, abort if time exceeds

* Move urandom dump to diskspeedmeasure, reduced buffer size to 16MB and recycled buffer for more efficient resource usage during writes

* fixed formatting issues

* fixed formatting issues

* fixed formatting issues

---------

Co-authored-by: L-Cie <lcie@sturmklinge.ch>
2025-11-20 06:49:18 +01:00
renovate[bot]andSafihre 1ba479398c Update all dependencies (develop) (#3195)
* Update all dependencies

* Pin tavern due to failure in newer versions

* User SABnzbd User-agent in wiki test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-11-18 13:30:07 +01:00
Safihre f71a81f7a8 Stop endless loop in edge-case of no STAT or HEAD support
Closes #3191
2025-11-13 13:33:11 +01:00
Safihre 1916c01bd9 Use general failure flag for pre-check result check
Closes #3190
2025-11-11 16:48:05 +01:00
Safihre 699d97965c Make Assembler queue configurable and auto increase on high bw-limit 2025-11-10 15:54:26 +01:00
renovate[bot]andSafihre 399935ad21 Update all dependencies (develop) (#3186)
* Update all dependencies

* Allow older markdown for Python 3.9 and below

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-11-10 14:19:10 +00:00
Sander 0824fdc7c7 STAT: tell on which server an article is present (#3185)
* STAT: tell on which server an article is present

* Update logging format for article presence: old format
2025-11-10 11:08:31 +01:00
SABnzbd Automation a3f8e89af8 Update translatable texts
[skip ci]
2025-11-05 21:37:39 +00:00
Safihre f9f17731c8 Certificate validation should also be Strict in Wizard
Closes ##3183
2025-11-05 22:36:49 +01:00
SABnzbd Automation b052325ea7 Update translatable texts
[skip ci]
2025-11-03 13:29:35 +00:00
Safihre daca14f97e Update Apprise texts 2025-11-03 14:28:47 +01:00
renovate[bot] daa26bc1a6 Update dependency cheroot to v11.1.0 (#3180)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-03 06:43:18 +00:00
renovate[bot] 70d5134d28 Update all dependencies (#3174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 01:46:12 +00:00
Safihre a32458d9a9 Resolve another PyGithub deprecation 2025-10-24 13:22:07 +02:00
Safihre 4c77954526 Add 4.5.5 to appdata 2025-10-24 12:47:26 +02:00
SABnzbd Automation a229a2a5ea Update translatable texts
[skip ci]
2025-10-24 10:35:59 +00:00
Safihre 0a2f3865ee Check if all macOS binary files support the minimal required version 2025-10-24 12:27:48 +02:00
Safihre 900e68bb9a Resolve PyGithub deprecation warnings 2025-10-22 23:25:42 +02:00
Safihre 1de674a532 Correct appdata between branches 2025-10-22 22:33:55 +02:00
Safihre e1dad3e4c4 Start SABnzbd service after installation, if installed 2025-10-20 13:18:44 +02:00
SABnzbd Automation 44f2eb8620 Update translatable texts
[skip ci]
2025-10-20 07:57:56 +00:00
renovate[bot] 70945a9c5b Update all dependencies (#3167)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 09:57:12 +02:00
SABnzbd Automation fdfca97dfa Update translatable texts
[skip ci]
2025-10-16 08:58:27 +00:00
Safihre b84900dcb5 Add extra warning to Remove All Orphans
See https://forums.sabnzbd.org/viewtopic.php?p=133922
2025-10-16 10:57:31 +02:00
Safihre d989ec928a Small styling issue for tooltip in Night mode 2025-10-14 11:12:06 +02:00
SABnzbd Automation d7fa3e1f7b Update translatable texts
[skip ci]
2025-10-13 14:24:54 +00:00
Safihre c1417c319d Add tooltip that users need to Test Server before saving/next 2025-10-13 16:24:04 +02:00
Safihre 6689939cc9 Large par2 files could require more parsing to get all crc32 slices
Closes #3164
2025-10-13 15:26:55 +02:00
Safihre 09347d0766 Switch everything to Python 3.14 2025-10-13 07:44:35 +02:00
SABnzbd Automation 41db09057c Update translatable texts
[skip ci]
2025-10-13 01:10:52 +00:00
renovate[bot] 6983058f49 Update all dependencies (#3165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 01:09:52 +00:00
SABnzbd Automation fb2d412c97 Update translatable texts
[skip ci]
2025-10-08 21:01:13 +00:00
Safihre 1c0b1205b2 Add quota notifications
Closes #2926
2025-10-08 22:58:08 +02:00
Safihre f556cea488 Use release version of Python 3.14 in CI 2025-10-08 20:07:39 +02:00
a2447253a0 Local ipv4 with socks5 proxy (#3161)
* Update all dependencies

* use socks5 server as test server

* make black happy

* improved active_socks5_proxy(): default port = 1080

* improved local_ipv4()

* use int_conv

* black

* use socks.socksocket.default_proxy directly

* active_socks5_proxy cleaner with int_conv

* correct to windows-2022

* socks.socksocket.default_proxy as check

* uniform naming socks5host/port

Closes #3154
---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: sanderjo <sander.jonkers+github@github.com>
2025-10-08 19:10:47 +02:00
Safihre 3393d7c976 Changing server name shows button "failure" instead of "saving..."
Closes #1551
2025-10-06 15:54:11 +02:00
renovate[bot] 06572bdf7d Update all dependencies (#3159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-06 02:33:57 +00:00
Safihre d4411f1b8f Replace vendored rarfile with official one
Closes #2560
2025-10-05 22:40:30 +02:00
SABnzbd Automation 1bfd1b8f41 Update translatable texts
[skip ci]
2025-10-05 20:38:14 +00:00
Safihre c47dbfdc26 Let unrar handle rename of chars invalid on Windows filesystem
Closes #1574

Add tests for long paths

Make sure long path is >260

Add rar test file with invalid Windows filenames

Add rar_unpack tests for unicode and passworded sets

Simplify Unrar command building

Add test for rar_invalid_windows

Remove check for 260 chars in rar_unpack

Should never happen anymore

Let Unrar rename invalid filenames

Check full path output if rar_unpack

Add helper for check

Correct test_rar_unpack_invalid_windows_filenames

Apply changes also to Direct Unpacker

Extend testing to make sure full paths are tested

Add tests for long paths inside rar

Unrar auto-rename message is different on Linux
2025-10-05 22:37:22 +02:00
Safihre b5e55cd9b2 Unselect Multi-Operations Play/Resume on second click
Closes #2725
2025-10-03 15:06:37 +02:00
Hugo Lloreda 85c98d7203 Add option to bind outgoing connections (#3155)
* refactor outgoing interface

* refactor

* rollback old change

* We actually don't need another port


Closes #3153

* refactor

* refactor

* refactor to be compatible with old python versions

* forgot to remove match

* fix no route to host on mac

* fix no route to host on mac + rename interface to ip

* fix black + try to fix windows error

* fix black + try to fix windows error

* fix windows error

* fix windows failure

* rollback optional changes

* Remove optional type

* rollback changes + fix issue

* black change

* refactor

* missing refactor
2025-10-03 11:28:44 +02:00
Safihre 9e95717619 Enable Make Windows compatible if we cannot write special characters 2025-09-30 12:18:18 +02:00
SABnzbd Automation 90b4ff2720 Update translatable texts
[skip ci]
2025-09-30 09:28:01 +00:00
Safihre 0f97a9fdfc Workaround for macOS statvfs no longer needed
Part of Python 3.13 and above.
https://github.com/python/cpython/pull/99570
2025-09-30 11:21:14 +02:00
Safihre 90caf0c164 Lock changes to job properties during URL-grabbed NZO creation
Closes #1908
2025-09-29 15:51:26 +02:00
Safihre 9b3fe470a0 Run tests on Python 3.14
Force newer pytest

Force beta release of tavern

Unfix werkzeug

Allow latest tavern only on Python 3.11 and above

Fix test failure in Python 3.14
2025-09-29 13:29:50 +02:00
SABnzbd Automation ab318729ab Update translatable texts
[skip ci]
2025-09-29 10:43:50 +00:00
Safihre 9576554426 Move to top/bottom for Multi edit
Closes #1088
2025-09-29 12:40:44 +02:00
Safihre 3cd819b78d Refactor history API call handling 2025-09-29 11:56:03 +02:00
renovate[bot] bb24f3f04e Update all dependencies (#3156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-29 07:28:52 +00:00
Safihre 6f4416236d Prevent renovate from updating macOS version
Due to #3131
2025-09-29 09:10:23 +02:00
SABnzbd Automation 47dcccd17f Update translatable texts
[skip ci]
2025-09-26 14:29:44 +00:00
Safihre 6b026d8274 Add way to mark job as Completed and remove Incomplete
Closes #1174
2025-09-26 16:28:57 +02:00
Safihre ec18606557 Require correct server test in Wizard
Closes #3148
General refactor.
2025-09-25 13:40:25 +02:00
Safihre 895c8549ba Add 4.5.4 to appdata 2025-09-22 14:09:54 +02:00
Safihre 0d80efb898 Update Python to 3.13.7 2025-09-22 13:54:16 +02:00
Safihre deace9f8ae Add SignPath to the release notes 2025-09-22 13:30:43 +02:00
Safihre 1c96dff133 Implement SignPath binary signing for Windows releases
Keep zip structure

Download all signed artifacts for release step

Correctly download all releases

Only sign when tagging release

Restore CI tests

Test production certificate

Closes #2870
2025-09-22 12:16:10 +02:00
renovate[bot] 1734b11338 Update all dependencies (#3144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 08:34:30 +00:00
Safihre 5f3c4d17da Prevent Renovate from updating GitHub Actions Windows runner 2025-09-22 10:18:58 +02:00
jcfp 4ffe0e27fb Handle weird anime episode notation (#3146)
* handle weird anime episode notation

* make black even happier /s
2025-09-15 22:55:07 +02:00
renovate[bot] 951bc0c957 Update all dependencies (#3142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 20:00:14 +00:00
SABnzbd Automation 60f985ba00 Update translatable texts
[skip ci]
2025-09-08 19:37:06 +00:00
Safihre a42a2db196 Github Actions Windows 2025 runners do not included NSIS 2025-09-08 21:36:13 +02:00
SABnzbd Automation 64034c5636 Update translatable texts
[skip ci]
2025-08-26 13:30:14 +00:00
Safihre e03a031342 Add Run SABnzbd to Windows Installer 2025-08-26 15:29:34 +02:00
Safihre da3d72b484 No longer reduce threads counter on connection loss
Closes #3137
2025-08-25 13:48:00 +02:00
SABnzbd Automation e3042a6106 Update translatable texts
[skip ci]
2025-08-25 00:59:25 +00:00
renovate[bot] 55f1253a56 Update all dependencies (#3138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:58:50 +00:00
Safihre 5e432bea37 Cache par2 download 2025-08-19 16:22:50 +02:00
renovate[bot] 2d0cc08987 Update all dependencies (#3136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 01:59:29 +00:00
Safihre 627797f8c7 No longer apply Bug and Feature Request directly
This way they can be auto-closed if stale.
2025-08-14 10:50:42 +02:00
Safihre e37a777f29 Run CI Tests on macOS 13
See #3131
2025-08-12 11:44:31 +02:00
SABnzbd Automation 13a76e5824 Update translatable texts
[skip ci]
2025-08-11 12:07:26 +00:00
Safihre e4c64cac12 Automated update of translations
Used AI to add missing translations.
Not 100% coverage, it keeps missing some texts.
Stopping here.
2025-08-11 14:06:40 +02:00
SABnzbd Automation c6694483e4 Update translatable texts
[skip ci]
2025-08-11 10:32:26 +00:00
thezoggy bc793e11c4 bump windows unrar to 7.13 for CVE-2025-8088 (#3129) 2025-08-11 11:59:12 +02:00
Safihre 4980fc70a0 Small tweaks to the workflows 2025-08-11 11:57:54 +02:00
Safihre 8afac4f6fb Push the snap to stable for any tag
This is the same we did before using the Python script.
2025-08-11 11:50:11 +02:00
Safihre c78b633da8 Update snap publish credentials 2025-08-11 11:32:25 +02:00
SABnzbd Automation a1ee1677dc Update translatable texts
[skip ci]
2025-08-11 09:27:39 +00:00
Safihre 511bb153d7 Add Publish snap step 2025-08-11 11:26:28 +02:00
Safihre c1af36f6b0 Move user logged in notification 2025-08-11 11:22:13 +02:00
Safihre 6028824966 RSS Next scan time is not recalculated after manual Read All Feeds Now
Closes #2979
2025-08-08 22:06:02 +02:00
Safihre 49a7300ad6 Pre-queue script rejected NZBs are sometimes reported in history as "URL Fetching failed;"
Closes #3023
2025-08-08 21:57:50 +02:00
Safihre 8e8e560eac Add building of snap as a GitHub Action 2025-08-08 09:49:19 +02:00
Safihre e51da569ca Add curl as snapcraft par2cmdline build-package 2025-08-08 08:52:21 +02:00
mnightingale 6ce43eed5f Fix snap with core24 (#3126)
* Fix snap with core24

* Remove probably unused

* Switch to 7zip-standalone package which only has the 7zz binary
2025-08-08 08:31:32 +02:00
Safihre 73ec6d8323 Add tests for new conditional_cache decorator 2025-08-07 22:09:25 +02:00
Safihre 27a7531f79 Make smarter decorator that only caches if there's a result 2025-08-07 21:55:18 +02:00
Safihre 423bdb4f81 Replace HappyEyeBalls with concurrent fastest connection check 2025-08-07 21:25:06 +02:00
Safihre 7f8081e2cc Correct add_fake_history_jobs after adding time_added 2025-08-07 20:21:43 +02:00
Safihre 50c2d5e2ab Add time_added to History output and interface
Closes #2914
2025-08-07 16:41:01 +02:00
Safihre 552bfd4b72 Add time_added to queue output 2025-08-07 14:41:40 +02:00
Safihre 3d522c8205 Update snapcraft.yaml format 2025-08-07 10:02:29 +02:00
Safihre b6b0d10367 Try to get the snap to compile again 2025-08-05 14:04:56 +02:00
Safihre 8d4d69d56b Add 4.5.3 to Appdata file 2025-08-05 11:32:33 +02:00
Safihre 0e475e593a Update to par2cmdline-turbo 1.3.0 that supports older macOS
And it's universal2
2025-08-05 11:09:24 +02:00
renovate[bot] 78424318ce chore(deps): update all dependencies (#3123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 01:01:09 +00:00
mnightingale 57c90b2554 Skip adding postproc items to the history if they are already completed (#3120)
* Skip adding postproc items to the history if they are already completed

* Add test that duplicate nzo_ids are not added to the history
2025-08-02 12:11:47 +02:00
Safihre 9b94d22621 Broken "Show Logging" function when console logging
Closes #3107
2025-08-01 14:57:33 +02:00
SABnzbd Automation 5c30b0ee29 Update translatable texts
[skip ci]
2025-08-01 12:50:43 +00:00
Safihre 3a1c60a3ed Persist the Permanently delete checkbox
On Archive page, never even ask the question.
Yeah, if you combine History+Archive it will be always Permanently deleted. So be it.
2025-08-01 14:49:39 +02:00
SABnzbd Automation bd07a79c97 Update translatable texts
[skip ci]
2025-08-01 07:09:26 +00:00
Safihre c562c9a468 Update sabctools to 8.2.6
Remove reference to Github issue for sabctools feedback. That's ages ago already.
2025-08-01 09:08:31 +02:00
renovate[bot] fdd3f590cd chore(deps): update all dependencies (#3119)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 02:35:15 +00:00
thezoggy 77e9627e64 Skip cbr durning rarcheck to prevent badly renamed (#3115) 2025-07-24 10:53:09 +02:00
renovate[bot] c40d1274d2 chore(deps): update all dependencies (#3116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 02:43:33 +00:00
Safihre d1948071fc No longer crash on Windows 8 for binary releases 2025-07-14 12:48:55 +02:00
renovate[bot] 4f79d924e6 chore(deps): update dependency certifi to v2025.7.14 (#3111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 04:58:53 +00:00
SABnzbd Automation 872cf835df Update translatable texts
[skip ci]
2025-07-09 18:05:33 +00:00
thezoggy 69bb1a87a4 Bump 7zip to 25 (#3109) 2025-07-09 20:05:00 +02:00
renovate[bot] e3339a1ab4 chore(deps): update all dependencies (#3108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 20:04:28 +02:00
renovate[bot] 18d84fa522 chore(deps): update all dependencies (#3101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-26 14:52:23 +02:00
Safihre 7a7e7b7b93 Remove Python 3.8 from CI (but keep support) 2025-06-26 13:32:32 +02:00
thezoggy 18ca9d6155 Update unrar 7.12 (#3103)
- CVE-2025-6218 only affects windows.
2025-06-26 10:44:26 +02:00
Safihre f5aa0f52d6 Correct Windows version check for notifications 2025-06-24 11:19:31 +02:00
Safihre 5a93074f4b Update NSIS language map 2025-06-23 12:51:00 +02:00
SABnzbd Automation 3863d6bd2f Update translatable texts
[skip ci]
2025-06-23 10:43:39 +00:00
Safihre 753d1e3bd3 Add Download button to Windows and macOS update notification 2025-06-23 12:38:34 +02:00
Safihre 5393b6330e Add Turkish to installer 2025-06-23 12:36:54 +02:00
Safihre 2d8be8d89b Disable forced check for Windows verison
See https://github.com/pywinrt/pywinrt/issues/136
2025-06-23 12:36:39 +02:00
Safihre 08723f0432 Windows Toasts did not work anymore 2025-06-23 10:40:29 +02:00
Safihre 1e1220c509 Update appdata on develop brach 2025-06-19 08:57:48 +02:00
renovate[bot] c6920e09bf chore(deps): update all dependencies (#3098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 01:08:08 +00:00
SABnzbd Automation 74d2a9f7c4 Update translatable texts
[skip ci]
2025-06-14 21:10:55 +00:00
Safihre 31c9c64741 Remove double da language files 2025-06-14 22:38:40 +02:00
Safihre 96e7999b4f Update Python for macOS release to 3.13.5 2025-06-14 22:15:54 +02:00
Safihre 5303b9d291 Make internetspeed robust against failure
Closes #3097
2025-06-14 21:59:44 +02:00
renovate[bot]andSafihre 91af147b8b chore(deps): update all dependencies (develop) (#3096)
* chore(deps): update all dependencies

* List Python 3.8 version of portend

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-06-10 12:27:03 +00:00
renovate[bot] 33463a3fd1 chore(deps): update all dependencies (#3095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 03:53:49 +00:00
SABnzbd Automation ac88446757 Update translatable texts
[skip ci]
2025-05-22 18:45:13 +00:00
Michael Nightingale d129eec4a7 Filter rss enclosures by application/x-nzb mimetype (#3093)
* Filter rss enclosures by application/x-nzb mimetype

* Add tests and fix the failing one

* Change empty RSS entry logging to info
2025-05-22 20:44:30 +02:00
SABnzbd Automation 9b1b908115 Update translatable texts
[skip ci]
2025-05-21 08:44:14 +00:00
Arun Rawat 5866c029c4 feat: add tab and shift+tab navigation between rename fields in queue (#3091) 2025-05-21 10:43:28 +02:00
renovate[bot] de6a6a084e Update all dependencies (#3090)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 03:07:37 +00:00
renovate[bot] 139489e5b3 Update all dependencies to v3 (#3085)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 07:20:38 +00:00
Safihre a91f72a7f4 Allow renovate to update winrt again 2025-05-12 09:07:41 +02:00
renovate[bot] f5fd4c1c18 Update all dependencies (#3084)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 02:26:49 +00:00
Safihre 3da67dc4af Correct permissions of included macos binaries 2025-05-07 14:58:37 +02:00
jcfp 0220d886c5 prevent cherrypy from stumbling over invalid cookies (#3082)
* prevent cherrypy from stumbling over invalid cookies

* group workarounds for flaws in external mods
2025-05-06 09:07:43 +02:00
SABnzbd Automation 19ea25f072 Update translatable texts
[skip ci]
2025-05-05 20:15:43 +00:00
Safihre d934c588ad Rename osx to macos in the code 2025-05-05 22:15:02 +02:00
Safihre ccb036ba37 Update par2cmdline-turbo to 1.3.0 2025-05-05 22:01:59 +02:00
renovate[bot] 3d1c5c82d1 Update all dependencies (#3081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 03:22:11 +00:00
thezoggy d37532a4eb Update build_release.yml for Python 3.13.3 (#3080)
python 3.13.3 bump
2025-04-28 20:32:45 +02:00
renovate[bot] 143851d1cb Update all dependencies (#3079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 04:06:17 +00:00
SABnzbd Automation 235dd32ad0 Update translatable texts
[skip ci]
2025-04-26 09:39:58 +00:00
Matt Miller 0b295d7b57 Update to_units and quota api output format (#3076)
* Include byte unit in quota strings

Fixes #2590

I expect to continue to iterate on some of the ideas in the comments
thereon, but this fixes the proximate issue mentioned in the issue.

This includes changes to the interface to properly interpret the new
strings:

- Remove the UI-based `B` designations as they are now tagged with
  units from the api
- Let parseInt do its magic with string-y numbers plus units
- Expand parseInt for use in the checking whether quota is set

The display will be better in this `Glitter` case. This may well be
considered a breaking change for the API and not applied.

* Reduce computation slightly

No need to iterate over the evenly spaced unit sizes.
We can determine its magnitude quickly and convert it
into an index for our tags.

Avoiding the repeated divisons might also reduce error, but it is
unlikely to be noticeable.

* Drop trailing space when no units

The issue didn't expressly complain, but there is a trailing space when
all of the other unit information is empty.  Might as well not include
it when it clearly will happen.

The use of `f-strings` might also simplify future maintenance.

* Better document to_units methodology

This addresses some code review concerns with respect to readability.
Frankly, having this much exposition in the comments might imply that
it's a lot less obvious than I thought at initial writing.

This also maps everything under `1024` directly to `0`.  This avoids
concerns about potentially generating negative indices into the tags
tuple which would be surprising and wildly incorrect.
2025-04-26 11:39:10 +02:00
renovate[bot] a4020ed085 Update all dependencies (#3075)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 02:34:15 +00:00
SABnzbd Automation af1e5e0c1d Update translatable texts
[skip ci]
2025-04-18 07:46:33 +00:00
thezoggy a3fffea9f9 fixup prowl/pushover pri setting due to value returned as int not string now (#3072) 2025-04-18 10:45:44 +03:00
jcfp 180bc30ea5 improve happyeyeballs logging (#3067) 2025-04-15 19:46:47 +02:00
renovate[bot]andSafihre f6b21680f8 Update all dependencies (develop) (#3064)
* Update all dependencies

* markdown Python 3.8 fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-04-15 09:26:06 +02:00
SABnzbd Automation f6b65a4d1a Update translatable texts
[skip ci]
2025-04-15 06:52:38 +00:00
Safihre 4662bb8129 Update version file to 4.6.0-dev 2025-04-15 08:51:45 +02:00
jcfp e2f613da6c stop catching BaseException (#3062) 2025-04-09 15:27:22 +02:00
jcfp d4874970cd fix root dir check in make_mo (#3061) 2025-04-05 14:17:11 +02:00
Safihre 80268c4068 The From SxxEyy RSS filters did not work due to rename in sorter
Closes https://forums.sabnzbd.org/viewtopic.php?t=26966
2025-04-04 14:05:02 +02:00
renovate[bot]andSafihre e2811f93b1 Update all dependencies (develop) (#3058)
* Update all dependencies

* orjson dropped support for Python 3.8

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-04-04 13:16:39 +02:00
SABnzbd Automation f8190e28c9 Update translatable texts
[skip ci]
2025-04-04 10:32:10 +00:00
Safihre 7eb460ba1f Update UnRar to 7.11 2025-04-04 12:31:14 +02:00
Michael Reid fe647284e7 Fix Platform Detection on Linux (#3059)
* Fix Platform Detection on Linux

* Simplify solution to suppress stderr
2025-04-01 11:36:57 +02:00
SABnzbd Automation 54fe887636 Update translatable texts
[skip ci]
2025-03-28 13:54:16 +00:00
jcfp 2604775e5c avoid pop from empty list (#3056) 2025-03-28 14:53:30 +01:00
Safihre a15bad6fb4 Use base SABnzbd version in translation files 2025-03-24 12:37:44 +01:00
Safihre 58c060c39d Downgrade winrt so Windows notifications keep working 2025-03-24 12:24:45 +01:00
SABnzbd Automation 6ecd0a8561 Update translatable texts
[skip ci]
2025-03-24 03:49:45 +00:00
renovate[bot] 4a52289f05 Update all dependencies (#3054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 03:48:57 +00:00
SABnzbd Automation 104c0b20fe Update translatable texts
[skip ci]
2025-03-21 20:58:38 +00:00
Safihre b8a3a264e3 Update text files for 4.5.0RC1 2025-03-21 21:38:45 +01:00
Safihre b0e42940e5 Update pywin32 dependency 2025-03-21 21:28:14 +01:00
jcfp 4bc6fefa1f also disable argparse's auto-added help in the (io)nice parameters check (#3052) 2025-03-14 15:44:31 +01:00
jcfp 3ec8227745 add unrar_parameters option in config special (#3047)
* add unrar_parameters option in config special

* add tests for case-insensitive matching and argparse's auto-help
2025-03-14 11:49:26 +01:00
renovate[bot] 9f6dc3df01 Update all dependencies (#3048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-11 13:18:42 +01:00
SABnzbd Automation cadeae061f Update translatable texts
[skip ci]
2025-03-06 18:44:44 +00:00
jcfp 80c3226147 fix UnboundLocalError in testhelper (#3046) 2025-03-06 19:43:55 +01:00
SABnzbd Automation f2137e2fa3 Update translatable texts
[skip ci]
2025-03-03 02:28:34 +00:00
renovate[bot] 9bf80a3745 Update all dependencies (#3044)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 02:27:51 +00:00
renovate[bot] 750ee422a7 Update dependency PyGithub to v2.6.1 (#3042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 03:36:17 +00:00
luzpaz 035559f1c3 Fix typos (#3041)
Found via `codespell -q 3 -S "*.po,*.pot,*.min.js" -L allo,collet,fo,parm,ciph,datas,parms,reenabled,re-use,re-used,re-using,sav,tage`
2025-02-23 08:38:00 +01:00
SABnzbd Automation 4751f609bb Update translatable texts
[skip ci]
2025-02-20 21:10:43 +00:00
Safihre 40fde7a411 Update text files for 4.5.0Beta2 2025-02-20 22:07:58 +01:00
thezoggy b27a7f6cf4 Update unrar to 7.10 (#3039) 2025-02-20 22:01:58 +01:00
thezoggyandSafihre 9006875d6c par2cmdline turbo update (#3036)
* bump par2cmdline-turbo to 1.2.0 for osx, and 1.2.0-utf8-20250212 for win

* Try UNC paths for par2cmdline-turbo update

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-02-18 16:40:49 +01:00
thezoggy dd0122865a bump copyright year (#3034) 2025-02-17 14:06:12 +01:00
renovate[bot] 9a5f39ce99 Update all dependencies (#3038)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 03:41:19 +00:00
thezoggy 545f75b456 Update 7zip to 24.09 (#3035) 2025-02-16 09:31:37 +01:00
thezoggy e1553e86b6 bump macos to build with 3.13.2 (#3037) 2025-02-16 09:31:01 +01:00
jcfp c85ddd0595 add tests for remote_ip_from_xff (#3032) 2025-02-13 20:24:58 +01:00
RooHTaylor 5d763f52af Add check XFF headers for remote ip in cookie (#3029)
* Add check XFF headers for remote ip in cookie

If verify_xff_header() then also check for the client IP in the XFF headers to ensure the IP used for the session cookie is actually the client IP and not a proxy IP.

* Fix code formatting

* Remove duplicate check for empty xff_ips. for -> for else
2025-02-12 15:36:38 +01:00
renovate[bot] 2b842b2bc5 Update dependency pyinstaller to v6.12.0 (#3031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 00:59:08 +00:00
renovate[bot] 2a3e144ed6 Update all dependencies (#3027)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-04 10:09:24 +00:00
SABnzbd Automation 52f09dbf55 Update translatable texts
[skip ci]
2025-02-04 09:35:28 +00:00
Safihre 6bce289c8f Update for new black rules 2025-02-04 10:34:35 +01:00
SABnzbd Automation 20bc8f0d06 Update translatable texts
[skip ci]
2025-01-22 12:42:57 +00:00
cardpuncher 966fe246f6 French & Turkish translations for the desktop file (#3024)
As I couldn't find this file on Transifex, I added translations for the GenericName, Comment and Keywords fields here.
2025-01-22 13:42:08 +01:00
SABnzbd Automation c4a84b3a31 Update translatable texts
[skip ci]
2025-01-20 12:42:17 +00:00
renovate[bot]andSafihre e06f91c243 Update all dependencies (develop) (#3022)
* Update all dependencies

* Fix more-itertools

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-01-20 12:41:37 +00:00
Dan Christensen 42c00dda84 Directly decompress gzip responses in urlgrabber (#3014)
The URLGrabber sets Accept-encoding: gzip on requests, so a server may
respond with gzipped compressed data.  That data is tested without
having been decompressed which then can result in unnecessary errors.
2025-01-16 13:54:59 +01:00
SABnzbd Automation e40d2980e7 Update translatable texts
[skip ci]
2025-01-15 11:08:07 +00:00
thezoggy b6a905be21 Sanitize email related fields from json logging lines (#3021) 2025-01-15 12:07:22 +01:00
Safihre 22800ae411 Add 4.5.0 to Appdata 2025-01-14 11:59:36 +01:00
SABnzbd Automation e8a4d95177 Update translatable texts
[skip ci]
2025-01-14 10:16:44 +00:00
Safihre 026a606e7f Update text files for 4.5.0Beta1 2025-01-14 11:15:54 +01:00
renovate[bot]andSafihre 9551f9a3b9 Update all dependencies (develop) (#3015)
* Update all dependencies

* Unpin tempora for Python 3.8

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2025-01-14 09:58:57 +01:00
SABnzbd Automation f62e7ab560 Update translatable texts
[skip ci]
2025-01-14 08:08:21 +00:00
jcfp 92fbd75cc3 replace leftover wikidot url about email templates (#3018)
closes #3017
2025-01-14 09:07:31 +01:00
SABnzbd Automation 7de0869376 Update translatable texts
[skip ci]
2025-01-05 22:12:33 +00:00
Safihre 57606ef1bb Add more detailed detection of platform we are running on
Closes #3010
2025-01-05 23:11:48 +01:00
SABnzbd Automation 318d3ff649 Update translatable texts
[skip ci]
2025-01-05 21:03:18 +00:00
Safihre 8953f4df4a Refactor start-up checks 2025-01-05 22:01:46 +01:00
Safihre 7c607a6bf6 Simplify file and folder name sanitization 2024-12-30 22:15:14 +01:00
Safihre 93c6d67ef8 Improve handling of too long utf8 file and folder names
Closes #2991
Closes #2988
2024-12-30 14:59:26 +01:00
Safihre a314d6ab71 Did not count number of skipped files 2024-12-30 14:59:26 +01:00
SABnzbd Automation 62bb9b3816 Update translatable texts
[skip ci]
2024-12-30 13:09:48 +00:00
Safihre 2ef5cec5c5 Remove MultiPar support 2024-12-30 14:09:05 +01:00
Safihre c8e2329bee Refactor of code related to adding nzf's 2024-12-30 11:28:39 +01:00
renovate[bot]andSafihre f0358d9f0a Update all dependencies (develop) (#3004)
* Update all dependencies

* Allow older urllib3 on Python 3.8

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-12-30 09:48:35 +01:00
SABnzbd Automation 3f89114c73 Update translatable texts
[skip ci]
2024-12-22 20:47:59 +00:00
Safihre 721f5dfe86 Add additional par2 files to download first in case of missing articles 2024-12-22 21:46:44 +01:00
SABnzbd Automation ef38c1d7c8 Update translatable texts
[skip ci]
2024-12-21 21:53:02 +00:00
jcfp fe88760600 switch test_cert_gen check to utc (#3003) 2024-12-21 22:52:20 +01:00
SABnzbd Automation e498ef6302 Update translatable texts
[skip ci]
2024-12-18 12:20:53 +00:00
Safihre b1c486fa2a Update text files for 4.4.1RC1 2024-12-18 13:19:27 +01:00
Safihre d9aa42dc31 Add new Certificate verification setting Medium
Closes #2993
2024-12-18 13:18:50 +01:00
Safihre 3ee0db8cff Don't block virusscanner certificates on Windows
See #2993
2024-12-18 13:18:40 +01:00
Safihre 23cae4d073 Add missing hidden import for Windows notifications 2024-12-18 13:18:35 +01:00
SABnzbd Automation 2b45ba044e Update translatable texts
[skip ci]
2024-12-16 01:16:55 +00:00
renovate[bot] cd831d2775 Update dependency certifi to v2024.12.14 (#2996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 01:16:13 +00:00
Safihre 8c761ba67e Update release date of 4.4.0 in appdata 2024-12-09 21:50:23 +01:00
SABnzbd Automation 07243290ec Update translatable texts
[skip ci]
2024-12-09 02:14:44 +00:00
renovate[bot] 317a9c00de Update all dependencies (#2989)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 02:13:59 +00:00
SABnzbd Automation cc40214818 Update translatable texts
[skip ci]
2024-12-02 11:35:23 +00:00
Safihre 3b52379e56 Remove Windows 32bit support 2024-12-02 12:13:47 +01:00
SABnzbd Automation 8a2f8d969d Update translatable texts
[skip ci]
2024-12-02 08:56:07 +00:00
Safihre 6f9bf68528 Update text files for 4.4.0RC1 2024-12-02 09:55:22 +01:00
Safihre 5a48301d25 Prevent division by zero in bad server check
Closes #2963
2024-12-02 09:51:41 +01:00
SABnzbd Automation d1d3e27dea Update translatable texts
[skip ci]
2024-12-02 08:45:53 +00:00
Safihre 2f1805123a Add 4.4.0 to appdata 2024-12-02 09:42:38 +01:00
renovate[bot] f05c82b3a7 Update all dependencies (#2985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 01:13:49 +00:00
Michael Nightingale 1fe01f2724 Fix displayTabbed observable default value (#2984) 2024-12-01 18:47:00 +01:00
renovate[bot] a5239808eb Update all dependencies (#2977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 00:55:58 +00:00
SABnzbd Automation 00a7b4fffc Update translatable texts
[skip ci]
2024-11-21 21:00:04 +00:00
Safihre 0c5010f5c1 Warn users that the legacy Windows release will be dropped 2024-11-21 21:51:41 +01:00
renovate[bot]andSafihre a8b33e7686 Update all dependencies (develop) (#2974)
* Update all dependencies

* Add fix for Python 3.8 for PyJWT

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-11-19 09:09:13 +00:00
Safihre 0294e01fae Always notarize the macOS release 2024-11-19 08:52:33 +01:00
SABnzbd Automation c2621f56eb Update translatable texts
[skip ci]
2024-11-18 21:03:49 +00:00
Safihre ebac7707ff Always run release preparation 2024-11-18 22:03:04 +01:00
SABnzbd Automation 26adade8be Update translatable texts
[skip ci]
2024-11-18 14:30:25 +00:00
Safihre dd9c7488c6 Update text files for 4.4.0Beta2 2024-11-18 15:29:25 +01:00
Safihre 754b862a29 Build release using Python 3.13 2024-11-17 21:10:48 +01:00
Safihre 0ddf343bb7 Generalize wildcard addition in par2cmdline call 2024-11-17 21:06:30 +01:00
SABnzbd Automation 7a8a45b811 Update translatable texts
[skip ci]
2024-11-17 19:56:02 +00:00
Safihre 66c525ef95 Remove any custom Multipar parameters when updating 2024-11-17 20:54:59 +01:00
SABnzbd Automation 7cd3e50ded Update translatable texts
[skip ci]
2024-11-17 19:45:37 +00:00
Safihre d5094e1aa6 Switch to modified par2cmdline-turbo-utf8 2024-11-17 20:35:33 +01:00
renovate[bot] bca9559783 Update all dependencies (#2961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-12 14:34:43 +00:00
Safihre 0cbb8af7a0 More compatibility fixes for Python 3.8 2024-11-12 15:14:53 +01:00
Safihre afab90ca68 Ignore package updates that are unsupported on Python 3.8 2024-11-12 08:58:42 +01:00
SABnzbd Automation 92ecfc4930 Update translatable texts
[skip ci]
2024-11-11 11:17:53 +00:00
Safihre b064f112cd Fix version of blinker for Python 3.8 2024-11-11 12:16:56 +01:00
renovate[bot] 629da51be7 Update all dependencies 2024-11-04 08:08:53 +00:00
Safihre 0fa0f7286c Let renovate also update uvicorn branch 2024-11-03 20:47:24 +01:00
Safihre 6cd8f3e333 Add server note to the main servers display
Closes #2957
2024-11-03 16:45:52 +01:00
Safihre ff18fe03e9 Update the release builder configuration 2024-10-31 21:33:34 +01:00
SABnzbd Automation a1e30d19e3 Update translatable texts
[skip ci]
2024-10-31 20:23:25 +00:00
Safihre 3d74c19f41 Update text files for 4.4.0Beta1 2024-10-31 21:22:40 +01:00
SABnzbd Automation 33a831e87c Update translatable texts
[skip ci]
2024-10-29 21:03:01 +00:00
Safihre 7b04917f0e Kill unrar if it reports disk full, since it can hang
See #2948
2024-10-29 22:02:17 +01:00
SABnzbd Automation 2f62b76279 Update translatable texts
[skip ci]
2024-10-29 20:17:28 +00:00
Safihre bd43bca1cf Include dateutil timezone file that would show warning in executables 2024-10-29 21:16:41 +01:00
Safihre d200f0a618 Small refactor of improved warnings for weird ports
Not needed, but I liked it
2024-10-29 21:08:49 +01:00
SABnzbd Automation c5314569db Update translatable texts
[skip ci]
2024-10-29 11:11:35 +00:00
Sanderandsanderjo 001e215b7d Better analysis & better user info if newsserver connection fails (#2951)
* Better analysis & better user info if newsserver connection fails

* make Black happy

* make Black happy

* make Black happy

* make Black happy ... corrected

* make Black happy ... corrected

* make Black happy ... corrected

* make Black happy ... corrected

* Safihre's feedback handled

* more Safihre's feedback handled

---------

Co-authored-by: sanderjo <sander.jonkers+github@github.com>
2024-10-29 12:10:45 +01:00
SABnzbd Automation 3a628a0025 Update translatable texts
[skip ci]
2024-10-28 01:04:25 +00:00
renovate[bot] 7e48207fbc Update all dependencies 2024-10-28 01:03:38 +00:00
renovate[bot]andSafihre 48a6d6b289 Update all dependencies (#2949)
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-10-22 12:19:15 +02:00
SABnzbd Automation 21f05ad3d9 Update translatable texts
[skip ci]
2024-10-21 06:56:44 +00:00
Safihre d93c861eb3 Add disk full error to Direct Unpacker
Closes #2948
2024-10-21 08:55:56 +02:00
Safihre fb0ef21768 The tests folder was ignored by default by Renovate 2024-10-15 11:55:26 +02:00
Safihre 277679ef53 Add Python 3.13 to CI tests 2024-10-15 10:10:24 +02:00
Safihre e7e47bbcb0 Do not compare articles just based on article-ID
Turns out that there are NZBs that contain duplicate article-ID's within 1 file. This causes all "article in nzf.article" comparisons to return the wrong comparison.
2024-10-15 09:44:04 +02:00
Safihre 65ffb5ca81 All resets of try lists should be locked fully 2024-10-15 09:43:55 +02:00
SABnzbd Automation 6cf308e441 Update translatable texts
[skip ci]
2024-10-14 01:47:23 +00:00
renovate[bot] 870fa40c91 Update all dependencies 2024-10-14 01:46:42 +00:00
Safihre 39d9eaec2a Create new history database in case of no such table error 2024-10-08 21:06:59 +02:00
SABnzbd Automation 6fd4d0882c Update translatable texts
[skip ci]
2024-10-08 07:39:00 +00:00
Safihre 32591f7c46 Update text files for 4.4.0Alpha2 2024-10-08 09:38:01 +02:00
SABnzbd Automation 6b47d1126d Update translatable texts
[skip ci]
2024-10-07 00:23:20 +00:00
renovate[bot] 53df39dd12 Update dependency pywin32 to v307 2024-10-07 00:22:35 +00:00
Safihre b5d33fc17c Mount interface again on both / and url_base
Closes #2936
2024-10-05 20:58:45 +02:00
SABnzbd Automation 8a517b668e Update translatable texts
[skip ci]
2024-10-01 06:27:56 +00:00
thezoggy 67135ba4c8 Update 7zip and multipar (#2942)
* Update 7zip to 24.08

* Update multipar to 1.3.3.3
2024-10-01 08:27:12 +02:00
renovate[bot] c9efda1889 Update all dependencies 2024-09-30 00:44:59 +00:00
Safihre 250869c242 Force Selenium browser_version to 127
Closes #2932
2024-09-26 22:41:20 +02:00
SABnzbd Automation 844650e6be Update translatable texts
[skip ci]
2024-09-26 20:27:25 +00:00
Safihre 6685c72894 Saving Specials page would result in restart even for no changes
Relates to #2932
2024-09-26 22:26:39 +02:00
renovate[bot] 154a5e4989 Update all dependencies (#2937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 07:34:11 +02:00
SABnzbd Automation 93d302c9d7 Update translatable texts
[skip ci]
2024-09-20 08:11:43 +00:00
Safihre f664df7f05 Update text files for 4.4.1Alpha1 2024-09-20 10:10:55 +02:00
thezoggy 8fbf50292b Add additional server priority colors (#2934) 2024-09-17 20:27:22 +02:00
Safihre f3fed43022 Remove logging line for scheduled history purge 2024-09-17 15:06:56 +02:00
Safihre 2d323ba18c Update to Python 3.12.6 and drop macOS <10.13 support
Closes #2784
2024-09-16 13:59:38 +02:00
Safihre 1ec30a56e1 Improve logging of server address retrieval 2024-09-16 13:58:57 +02:00
renovate[bot] b98f3a07dd Update all dependencies (#2933)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 13:58:12 +02:00
Safihre 46170ffb3d Reset article queue only when really stopping the server
Closes #2866
2024-09-10 20:25:56 +03:00
renovate[bot] 5e8b41be5a Update all dependencies (#2930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-10 20:13:14 +03:00
SABnzbd Automation 47a2d5387d Update translatable texts
[skip ci]
2024-09-10 07:57:26 +00:00
Safihre 1e61239933 Add Bootstrap tooltips to any elements with title 2024-09-10 10:55:06 +03:00
Safihre aedbf35be8 Show file being moved during Moving phase 2024-09-07 11:10:58 +03:00
Safihre cf9540842b Config restart would always try to build URL instead of using current
#2835
2024-09-07 10:51:11 +03:00
Safihre 9205b9161b Update Linux test runners 2024-09-05 12:43:31 +03:00
Safihre 07b64b4abb Update tests for change in webpage mounting 2024-09-04 12:09:07 +03:00
Safihre c56145e424 Only mount webpages on /, no longer on /sabnzbd
Closes #2929
2024-09-04 11:39:38 +03:00
Safihre ef11aba166 Add basic system to do trigger one-time config conversions 2024-09-04 11:39:37 +03:00
SABnzbd Automation fcf03e9a59 Update translatable texts
[skip ci]
2024-09-03 09:06:42 +00:00
renovate[bot] 6662065bb1 Update all dependencies (#2928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-03 12:05:52 +03:00
SABnzbd Automation 4973672892 Update translatable texts
[skip ci]
2024-08-30 12:47:50 +00:00
bt90 efa73a52e1 Add doctype to login page (#2927) 2024-08-30 14:47:02 +02:00
SABnzbd Automation 82098a6228 Update translatable texts
[skip ci]
2024-08-26 02:47:15 +00:00
renovate[bot] 07250aa355 Update all dependencies 2024-08-26 02:46:28 +00:00
Safihre 46caa8b33f Add Docker to CPU label 2024-08-19 20:21:19 +02:00
Safihre b0564c1bab Small style fixes for the Config 2024-08-19 11:42:12 +02:00
SABnzbd Automation 3c8a85ff35 Update translatable texts
[skip ci]
2024-08-19 09:28:34 +00:00
Safihre 656c329912 Update version to 4.4.0-develop 2024-08-19 11:27:46 +02:00
SABnzbd Automation 983253908c Update translatable texts
[skip ci]
2024-08-19 01:20:50 +00:00
renovate[bot] cef0eeb25b Update all dependencies 2024-08-19 01:20:10 +00:00
Safihre a9eace759f increase_bad_articles_counter should be called before register_article 2024-08-16 22:23:14 +02:00
Safihre ad0e7bf5df Prevent excessive newswrapper data buffer size
Closes #2895
2024-08-16 17:25:57 +02:00
Safihre bea348232a Do not use article_queue when resetting newswrapper
Relates to #2866
2024-08-16 16:50:28 +02:00
jcfp 1519dbc554 Remove pyfakefs workarounds and put its new apply_umask option to good use (#2922) 2024-08-16 15:44:52 +02:00
SABnzbd Automation 297455cd35 Update translatable texts
[skip ci]
2024-08-12 02:04:47 +00:00
renovate[bot] 56b68024db Update all dependencies 2024-08-12 02:04:06 +00:00
SABnzbd Automation 09aa09a55b Update translatable texts
[skip ci]
2024-08-09 17:46:39 +00:00
f1d134fe2e Deobfuscate subtitles (#2903)
* deobfuscate_subtitles

* deobfuscate_subtitles: unit test aka pytest

* deobfuscate_subtitles: unit test aka pytest

* deobfuscate_subtitles: no reanem is first part of filename is the samen

* deobfuscate_subtitles: no reanem is first part of filename is the samen

* deobfuscate_subtitles: no reanem is first part of filename is the samen

* deobfuscate_subtitles: more structured unit test method

* deobfuscate_subtitles: back to basic testing method

* deobfuscate_subtitles: cleanup

* deobfuscate_subtitles: cleanup

* deobfuscate_filenames.test_first_file_is_much_bigger() improved

* deobfuscate_subtitles(): checks on biggest file and srt files. input can be directory or filelist.

* rename to clearly_one_biggest_file()

* WIP on develop

* accept work by safihre

* do nothing when not one_file_is_biggest

* a lot of cleanup, also with help of the walrus

* a lot of cleanup, also with help of the walrus

* fix typo's in test_deobfuscate_filenames.py

* Update sabnzbd/postproc.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* handle review comments

* handle review comments

* remove import glob

* remove special underscore support. Add srt deob info into GUI-history

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-08-09 19:45:57 +02:00
Safihre 621d586c2f Reduce timeouts during happyeyeballs and others 2024-08-09 10:01:21 +02:00
Safihre 4966f9c753 Update sabctools to 8.2.5 2024-08-09 09:42:57 +02:00
SABnzbd Automation 059d82f6f0 Update translatable texts
[skip ci]
2024-08-05 00:18:07 +00:00
renovate[bot] bca41db6b7 Update all dependencies 2024-08-05 00:17:22 +00:00
renovate[bot] 613ba0b05f Update dependency setuptools to v72 2024-07-29 03:45:46 +00:00
renovate[bot] 5f3b03ed87 Update all dependencies 2024-07-29 02:12:43 +00:00
SABnzbd Automation f6fe801000 Update translatable texts
[skip ci]
2024-07-28 16:31:44 +00:00
bt90 8ff34660d8 Add autocomplete attributes (#2916) 2024-07-28 10:31:03 -06:00
renovate[bot] 0c1b8dd60a Update all dependencies 2024-07-24 23:08:07 +00:00
SABnzbd Automation 8e8ee7a3ab Update translatable texts
[skip ci]
2024-07-24 22:11:38 +00:00
Safihre 9145a90e33 Update test_cert_gen for new cryptography default 2024-07-24 16:10:58 -06:00
Safihre 02b4a116dd Update AppData for 4.3.3 2024-07-16 00:06:21 +02:00
SABnzbd Automation e504b288a2 Update translatable texts
[skip ci]
2024-07-15 22:05:36 +00:00
Safihre 5128f788f0 Update text files for 4.3.3Beta2 2024-07-16 00:02:42 +02:00
Sander 044fe7a26a fix when no connection (for example IPv6-test on IPv4-only connection) (#2908)
* fix when no connection (for example IPv6-test on IPv4-only connection)

* fix when no connection (for example IPv6-test on IPv4-only connection)

* make black happy ... hopefully

* make black happy ... hopefully ... linelength 120
2024-07-15 07:27:43 +02:00
renovate[bot] 4ed2565101 Update all dependencies 2024-07-15 03:56:19 +00:00
SABnzbd Automation abbd77bac4 Update translatable texts
[skip ci]
2024-07-14 21:24:11 +00:00
Safihre 38c9a52e1d Add changes to web_host and web_port to ignored revs 2024-07-14 23:23:26 +02:00
Safihre f89114ca7e Rename cherryhost and cherryport to web_host and web_port 2024-07-14 23:23:01 +02:00
Safihre 773d567eed Skip propagation delay calculation if delay is set to 0
Since OptionNumber doesn't allow empty values
2024-07-14 23:19:05 +02:00
Safihre ee717b679e Set limits to number-input types that were missing them 2024-07-13 19:39:53 +02:00
Safihre f50810fb58 Remove article from TryList when resetting article Queue
When we reset the Server's Article-queue, we should retry that article again on that server.
2024-07-10 20:48:06 +02:00
jcfp 08b1b20b34 fix filesystem permission test for pyfakefs 5.4.0+ (#2905) 2024-07-10 16:16:18 +02:00
SABnzbd Automation edca79af83 Update translatable texts
[skip ci]
2024-07-08 13:11:04 +00:00
Safihre dd5dcd0ec9 Update text files for 4.3.3Beta1 2024-07-08 15:10:22 +02:00
Safihre 820824e443 Disable failing test until #2883 is fixed 2024-07-08 13:47:01 +02:00
Safihre 4c2dfdee43 Correctly handle the difference between no category and Default
Closes #2902
2024-07-08 13:47:00 +02:00
Safihre ece4437c3a General changes to sanitization functions 2024-07-08 13:46:59 +02:00
renovate[bot] 74daa15ce4 Update dependency certifi to v2024.7.4 (#2904)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 08:04:01 +02:00
renovate[bot] 4f81bc8a26 Update all dependencies (#2901)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-02 22:10:07 +02:00
jcfp e77d15f75e don't bother looking up a public address if the local ipv6 is link-local (#2899) 2024-06-29 10:16:12 +02:00
Sanderandsander 8668852574 make WIN64 also true if on ARM64 (#2893)
Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2024-06-25 07:03:18 +02:00
renovate[bot] 7e944f393e Update winrt dependencies to v2.1.0 (#2891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 15:29:58 +02:00
renovate[bot] 1646fbfd17 Update all dependencies (#2890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 06:52:59 +02:00
Safihre 72b0521325 Correct crash in Notifications page
Closes #2887
2024-06-19 21:11:03 +02:00
renovate[bot] 8aa53fd43f Update all dependencies (#2882)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-17 14:22:03 +02:00
Safihre aa67edb2d9 Fix macOS CI run by pinning older Python 3.12.3 version 2024-06-17 09:25:51 +02:00
SABnzbd Automation 0054b17f41 Update translatable texts
[skip ci]
2024-06-17 07:03:09 +00:00
Safihre 2af2cc7370 Add file version information to Windows installer
#2870
2024-06-17 09:02:29 +02:00
renovate[bot] 5aa7aafebb Update all dependencies 2024-06-10 01:14:35 +00:00
Safihre 3bd0f7c1e0 Experiment to improve idle job detection
No longer rely on just length of arrays, but use fast set-comparisons.
2024-06-09 22:23:55 +02:00
Safihre 9c8d21f6db Remove warning about AppRise
Closes #2875
2024-06-09 21:22:52 +02:00
SABnzbd Automation 4947effeb7 Update translatable texts
[skip ci]
2024-06-09 19:02:22 +00:00
Safihre b8fd9e6e31 Introduce bool_conv and fix ambiguous JSON retry value in history queue 2024-06-09 21:01:32 +02:00
jcfp 2a02c93e4b Fix checkdir argument handling (#2873)
* fix checkdir argument handling

* housekeeping

* shut up black
2024-06-03 22:03:20 +02:00
SABnzbd Automation a0ef520e06 Update translatable texts
[skip ci]
2024-06-03 02:05:42 +00:00
renovate[bot] a9eb32eba6 Update all dependencies 2024-06-03 02:05:01 +00:00
SABnzbd Automation 592ef0e645 Update translatable texts
[skip ci]
2024-05-31 14:13:53 +00:00
Safihre cce53ee058 Set version to 4.3.2 2024-05-31 16:13:02 +02:00
Safihre 93755aa6d8 Update sabctools to 8.3.3 2024-05-29 16:55:12 +02:00
SABnzbd Automation b1d42c7c22 Update translatable texts
[skip ci]
2024-05-27 20:00:41 +00:00
Safihre 8286b7b830 Add pkg_resources.extern to hidden imports 2024-05-27 19:59:56 +00:00
renovate[bot] fbaa3c0420 Update all dependencies 2024-05-27 19:59:56 +00:00
SABnzbd Automation ba6c30cf24 Update translatable texts
[skip ci]
2024-05-23 08:24:29 +00:00
Safihre 3ce5679298 Update text files for 4.3.2RC2 2024-05-23 10:23:41 +02:00
jcfp 47e1d40943 set basic systemd hardening options (#2865) 2024-05-22 13:52:23 +02:00
Safihre 1687130107 Ignore shutdown exception in cheroot
Closes #2857
2024-05-22 10:20:09 +02:00
SABnzbd Automation 8e59146d60 Update translatable texts
[skip ci]
2024-05-20 00:41:49 +00:00
renovate[bot] 4b37d2772f Update all dependencies 2024-05-20 00:41:01 +00:00
thezoggy ea9d690a90 Switch discord link to vanity link. Add binhex as docker maintainer entry (#2861) 2024-05-17 07:16:25 +02:00
Safihre 3a2e967a03 Add 4.3.2 to appdata 2024-05-16 21:45:00 +02:00
SABnzbd Automation a2eb0cc2c3 Update translatable texts
[skip ci]
2024-05-16 19:44:14 +00:00
Safihre 8b9341023a Update text files for 4.3.2RC1 2024-05-16 21:39:42 +02:00
Safihre 54314c0198 Only remove Windows shortcuts on uninstall
Closes #2850
2024-05-16 21:32:53 +02:00
Safihre b0e4c4c5bf Pin paho-mqtt to 1.6.1
Closes #2855
2024-05-16 15:28:05 +02:00
Safihre 989e215acc Update sabctools to 8.2.0 2024-05-16 15:00:26 +02:00
thezoggy ba88bb15a9 Update unrar 7.01 and 7zip to 24.05 (#2860)
* Update unrar to 7.01

* Upgrade 7zip to 24.05
2024-05-16 09:10:14 +02:00
SABnzbd Automation 0cac0d942c Update translatable texts
[skip ci]
2024-05-15 11:04:15 +00:00
Chris Caron b24a9ee781 Added tests cases to wrap calls to the Apprise integration (#2856)
* Added tests cases to wrap calls to the Apprise integration

* workaround to default config getting lost from test_misc.py

* 100% test coverage in send_apprise()
2024-05-15 13:03:26 +02:00
SABnzbd Automation 25ae29235f Update translatable texts
[skip ci]
2024-05-13 01:51:57 +00:00
renovate[bot] a8d4de2d3d Update all dependencies 2024-05-13 01:51:12 +00:00
SABnzbd Automation ccb3e0522c Update translatable texts
[skip ci]
2024-05-09 20:56:42 +00:00
Safihre a9f1838b52 Update History Retention wording 2024-05-09 22:55:27 +02:00
SABnzbd Automation d744c293fb Update translatable texts
[skip ci]
2024-05-09 20:49:42 +00:00
Safihre 94848979ad Add disable_archive for users that want to always skip it
Relates to #2848
2024-05-09 22:47:31 +02:00
SABnzbd Automation 2732326b3d Update translatable texts
[skip ci]
2024-05-06 00:22:01 +00:00
renovate[bot] ea8328c199 Update all dependencies 2024-05-06 00:21:22 +00:00
Safihre f1e42707a0 Update appdata for 4.3.1 2024-05-03 17:00:20 +02:00
SABnzbd Automation c1bdc3abff Update translatable texts
[skip ci]
2024-05-03 13:29:51 +00:00
Safihre 5cbb569b38 Update text files for 4.3.1 2024-05-03 15:28:03 +02:00
Safihre d4a3f0ea79 Correct missing winrt and apprise imports on macOS/Windows builds 2024-05-03 14:04:00 +02:00
SABnzbd Automation b31fe2cf49 Update translatable texts
[skip ci]
2024-05-01 19:43:17 +00:00
Safihre 65d748fc9f Update text files for 4.3.0 2024-05-01 21:42:27 +02:00
Safihre ab2da15bc9 Add SAB_API_KEY and SAB_API_URL to script environment variables 2024-04-29 21:45:00 +02:00
renovate[bot] bf8bef3cd0 Update all dependencies to v2.0.1 2024-04-29 07:23:08 +00:00
renovate[bot] adbe2f3c96 Update all dependencies 2024-04-29 02:18:10 +00:00
Safihre dadb8ee71b Add version 4.3.0 to appdata 2024-04-24 12:11:24 +02:00
SABnzbd Automation 7d30f12532 Update translatable texts
[skip ci]
2024-04-24 10:11:10 +00:00
Safihre 9c41cbd2f3 Update text files for 4.3.0RC2 2024-04-24 12:10:27 +02:00
Safihre 5ce9a0c17d Update cheroot to 10.0.1 2024-04-24 08:53:36 +02:00
Safihre 7b2d2df299 Prevent crash on invalid server expiration date 2024-04-24 08:53:36 +02:00
renovate[bot] 285ff00c12 Update all dependencies 2024-04-22 01:25:16 +00:00
SABnzbd Automation 04ca95cc83 Update translatable texts
[skip ci]
2024-04-21 18:20:26 +00:00
Chris Caron 3b25a07522 drop check for apprise_prio as it's not applicable (#2838) 2024-04-21 20:19:44 +02:00
SABnzbd Automation 14aa449c35 Update translatable texts
[skip ci]
2024-04-19 12:14:24 +00:00
Safihre d88c035c23 Correct reading of startup shortcut setting on Windows 2024-04-19 14:13:23 +02:00
SABnzbd Automation 6d2d90b1e5 Update translatable texts
[skip ci]
2024-04-16 08:47:17 +00:00
Safihre e2ca39fb36 Update text files for 4.3.0RC1 2024-04-16 10:46:26 +02:00
Safihre 6a37780b8e Create loop right away, so socks5 proxy doesn't break it 2024-04-16 10:42:50 +02:00
SABnzbd Automation 146f33f38e Update translatable texts
[skip ci]
2024-04-16 08:30:17 +00:00
Safihre c6c26c5de4 Update Python to 3.12.3 2024-04-16 10:27:31 +02:00
Safihre 262cc8dbbd Limit pyfakefs 2024-04-14 19:20:13 +00:00
renovate[bot] 5bec8e99a5 Update all dependencies 2024-04-14 19:20:13 +00:00
Safihre 2e0e6749ca Ignore jaraco.collections updates in renovate 2024-04-14 20:48:14 +02:00
SABnzbd Automation c0ef18e8b3 Update translatable texts
[skip ci]
2024-04-14 18:19:47 +00:00
Safihre 52173804f1 Ignore jaraco.context updates in renovate 2024-04-14 20:18:58 +02:00
Safihre 2d8cf69140 Prevent Queue flicker if just single item deleted 2024-04-03 15:36:37 +02:00
Safihre e2603d74ca Show Apprise version in Config 2024-04-03 14:03:48 +02:00
SABnzbd Automation 9df9238d56 Update translatable texts
[skip ci]
2024-04-01 01:09:30 +00:00
renovate[bot] b697165392 Update all dependencies 2024-04-01 01:08:51 +00:00
SABnzbd Automation 16bfcc27d8 Update translatable texts
[skip ci]
2024-03-29 13:25:52 +00:00
Safihre be3f47539d Update text files for 4.3.0Beta1 2024-03-29 14:25:01 +01:00
Safihre f3fd63cd70 Update Multipar to v1.3.3.2 2024-03-29 14:25:00 +01:00
SABnzbd Automation aafdf7620e Update translatable texts
[skip ci]
2024-03-29 13:17:06 +00:00
thezoggy 4f3b0541eb Unrar/7zip updates for Windows/MacOS (#2814)
* unrar 7.00

* 7zip 24.03b
2024-03-29 14:16:24 +01:00
Safihre 04fb73fd4a Add extra newline to Reddit release notes 2024-03-25 08:38:35 +01:00
SABnzbd Automation b1a7924c75 Update translatable texts
[skip ci]
2024-03-25 00:53:29 +00:00
renovate[bot] 4e618206a8 Update all dependencies 2024-03-25 00:52:46 +00:00
jcfp 8a510331df update appstream xml (#2828) 2024-03-20 14:30:13 +01:00
SABnzbd Automation 81035964ca Update translatable texts
[skip ci]
2024-03-18 15:39:49 +00:00
Safihre 304cf5eda0 Update text files for 4.3.0Alpha1 2024-03-18 16:38:46 +01:00
Safihre b987749291 Fix crash in file selector 2024-03-18 14:23:30 +01:00
SABnzbd Automation cc3ad230f8 Update translatable texts
[skip ci]
2024-03-18 01:14:52 +00:00
renovate[bot] e7266db3b3 Update all dependencies 2024-03-18 01:14:10 +00:00
Safihre a85f39a6e4 Check for end-of-line during NNTP status handling and safeguard status
Closes #2821 
Closes #2822
2024-03-12 13:51:16 +01:00
Safihre 14fdb93c07 Support NNTP code 220 after ARTICLE request
Closes #2817
2024-03-12 12:05:25 +01:00
SABnzbd Automation 349957b8d4 Update translatable texts
[skip ci]
2024-03-11 02:31:19 +00:00
renovate[bot] 16134c6421 Update all dependencies 2024-03-11 02:30:35 +00:00
Safihre 608d05fabc Show file icon instead of folder icon for files in browser 2024-03-06 15:33:38 +01:00
SABnzbd Automation c410e1209d Update translatable texts
[skip ci]
2024-03-06 14:28:05 +00:00
Safihre 74aefd868a Browse-button to select files on disk and pathbrowser refactor
Closes #2682
2024-03-06 15:27:11 +01:00
Safihre 55476b6594 Correct input placeholder styling in Night themes 2024-03-04 09:58:27 +01:00
renovate[bot] ad650aa6eb Update all dependencies 2024-03-04 00:12:56 +00:00
SABnzbd Automation 154d2d73ef Update translatable texts
[skip ci]
2024-03-02 20:23:59 +00:00
Safihre b171f7764f Do not log NNTP data in unknown status code warning
See #2817
2024-03-02 21:23:14 +01:00
SABnzbd Automation 30a20b549e Update translatable texts
[skip ci]
2024-03-01 08:59:50 +00:00
Safihre a3cc5e244d No need to translate Apprise 2024-03-01 08:46:48 +01:00
SABnzbd Automation 37441f598f Update translatable texts
[skip ci]
2024-02-28 20:24:28 +00:00
Safihre 8bced7cdc9 Update History Retention options to allow archiving 2024-02-28 21:09:27 +01:00
SABnzbd Automation 35d0589f46 Update translatable texts
[skip ci]
2024-02-28 13:18:26 +00:00
Safihre 5c45db3d45 Update error message in case of news server instead of usenet server 2024-02-28 14:17:27 +01:00
SABnzbd Automation 700d08c69d Update translatable texts
[skip ci]
2024-02-27 22:04:40 +00:00
Safihre 1b71c60256 Help users that enter an indexer as server by checking port 80
Closes #2802
2024-02-27 23:01:30 +01:00
Safihre 8cf7d812ab Italian was missed as NSIS language 2024-02-27 13:53:52 +01:00
Safihre 627264affd Cryptography no longer requires special handling for macOS binary 2024-02-27 13:39:21 +01:00
Safihre 674502323b Force universal2 compilation for Cheetah 2024-02-27 13:10:04 +01:00
Safihre 34a9d751b8 Update requirement cheetah3 to CT3
https://cheetahtemplate.org/news.html#id4
2024-02-27 12:34:29 +01:00
SABnzbd Automation 5b252efcf0 Update translatable texts
[skip ci]
2024-02-26 15:33:19 +00:00
Safihre 6756f2ba2e Move servertests to api 2024-02-26 16:32:18 +01:00
Safihre 3c0e89802e Archive option was ignored if categories were supplied
Thanks @thezoggy
2024-02-26 13:30:35 +01:00
renovate[bot] e55a95db39 Update all dependencies 2024-02-26 01:18:54 +00:00
SABnzbd Automation 80cd64b4ba Update translatable texts
[skip ci]
2024-02-25 19:12:11 +00:00
Safihre 962642b0d0 Archive by default when deleting items without specific archive= set 2024-02-25 20:11:23 +01:00
SABnzbd Automation 641f353c84 Update translatable texts
[skip ci]
2024-02-23 20:30:05 +00:00
Safihre d598bc0a79 Add typing to api.py 2024-02-23 20:52:04 +01:00
Safihre 153041c431 Disable backup_for_duplicates for new installations
Since we will have the archive
2024-02-23 16:19:06 +01:00
Safihre 582a40599a Improve wording of the delete confirmation 2024-02-23 16:19:06 +01:00
Safihre 6e21f14ae9 Add option to skip archive to purge actions 2024-02-23 16:19:06 +01:00
Safihre a4540b8deb Allow moving to archive 2024-02-23 16:19:06 +01:00
Safihre fe10c7daad Enable Archive mode 2024-02-23 16:19:06 +01:00
Safihre cd4ee1eee9 Add toggle for Archive to History 2024-02-23 16:19:06 +01:00
SABnzbd Automation 54ec05d63e Update translatable texts
[skip ci]
2024-02-23 14:04:48 +00:00
Safihre da7a74ee58 Correct translatable texts about connection threads 2024-02-23 15:03:45 +01:00
SABnzbd Automation 72d08f60b2 Update translatable texts
[skip ci]
2024-02-23 13:44:49 +00:00
Safihre 4e6878972e Reduce Server test timeout to 10s
Unless otherwise specified
Related to #2802
2024-02-23 14:44:04 +01:00
Safihre f5efa5e93d Refactor handling of multiple comma separated values in the API 2024-02-20 16:23:33 +01:00
Safihre 179f765ca0 Refactor part of database.py
Use autocommit and skip unnecessary checks on every connect
2024-02-20 12:42:48 +01:00
SABnzbd Automation 6a8f78ec23 Update translatable texts
[skip ci]
2024-02-19 21:06:30 +00:00
Shane Mc Cormack f46e669eeb Handle NNTP error code 451 (#2808)
* Handle error code 451.

This is used by some servers to show that an article was intentionally removed.
Fix #2807

* Add a warning when an unknown status code is given for an article.

* Make warning message translatable.
2024-02-19 22:05:44 +01:00
SABnzbd Automation 1c3188a3bb Update translatable texts
[skip ci]
2024-02-19 14:35:52 +00:00
Safihre a7fe030557 Update all dependencies 2024-02-19 15:35:10 +01:00
Safihre dacadfc59e Notify users of sabnzbd-notify.py that they don't need it anymore 2024-02-16 16:30:31 +01:00
SABnzbd Automation aa01855ac3 Update translatable texts
[skip ci]
2024-02-16 15:19:09 +00:00
Safihre 2d9b91eff5 Add link to Apprise documentation section 2024-02-16 16:18:26 +01:00
Safihre d2c6c6e564 Remove parsing of Group command code
Since we never request it.
2024-02-16 12:33:00 +01:00
SABnzbd Automation a11a4d1aee Update translatable texts
[skip ci]
2024-02-16 11:29:17 +00:00
Chris CaronandSafihre ad43a18f59 Apprise Integration (#2796)
* Basic Apprise Integration

* added try/catch

* comments/code review adapted

* refactored get_target() to better work with walrus operator

* Added explicit requests and markdown dependancies

* requests-oauthlib dep's added

* Updates

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-02-16 12:28:30 +01:00
SABnzbd Automation b1a9ff708c Update translatable texts
[skip ci]
2024-02-14 13:44:45 +00:00
Safihre 97a01b302f Replace History delete-confirmation by modal
Preparing for Archive function
2024-02-14 14:13:55 +01:00
Safihre c22a73a98d Replace Queue delete-confirmation by modal 2024-02-14 13:16:18 +01:00
renovate[bot] bc9a7a0eb7 Update dependency setuptools to v69.1.0 2024-02-12 03:48:44 +00:00
renovate[bot] b35a737d97 Update all dependencies 2024-02-12 01:23:25 +00:00
thezoggyandSafihre 760364d4c7 Add missing tooltips (#2800)
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-02-09 09:50:59 +01:00
Safihre e4ff047c6e Update log message about version check 2024-02-06 10:16:03 +01:00
Safihre 833219d5e5 Update standby command on macOS 2024-02-05 13:24:35 +01:00
Safihre eed1ab3ce3 Use --no-dependencies during CI 2024-02-05 08:40:40 +01:00
renovate[bot] c9a427bf8b Update all dependencies 2024-02-05 01:20:36 +00:00
SABnzbd Automation 6b4d7bde71 Update translatable texts
[skip ci]
2024-02-04 16:45:24 +00:00
jcfp 96442a3578 improve happyeyeballs tests (#2797) 2024-02-04 17:44:40 +01:00
jcfp 60e1dfb380 don't assume the test host has an ipv4 address (#2795) 2024-02-03 12:42:55 +01:00
SABnzbd Automation deaa150ab4 Update translatable texts
[skip ci]
2024-02-02 12:26:32 +00:00
Safihre ca649a31a4 Remove Send Group option
Closes #2715
2024-02-02 13:25:49 +01:00
SABnzbd Automation a2e514c10d Update translatable texts
[skip ci]
2024-02-01 10:53:37 +00:00
Safihre 0577a64ae3 Wrong archive password is used for Retry
Closes #2790
2024-02-01 11:52:46 +01:00
SABnzbd Automation 1a69842871 Update translatable texts
[skip ci]
2024-01-29 15:34:46 +00:00
Safihre 992c6c71b0 Only attempt Windows Toasts on Windows 10 and above 2024-01-29 16:08:35 +01:00
SABnzbd Automation bad0914e3c Update translatable texts
[skip ci]
2024-01-29 04:58:42 +00:00
renovate[bot] 8495a234e8 Update all dependencies 2024-01-29 04:57:58 +00:00
Safihre 3faa6577df Use setup-python way of caching pip packages
Our previous action is no longer supported
2024-01-26 16:43:42 +01:00
Safihre f398d2a0d8 Use Renovate to update GitHub Actions 2024-01-26 16:40:50 +01:00
Safihre 335ae82a3d Remove text output formatting from API
Closes #2785
2024-01-26 16:20:44 +01:00
SABnzbd Automation 4ac15880db Update translatable texts
[skip ci]
2024-01-22 14:16:27 +00:00
Safihre fd5c2795b1 Set version to 4.3.0-develop 2024-01-22 15:15:35 +01:00
Safihre 47c71422bc Add logging which notification will be sent 2024-01-22 14:46:54 +01:00
bfb7fd92b0 Add IPv6 staging option (#2781)
* ipv6_staging: for ipv6 related stuff that is (allegedly) not yet mainstream

* ipv6_staging: separate internetspeed() ipv4 resp ipv6

* ipv6_staging: separate internetspeed() ipv4 resp ipv6

* ipv6_staging: separate internetspeed() ipv4 resp ipv6

* Move logic to internetspeed

* Add back alternative IPv6-address mapping

This reverts commit ec71d20d37.

* Usenetfarm added IPv6

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-01-22 13:15:59 +01:00
renovate[bot] bf52430da8 Update all dependencies 2024-01-22 01:31:55 +00:00
Safihre 7005b3ee86 Do not trigger Duplicate Check twice on URL's 2024-01-21 22:00:12 +01:00
Safihre 8f2ea239c5 Do not send Windows notifications if ran as Service 2024-01-21 20:35:27 +01:00
Safihre 9ee2a8a98c Add hover to Night style buttons 2024-01-19 13:56:43 +01:00
jcfp 6f0daf9d1b Use local ipv6 if public fails and is rout able (#2783)
* use local ipv6 if routable

* always try a remote lookup anyway, for statistics purposes
2024-01-19 13:01:18 +01:00
Safihre 28ed424fa8 Cache CPU name for 1 hour 2024-01-18 21:40:08 +01:00
SABnzbd Automation fe3e20b108 Update translatable texts
[skip ci]
2024-01-17 15:11:46 +00:00
Safihre 23f3b901e3 Update text files for 4.2.2RC1 2024-01-17 16:11:00 +01:00
Safihre 567608b3c4 Using password=PW resulted in PW.nzb as password
Closes #2779
2024-01-17 14:51:35 +01:00
Safihre 4ff0f94d41 Add IRC and Discord label 2024-01-17 11:59:57 +01:00
Safihre a56290489c Only request addrinfo once per internetspeed 2024-01-17 11:53:56 +01:00
Safihre aac4392f69 Handle brackets in potentical filenames in subjects
Closes #2772
2024-01-15 09:55:22 +01:00
SABnzbd Automation c130feefc5 Update translatable texts
[skip ci]
2024-01-15 02:00:46 +00:00
renovate[bot] 474bcf5f05 Update dependency more-itertools to v10.2.0 2024-01-15 02:00:04 +00:00
Safihre cf24ada3f1 Move helpful_warnings declaration so it's read as the very first 2024-01-10 16:23:07 +01:00
Safihre 7b26bb7171 Add 4.2.2 already to appdata 2024-01-10 13:32:35 +01:00
SABnzbd Automation 83d89ff05c Update translatable texts
[skip ci]
2024-01-10 09:53:14 +00:00
Safihre 7034bdcbf6 Update text files for 4.2.2 Beta 1
Closes #2776
2024-01-10 10:52:24 +01:00
Safihre 4c12da5418 Update log anonymization for new IPv4/6 logging
Closes #2775
2024-01-10 09:07:23 +01:00
SABnzbd Automation 8bf1d2bc1f Update translatable texts
[skip ci]
2024-01-10 05:54:35 +00:00
Steve Albrechtandsbalbrecht 900a99653f Move UI theme selection out of advanced settings (#2774)
* Make UI theme selection a non-advanced setting

* Call stylesheet a "theme" instead of a "skin"

---------

Co-authored-by: sbalbrecht <stpehen.b.albrecht@gmail.com>
2024-01-10 06:53:54 +01:00
Safihre f33fcfa7b1 Require only 5 characters to define a filename 2024-01-09 16:22:15 +01:00
SABnzbd Automation 130148d475 Update translatable texts
[skip ci]
2024-01-09 09:34:35 +00:00
Safihre 021f87eef3 Correct focus style of Config Night navbar 2024-01-09 10:33:45 +01:00
Safihre 8ef8788152 Correct logic error in guess_what
@jcfp This check seems very specific, are these conditions ever all True at the same time?
2024-01-08 15:34:31 +01:00
renovate[bot] 041756829a Update dependency pyinstaller-hooks-contrib to v2023.12 2024-01-08 00:42:10 +00:00
Safihre 89c7f52d84 Do not ask for feedback about categories based on Groups anymore
It's staying.
2024-01-07 21:18:00 +01:00
SABnzbd Automation c40b560d15 Update translatable texts
[skip ci]
2024-01-07 19:58:50 +00:00
Safihre 74f9391076 Explain that Retry disabled aborting due to missing articles
Closes #2765
2024-01-07 20:58:12 +01:00
SABnzbd Automation 76dab68759 Update translatable texts
[skip ci]
2024-01-07 19:48:48 +00:00
Safihre d405548825 Shutdown SABnzbd automatically during update on Windows
Closes #2766
2024-01-07 20:48:05 +01:00
Safihre b4c76f034f If duplicate is discarded during URL-fetches, no nzo_id is known yet
Closes #2771
2024-01-06 22:53:17 +01:00
Safihre cda2402d01 Fix typo in asset name of Windows release 2024-01-06 11:37:33 +01:00
Safihre 2cf9ab2620 Build using old PyInstaller so virusscanners don't get upset 2024-01-06 09:26:02 +01:00
Safihre 465f182493 Add 4.2.1 to appdata 2024-01-05 10:11:37 +01:00
SABnzbd Automation 23321a1075 Update translatable texts
[skip ci]
2024-01-05 08:54:08 +00:00
Safihre ff2b9243e9 Update text files for 4.2.1 2024-01-05 09:53:09 +01:00
Safihre 471fb7a83c Log waiting for download folder at Info level
Closes #2768
2024-01-05 09:34:28 +01:00
Safihre 0db5ae8390 Updates to table structure require commit
Closes #2769
2024-01-05 09:33:46 +01:00
SABnzbd Automation e36f60085f Update translatable texts
[skip ci]
2024-01-04 13:42:32 +00:00
Safihre 3718fc36f0 Don't block network drives, only warn against them 2024-01-04 14:41:25 +01:00
Safihre 71a41f6369 Catch None-return value from user_version database command
Relates to #2764
2024-01-04 14:06:41 +01:00
SABnzbd Automation 47a2f9a4a7 Update translatable texts
[skip ci]
2024-01-03 21:11:59 +00:00
Safihre a6f0bc0490 New release check is performed daily 2024-01-03 22:10:08 +01:00
Safihre cb7c37a836 Remove outdated certificate validation check
It was relevant in Python 2.7-days.
This was we also don't make any external HTTP calls on start-up anymore, so hopefully we upset less virus scanners.
2024-01-03 22:04:42 +01:00
Safihre e89eba08c4 Add helper function is_none 2024-01-03 15:56:09 +01:00
d5d857983d Improved IPv6 address detection (#2753)
* happyeyeballs(): you can specify the family

* happyeyeballs(): you can specify the family

* happyeyeballs(): pytest

* happyeyeballs(): measure internetspeed_ipv4 and internetspeed_ipv6

* happyeyeballs(): measure internetspeed_ipv4 and internetspeed_ipv6

* happyeyeballs(): corrected pytest in case no ipv6 in environment

* internetspeed ipv4 and ipv6

* take care when ipv6 is not working

* take care when ipv6 is not working

* take care when ipv6 is not working

* take care when ipv6 is not working

* take care when ipv6 is not working

* black formatting

* faster test-HE on ipv4-only network

* comment in unittest

* requests in requirements.txt

* use urllib, not requests

* use urllib, not requests

* logging: tell family, if specified

* logging: tell family, if specified

* Merge remote-tracking branch 'origin/ipv6_HE_speedtest_address' into ipv6_HE_speedtest_address

* Merge remote-tracking branch 'origin/ipv6_HE_speedtest_address' into ipv6_HE_speedtest_address

* cleanup of getipaddress

* cleanup of getipaddress

* cleanup of getipaddress

* cleanup of getipaddress

* Merge remote-tracking branch 'origin/ipv6_HE_speedtest_address' into ipv6_HE_speedtest_address

* Changes to PR

* Make sure the returned IP is valid

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2024-01-03 14:25:34 +01:00
SABnzbd Automation 9ab30dffd8 Update translatable texts
[skip ci]
2024-01-03 12:28:20 +00:00
Safihre 1e630c3c68 Update text files for 4.2.0 2024-01-03 13:24:44 +01:00
Safihre b2cd596401 Add copyright update to ignore-revs 2024-01-02 10:05:32 +01:00
SABnzbd Automation ef6be9d436 Update translatable texts
[skip ci]
2024-01-02 08:43:02 +00:00
thezoggy 9f6a9f9912 normalize and update copyright year 2024-01-02 09:42:17 +01:00
renovate[bot] e4c37af7b7 Update all dependencies 2024-01-01 02:12:40 +00:00
SABnzbd Automation 353e90cf6d Update translatable texts
[skip ci]
2023-12-31 20:29:06 +00:00
Safihre ecf7fb4bc4 Only check for a new release 10 min after starting and then daily
Less outgoing connections at start-up to scare virus scanners.
2023-12-31 21:26:06 +01:00
SABnzbd Automation e200a5ed78 Update translatable texts
[skip ci]
2023-12-28 19:52:08 +00:00
Safihre 5e02263ad1 Update text files for 4.2.0RC4 2023-12-28 20:51:08 +01:00
Safihre a6af810274 Remove startup logging of basic performance measurements
Has not been useful so far
2023-12-27 22:38:22 +01:00
thezoggy d9d34735da par2cmdline-turbo v1.1.1 (#2760) 2023-12-27 19:30:33 +01:00
Safihre 087bc95f80 Set default order for default and new categories 2023-12-25 22:19:03 +01:00
Safihre ff27f9832a Ask why users have set a newsgroup in their Category settings 2023-12-25 21:59:35 +01:00
SABnzbd Automation 2124e66219 Update translatable texts
[skip ci]
2023-12-25 16:13:38 +00:00
Safihre 9ae80b60b4 Move NNTP closed assignment up 2023-12-25 17:12:55 +01:00
Safihre d701c4c3f9 If connecting is slow, downloads queue would hang up to 1 min 2023-12-25 13:36:28 +01:00
SABnzbd Automation b4cc5eea66 Update translatable texts
[skip ci]
2023-12-25 01:53:23 +00:00
renovate[bot] 7cdf14c43b Update all dependencies 2023-12-25 01:52:46 +00:00
Safihre 06d086725c Add git blame ignore list 2023-12-22 13:59:18 +01:00
SABnzbd Automation a8e79d64c0 Update translatable texts
[skip ci]
2023-12-20 15:33:22 +00:00
Safihre 742c6fa5dd Update text files 4.2.0RC3 2023-12-20 16:32:34 +01:00
Safihre f4cfdc6647 All Notifications should have same default selection
And a number of type hints.
2023-12-20 15:42:02 +01:00
Safihre 43ae566053 Download stalls if nw.data limit is reached
Closes #2752
2023-12-20 10:20:06 +01:00
Safihre 063a6428f3 Add timeout to join's in shutdown code
In case of crash!
2023-12-18 08:53:14 +01:00
renovate[bot] 3e302d7c04 Update all dependencies 2023-12-18 01:52:21 +00:00
Safihre 436ceabb9e Pass integer to bytearray_malloc instead of float
Prevent silent crashes in `process_nw` that would have made us discover this sooner.
2023-12-17 23:26:34 +01:00
SABnzbd Automation 186dc6db31 Update translatable texts
[skip ci]
2023-12-16 22:18:51 +00:00
Safihre af4feba7d7 Standardize parsing of cat/pp/script input when adding NZB or URL
Closes #2750
2023-12-16 23:11:37 +01:00
SABnzbd Automation 549aac15b7 Update translatable texts
[skip ci]
2023-12-15 12:27:34 +00:00
Safihre 06d8d92dbe Remove IRC specific texts 2023-12-15 12:12:53 +01:00
SABnzbd Automation 6a8763d7ba Update translatable texts
[skip ci]
2023-12-14 20:49:37 +00:00
Safihre 521b97b7b7 Update text files for 4.2.0RC2 2023-12-14 21:48:18 +01:00
SABnzbd Automation 58c8601067 Update translatable texts
[skip ci]
2023-12-14 20:38:57 +00:00
Safihre 36609376e8 Add button to macOS notification
Closes #2749
2023-12-14 21:36:55 +01:00
Safihre 32a1c8264e Add buttons to Windows Notifications
Closes #2641
2023-12-14 21:36:13 +01:00
Safihre 06754f4ef1 Mark second test_download_sorting_single as xfail on macOS and Windows 2023-12-13 14:40:02 +01:00
Safihre 99d9b3bf94 "Disk Full" notification type was not actually used 2023-12-13 14:18:53 +01:00
Safihre ec71d20d37 Remove alternative IPv6-address mapping
Due to provider concerns
2023-12-13 11:16:51 +01:00
Safihre 2d1e88bb39 Ignore warning about old SSL/TLS settings in test_newswrapper 2023-12-12 14:28:05 +01:00
Safihre c9d30bb422 Update sabnews for current asyncio behaviour 2023-12-12 14:28:05 +01:00
SABnzbd Automation cd448082e3 Update translatable texts
[skip ci]
2023-12-12 11:00:30 +00:00
Safihre 46239dddac Update code for deprection warnings 2023-12-12 11:59:43 +01:00
SABnzbd Automation 81177fda35 Update translatable texts
[skip ci]
2023-12-11 20:35:26 +00:00
Michael Nightingale 983d623d7f Fix dirscanner async tests (#2748)
* Fix dirscanner async tests

* Use root of fake filesystem to test dirscanner

* Revert minor change
2023-12-11 21:34:42 +01:00
Safihre bdda8f4abf Correct Direct Unpack unrar output logging 2023-12-11 13:25:46 +01:00
SABnzbd Automation 94fc804394 Update translatable texts
[skip ci]
2023-12-11 01:01:21 +00:00
renovate[bot] e00d8c09e7 Update all dependencies 2023-12-11 01:00:42 +00:00
Safihre 70a40b4bdd Add duplicate_key to script environment variables 2023-12-08 21:10:47 +01:00
Safihre f806a62f01 Add change of Pre-queue parameters to changelog 2023-12-08 21:10:47 +01:00
SABnzbd Automation 71a9281b8f Update translatable texts
[skip ci]
2023-12-08 13:25:25 +00:00
Safihre a34747fbd5 Update text files for 4.2.0RC1
Yes, I used AI to generate the new release notes
2023-12-08 14:24:40 +01:00
Safihre 6b0380199b Mark test_download_sorting_single as xfail on macOS and Windows 2023-12-07 21:43:43 +01:00
Safihre 39d2f90a84 Trigger duplicate analysis if pre-queue script sets a new name 2023-12-07 21:42:43 +01:00
Safihre 7bff7651f3 Only auto-enable Direct Unpack for >100MB/s drives 2023-12-07 21:34:09 +01:00
Safihre 44bd15d519 Small change to internetspeed measurement 2023-12-07 15:49:07 +01:00
SABnzbd Automation 1ca93b03a0 Update translatable texts
[skip ci]
2023-12-06 15:56:06 +00:00
Safihre 3295142d81 Use sabctools for Internet Bandwidth measurement
Closes #2737
2023-12-06 13:44:12 +01:00
Safihre f12fdc46dc Improve stability of test_adding_nzbs_nzoids 2023-12-06 13:22:59 +01:00
Safihre fc01254fe6 Mark test_download_sorting_single as xfail on macOS and Windows 32bit 2023-12-06 12:58:47 +01:00
Safihre 8fb3368601 Add guestimate of performance test duration to hint 2023-12-06 12:46:44 +01:00
SABnzbd Automation 58facc2512 Update translatable texts
[skip ci]
2023-12-05 09:56:24 +00:00
Safihre b43c2b308b Use correct keys for Season and Episode in Smart Duplicate detection 2023-12-05 10:55:34 +01:00
renovate[bot] 1e89a0af56 Update all dependencies 2023-12-04 02:19:58 +00:00
Safihre acd3cbbf49 Correct test_validate_safedir 2023-12-03 20:02:41 +01:00
SABnzbd Automation a806521745 Update translatable texts
[skip ci]
2023-12-02 20:20:33 +00:00
Safihre 0dddaf26e0 Stricter validation on Windows to prevent network drives as Incomplete 2023-12-02 21:19:48 +01:00
Safihre cdf63a005b Python 3.8 doesn't have functools.cache so use lru_cache 2023-12-02 21:09:44 +01:00
SABnzbd Automation ca422a0af3 Update translatable texts
[skip ci]
2023-12-02 19:40:31 +00:00
Safihre a682371a91 Cache result of HappyEyeBalls 10 seconds 2023-12-02 20:39:38 +01:00
Safihre 26ef146526 Use decorator to maintain diskspace cache and HappyEyeBalls cache 2023-12-02 20:36:14 +01:00
Safihre 936ee58abb Reduce waiting time if there are no sockets to read 2023-12-01 15:11:05 +01:00
Safihre 71d8c208bc Micro-optimization of NzbQueue.is_empty 2023-12-01 14:50:07 +01:00
Safihre 2200ffa88e Use Server-specific timeout in final attempt 2023-12-01 14:34:07 +01:00
Safihre 4453316516 Server warnings were not always shown 2023-11-30 22:15:32 +01:00
Safihre b947207571 Use Server-specific timeout during HappyEyeBalls 2023-11-30 19:50:31 +01:00
SABnzbd Automation 25d29deae6 Update translatable texts
[skip ci]
2023-11-30 12:26:53 +00:00
Safihre 9abe6d6d71 Skip empty HTTP-headers in URLGrabber and skip invalid categories 2023-11-30 13:25:43 +01:00
Safihre 77dbc0a37f Check nzb backup folder only if the job is not still in the queue 2023-11-30 13:19:57 +01:00
Safihre 659117512b Give RSS feed it's own history-stage 2023-11-30 13:04:12 +01:00
SABnzbd Automation b1dbbc6a69 Update translatable texts
[skip ci]
2023-11-29 20:47:52 +00:00
Safihre 424a1c626e Add name of RSS feed to history Source
Closes #2206
2023-11-29 21:46:19 +01:00
Safihre 522666191b Indexer category was not used anymore 2023-11-29 21:46:19 +01:00
Safihre 78055ef794 Do not show propagation label in case job is Forced 2023-11-29 21:46:19 +01:00
SABnzbd Automation 0fe534c202 Update translatable texts
[skip ci]
2023-11-29 13:58:08 +00:00
Safihre 257179de31 Add ability to search Queue/History for status
Closes #2376
2023-11-29 14:57:15 +01:00
Safihre 65b57112b9 Optimize handling of propagation_delay 2023-11-29 14:57:15 +01:00
renovate[bot] 27f0b1d1f2 Update dependency cryptography to v41.0.6 [SECURITY] 2023-11-29 01:54:31 +00:00
SABnzbd Automation 6e31476c45 Update translatable texts
[skip ci]
2023-11-28 21:07:35 +00:00
Safihre bc7f0f3fb3 Update text files for 4.2.0Beta1 2023-11-28 22:06:43 +01:00
SABnzbd Automation 13eeb5164f Update translatable texts
[skip ci]
2023-11-28 14:31:50 +00:00
Safihre fc756ed23d Add smarter duplicate detection (#2736)
Restore pre-queue
2023-11-28 15:30:46 +01:00
SABnzbd Automation c150365462 Update translatable texts
[skip ci]
2023-11-27 12:18:43 +00:00
renovate[bot] 58d209059e Update dependency setuptools to v69 2023-11-27 13:12:00 +01:00
Safihre 506179b517 Remove unused sort_type from guess_what 2023-11-24 21:17:29 +01:00
SABnzbd Automation f0f4eb75df Update translatable texts
[skip ci]
2023-11-22 15:55:34 +00:00
Safihre 6c1c025668 Update text files 4.2.0Alpha3 2023-11-22 16:54:50 +01:00
SABnzbd Automation 987032b384 Update translatable texts
[skip ci]
2023-11-22 15:14:06 +00:00
Safihre d516cbf363 Correct tests and improvements for new Duplicate handling 2023-11-22 16:13:22 +01:00
Safihre 824274ac5e Trigger duplicate handling when job is removed from the queue 2023-11-22 16:13:22 +01:00
Safihre 82b1c784f4 No longer warn for duplicates by default 2023-11-22 16:13:22 +01:00
Safihre 232512b860 Let main duplicate handling handle RSS duplicates 2023-11-22 16:13:22 +01:00
Safihre 223fa421c7 Implement more sophisticated duplicate handling
[skip ci]
2023-11-22 16:13:22 +01:00
Safihre 2e5e72bfcf Label in progress bar for URL fetches
Visually more distinctive
2023-11-22 15:37:35 +01:00
Safihre 9bdb986382 Only redirect cherrypy logging to their access log
Closes #2731
2023-11-20 08:49:27 +01:00
SABnzbd Automation 901ff30e11 Update translatable texts
[skip ci]
2023-11-18 20:24:07 +00:00
Safihre 5e04599212 Revert "Simplify handling of nzo.pp"
Closes #2733
2023-11-18 21:22:45 +01:00
Safihre d3c9b7ead3 Simplify handling of nzo.pp 2023-11-13 12:33:05 +01:00
renovate[bot] 361770c34b Update all dependencies 2023-11-13 01:44:28 +00:00
SABnzbd Automation 5168f3fa97 Update translatable texts
[skip ci]
2023-11-11 22:01:41 +00:00
Safihre 94d307e198 Add simplified Sorter override, to analyse series information 2023-11-11 22:59:58 +01:00
Safihre eba6236ad2 Make sure we only return successful Happy Eyeballs results 2023-11-10 16:16:46 +01:00
Safihre d0128bd989 Use sabnzbd.filesystem functions directly 2023-11-10 13:45:56 +01:00
Safihre fbd7c0ec36 Correct Night display of Sorting page 2023-11-08 16:33:40 +01:00
SABnzbd Automation 55abac97ea Update translatable texts
[skip ci]
2023-11-08 11:38:17 +00:00
Safihre 740b94170e Prevent looping over files for unwanted extension detection 2023-11-08 12:36:57 +01:00
SABnzbd Automation c6a1a09213 Update translatable texts
[skip ci]
2023-11-07 15:33:21 +00:00
Safihre cd84d52398 End of queue script to be moved to it's own configuration menu item
Closes #2385
Setting is not copied since it's such an exotic function.
Made pre-queue script an Advanced Setting.
2023-11-07 16:32:39 +01:00
Safihre cdbad1b397 Add password as option to NzbObject creation
And another refactor of filename/work_name/final_name
2023-11-07 16:24:31 +01:00
Safihre 67e227008a Revert "Remove undocumented detection of password=XX from job name"
This reverts commit 62a057dbfb.

It is listed here: https://sabnzbd.org/wiki/advanced/password-protected-rars
Oops
2023-11-07 15:47:41 +01:00
Safihre 23cf43cac5 Replace uses of os.path.splitext with helper functions 2023-11-06 15:05:50 +01:00
Safihre 62a057dbfb Remove undocumented detection of password=XX from job name 2023-11-06 14:35:17 +01:00
renovate[bot] f2ff9ae557 Update dependency jaraco.functools to v4 2023-11-06 00:42:28 +00:00
Safihre 9ed4e46919 Update macOS workflow for new GitHub runner 2023-11-03 20:17:52 +01:00
Safihre faa71bae40 Log traceback in case of exception in __finish_connect_nw 2023-11-03 20:06:41 +01:00
Safihre bbd5d2cd6d Prevent duplicate IP's in Happy Eyeballs 2023-11-03 12:03:14 +01:00
Safihre 221e135c07 Optimize Happy Eyeballs for our use
Reduced time between connection attempts to prevent slow hosts that happened to be the first in the list to win from faster second-in-list.
Add test for our IPv6 mapping
2023-11-02 21:12:32 +01:00
Safihre 956904c0b3 Correctly implement RFC 6555/8305 (Happy Eyeballs) 2023-11-01 15:16:10 +01:00
Safihre 8590481022 Add IPv6 alternative hostname for common providers
Closes #2721
2023-11-01 09:07:42 +01:00
SABnzbd Automation 2171d0139e Update translatable texts
[skip ci]
2023-10-30 13:45:23 +00:00
Safihre 71d6aca9f8 Remove unused exceptions in servertest 2023-10-30 14:44:31 +01:00
Safihre 0125e279c0 Prevent PyWin32 warning by returning True instead of nothing 2023-10-30 12:33:57 +01:00
SABnzbd Automation b8e46ccf10 Update translatable texts
[skip ci]
2023-10-30 01:02:52 +00:00
renovate[bot] 787fef1c03 Update dependency orjson to v3.9.10 2023-10-30 01:02:09 +00:00
SABnzbd Automation 98b7a6171f Update translatable texts
[skip ci]
2023-10-27 12:41:14 +00:00
Safihre 210f254f63 Update text files for 4.2.0Alpha2 2023-10-27 14:40:22 +02:00
Safihre ecdccda1ce Remove support to upgrade from 2.3.9 and older 2023-10-27 14:40:22 +02:00
Safihre ed66ac91e0 Remove old nzo.md5packs attribute 2023-10-27 14:40:22 +02:00
SABnzbd Automation e571165c15 Update translatable texts
[skip ci]
2023-10-27 10:20:00 +00:00
Safihre 1513664b5f Lock all config dict operations
Closes #2685
2023-10-27 12:19:12 +02:00
SABnzbd Automation 0132d81c43 Update translatable texts
[skip ci]
2023-10-25 14:19:40 +00:00
Safihre 8d32da8b27 Refactor of some parts of Config saving 2023-10-25 16:06:28 +02:00
Safihre b5fbc8af86 Refactor handling of Complete vs Incomplete check
Closes #2717
2023-10-25 16:06:28 +02:00
SABnzbd Automation d0166b5a5c Update translatable texts
[skip ci]
2023-10-25 10:01:25 +00:00
renovate[bot] ada77d6970 Update all dependencies (#2716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-25 12:00:42 +02:00
Safihre 9f8758b242 Mark newshosting Happy EyeBalls tests as xfail 2023-10-25 11:18:41 +02:00
SABnzbd Automation 5ca629ebea Update translatable texts
[skip ci]
2023-10-24 18:30:36 +00:00
Safihre f9f3820652 Refactor the way we getaddrinfo and use Happy Eyeballs (#2713)
* Refactor the way we getaddrinfo and use  Happy Eyeballs

* Move tests to right directory

* Do not run Happy Eyeballs for only 1 address

* Process feedback

* Make sure we always have a canonname

* Show IP and resolved name in Status Window

* Simplify Status server updates

* Remove unused imports
2023-10-24 20:29:50 +02:00
Safihre 08e61ecf19 Build all binaries without unspecified dependencies 2023-10-23 15:44:26 +02:00
SABnzbd Automation d15f0cafce Update translatable texts
[skip ci]
2023-10-23 11:53:27 +00:00
Safihre 1b85253940 Limit recursive unpack to 2 additional levels
Closes #2714
2023-10-23 13:50:40 +02:00
Safihre b329ff007e Wrap DEF_FILE_MAX check in try/except
See #2714
2023-10-23 13:42:56 +02:00
Safihre f6918d598a Add thread name to start-up logging of Downloader 2023-10-23 12:16:36 +02:00
Safihre 0cdfdd82d4 Renovate ignored tests requirements 2023-10-23 09:04:53 +02:00
SABnzbd Automation de3649dba4 Update translatable texts
[skip ci]
2023-10-22 18:15:07 +00:00
Safihre 9ba975ac44 Remove &nbsp from translation string 2023-10-22 20:12:37 +02:00
Safihre 2b0ea92da8 Ask users why they still have Send Group enabled 2023-10-20 17:06:58 +02:00
Safihre b79a1e973d Revert removal of SABnzbd-console.exe
Sad-face.. See pyinstaller/pyinstaller/issues/8022
2023-10-20 16:26:15 +02:00
renovate[bot] 1be4cf986d Update all dependencies 2023-10-16 09:37:20 +02:00
SABnzbd Automation 18c4226b90 Update translatable texts
[skip ci]
2023-10-15 19:25:19 +00:00
Safihre 07a5ba6857 Update text files for 4.2.0Alpha1 2023-10-15 21:24:30 +02:00
Safihre 6252d02498 Changes to binary building after PyInstaller update
Correct restart on macOS binary.
Allow to be less strict about file removal.
Remove not needed zip parameter.
Remove old modifications of sys.argv.
Make sure that after restart we still log to console.
2023-10-15 21:12:15 +02:00
Safihre 11cf8c5397 Test build with PyInstaller 6.1.0 and Python 3.12 2023-10-14 23:41:19 +02:00
Safihre 1f3f4a4c85 Crashes during server connect could result in bad socket state
For example if the queue was disconnected while some threads were still connecting
For example: https://www.reddit.com/r/SABnzbd/comments/1759lha/anyone_know_what_this_could_be
2023-10-13 22:52:33 +02:00
Safihre 5bfe5967db Do not delay getting server.info
It was delayed as part of the busy_threads check
2023-10-13 22:50:10 +02:00
Safihre 476fa25a12 Restore broken fetching of scriptlog 2023-10-11 21:15:50 +02:00
Safihre 792bd20fa2 Reduce number of assembler level checks 2023-10-11 17:31:03 +02:00
Safihre 26f3cd064e Use readline instead of read in par2cmdline and Multipar handling
No longer log empty lines in external processing output.
2023-10-11 16:36:38 +02:00
Safihre 0556a84cbc Reduce locking and unlocking in DirectUnpack 2023-10-11 15:10:32 +02:00
Safihre 090871625a Remove often failing test_validate_host rules 2023-10-11 12:32:45 +02:00
Safihre 12dedb7cff Separate Queue and History multi-edit code again
#2702
2023-10-11 10:44:12 +02:00
Safihre d4187e93b2 Raise error in binary build if files we expected to remove do not exist 2023-10-09 22:28:46 +02:00
Safihre 1beb1aafd8 Update paths of files to remove from Windows binaries 2023-10-09 16:18:19 +02:00
Safihre 67c4703bab Small refactor of database.py 2023-10-09 09:29:55 +02:00
SABnzbd Automation d850c9c6e3 Update translatable texts
[skip ci]
2023-10-08 20:44:22 +00:00
Safihre 38e07b0859 Use a faster Queue that allows adding multiple items at once
See #2704
2023-10-08 22:43:30 +02:00
SABnzbd Automation ea10785160 Update translatable texts
[skip ci]
2023-10-06 08:21:15 +00:00
Safihre 16803b9f17 Remove build_history to unpack_history hack and make output consistent
`id` is only internal id, external apps cannot use it for anything and should use `nzo_id`
`script_log` is always empty
2023-10-06 10:20:18 +02:00
SABnzbd Automation b9a0cf3f76 Update translatable texts
[skip ci]
2023-10-05 09:56:39 +00:00
Safihre 71ff6b14da Remove unnecessary files and modules from Windows binaries 2023-10-05 11:55:47 +02:00
SABnzbd Automation a98b3c7e85 Update translatable texts
[skip ci]
2023-10-03 19:42:23 +00:00
Safihre 7259c25ece Force pytest to latest version and include in Renovate updates 2023-10-03 20:22:01 +02:00
Safihre 5e7154530b Add Python 3.12 to CI
Not yet for releases, as we need PyInstaller 6.0.0
2023-10-03 19:52:43 +02:00
Safihre d501cc0a23 Use simpler threading system for process_nw 2023-10-03 19:51:21 +02:00
Safihre 45606285ec Apply various fixes found by PyCharm 2023-10-02 11:29:32 +02:00
Safihre a5e860a60f Apply correct JS comparisons 2023-10-02 09:51:37 +02:00
Safihre d93333f9ef Disable Add NZB buttons while processing
Closes #2690
2023-10-02 09:02:53 +02:00
Safihre 3bd68b630a Do not update PyInstaller just yet 2023-10-02 06:37:46 +00:00
renovate[bot] 97c93a0858 Update all dependencies 2023-10-02 06:37:46 +00:00
SABnzbd Automation 8b15fe0d6a Update translatable texts
[skip ci]
2023-10-01 19:05:25 +00:00
Safihre 2d22a5f5b9 Move part of Downloader to check_assembler_levels 2023-10-01 21:04:27 +02:00
Safihre be63fbaada Only install required parts of PyObjC 2023-09-30 20:53:19 +02:00
Safihre dc6b338266 Use sabctools.bytearray_malloc in NewsWrapper
It's only a tiny bit faster
2023-09-30 20:36:00 +02:00
Safihre 9e36971151 Remove locking from part of process_nw
The remove_socket part is already locked.
2023-09-29 22:10:22 +02:00
Safihre 9dc08d16b6 Restore uudecode functionality using memview 2023-09-29 22:10:22 +02:00
Safihre 182a5412a5 Use new decoder based on memoryview
[skip ci]
2023-09-29 14:46:42 +02:00
Safihre cb15c79e4b Only remove incomplete folder if it was a failed job and del_files=1
So we don't remove jobs that have the same name that are still in the queue.
Closes #2693
2023-09-29 13:55:53 +02:00
Safihre 06e6e81779 Updates to issue template 2023-09-29 13:10:52 +02:00
Safihre 938b833954 Catch all OSErrors when trying to measure diskspeed 2023-09-29 10:22:09 +02:00
Safihre 596f069e46 Add issue templates 2023-09-29 09:11:12 +02:00
SABnzbd Automation e16a7f06d6 Update translatable texts
[skip ci]
2023-09-27 11:54:17 +00:00
Safihre 2947f2c2ff Set version to 4.2.0-develop 2023-09-27 13:53:27 +02:00
Safihre 0d33039b72 Posting to r/usenet requires a flair to be provided 2023-09-26 16:49:53 +02:00
Safihre 682f8227fd Update appdata.xml for 4.1.0 2023-09-26 15:07:29 +02:00
renovate[bot] dc1675073d Update dependency cryptography to v41.0.4 [SECURITY] 2023-09-23 10:42:06 +00:00
Safihre d71f4eb802 Switch to set for server.busy/idle_threads 2023-09-21 22:07:11 +02:00
Safihre e55756469d Switch to set for nzo.saved_articles 2023-09-21 22:07:05 +02:00
Safihre 3764b705a8 Switch to set for TryList bookkeeping 2023-09-21 22:06:59 +02:00
Safihre 1e4ef9c381 Simplify and speed up calc_age 2023-09-19 21:05:56 +02:00
Safihre 8188d8256a Lock old issues to prevent issue hijacking 2023-09-19 12:35:26 +02:00
Safihre 5fb2fcb059 Mark Downloader.decode method as static
It's even slightly faster.
2023-09-19 11:47:28 +02:00
Safihre 0bb2f677b2 Simplify if-statement in get_articles 2023-09-18 13:23:11 +02:00
Michael Nightingale 4d324de343 Only download force priority items when paused (#2679)
* Fix when downloader paused only download force priority items

* Remove resolved issue
2023-09-18 11:17:52 +02:00
Safihre 8e2972edae Mark test_api_watched_now as xfail
See #2685

This also reverts commit 8643c6b260.
2023-09-18 09:13:05 +02:00
renovate[bot] 550ff83781 Update dependency setuptools to v68.2.2 2023-09-18 04:40:14 +00:00
SABnzbd Automation db793810eb Update translatable texts
[skip ci]
2023-09-17 19:03:58 +00:00
Safihre 1fb24c5705 Use correct identifier for promo element
Closes #2683
2023-09-17 21:03:13 +02:00
SABnzbd Automation cbbdfce5cd Update translatable texts
[skip ci]
2023-09-14 15:29:57 +00:00
Safihre 8576e377fa Use correct par2cmdline parameter 2023-09-14 17:28:12 +02:00
SABnzbd Automation 0d500f443f Update translatable texts
[skip ci]
2023-09-13 19:39:47 +00:00
Safihre bed6dacff2 Detect par2cmdline-turbo instead of mt
Closes #2613
2023-09-13 21:38:11 +02:00
Safihre 8643c6b260 Add debug information to failing test_api_watched_now 2023-09-12 23:08:37 +02:00
Safihre 71e529ebe9 Remove outdated known issue about VPN use 2023-09-12 22:59:15 +02:00
SABnzbd Automation fc951b964f Update translatable texts
[skip ci]
2023-09-12 20:33:47 +00:00
Safihre 900d3d6b71 Update text files for 4.1.0RC2 2023-09-12 22:32:40 +02:00
Safihre 2b3b5e02f5 Update sabctools to 7.1.2 2023-09-12 21:19:23 +02:00
Safihre b1b75dcad2 Fail binary build if warning/error is present during test run 2023-09-12 21:18:10 +02:00
SABnzbd Automation b558b1c6b4 Update translatable texts
[skip ci]
2023-09-11 20:35:47 +00:00
Safihre 9e58b97362 Update text files for 4.1.0RC1 2023-09-11 22:34:54 +02:00
thezoggyandSafihre 1f4f4f1a5f Add par2cmdline-turbo as option for windows, still default to Multipar (#2674)
* Add par2cmdline as option for windows, still default to multipar.

* Fix tests and do not give par2cmdline long-paths on Windows

* Set enable_multipar to true

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-09-11 22:14:28 +02:00
Anthony Vanelverdinghe bc705b5563 Use "All Users" locations for shortcuts on Windows (#2677)
* Use "all users" locations for shortcuts on Windows

* Use command inside section/function

* Copy edit

* Take both locations into account
2023-09-11 10:46:34 +02:00
SABnzbd Automation 677850e18a Update translatable texts
[skip ci]
2023-09-11 01:22:19 +00:00
renovate[bot] 1f2c3af660 Update all dependencies 2023-09-11 01:21:37 +00:00
Hans Kristian Rosbach 667ffec667 Add support for finding updated 7-Zip versions on Linux (#2673) 2023-09-04 15:40:26 +02:00
renovate[bot] 9837c23daf Update all dependencies 2023-09-04 01:22:32 +00:00
Safihre ab3bef3d2f Use par2cmdline-turbo v1.1.0 for macOS release
#2613
2023-09-02 09:32:57 +02:00
Safihre 58cb710d38 Improve Night-mode display of folder selection 2023-09-01 15:34:44 +02:00
Safihre afbb340f8d Replace $ by jQuery in templates to help IDE's parse the Javascript 2023-09-01 15:26:22 +02:00
Safihre f378741152 Make server-ad release dependant 2023-09-01 12:29:32 +02:00
Safihre 9f88bda8e5 Remove old upgrade notice from release notes 2023-08-30 15:00:45 +02:00
Safihre 33ebb1593f Small walrus operator refactor 2023-08-30 15:00:27 +02:00
jcfp b0b91bd002 set per-server connection limit to 500 (#2668) 2023-08-30 11:02:58 +02:00
Safihre 77518cf1f5 Correct title in release notes 2023-08-27 22:32:55 +02:00
SABnzbd Automation 8b329ed602 Update translatable texts
[skip ci]
2023-08-27 20:04:42 +00:00
Safihre 0b27b21e75 Update text files for 4.1.0Beta1 2023-08-27 22:01:56 +02:00
Safihre d7da55c823 Update macOS Python to 3.11.5 2023-08-27 10:13:28 +02:00
SABnzbd Automation e6c15e2f73 Update translatable texts
[skip ci]
2023-08-26 19:38:23 +00:00
thezoggy c3dbd77c17 fixup dark theme handling for config/login with using auto or loading explicit night theme when set, minor dark skin fixes (#2665) 2023-08-26 21:37:43 +02:00
Safihre f7901711a9 Just skip 7zip unpack if 7zip isn't present 2023-08-25 13:39:55 +02:00
Safihre ec8fee0a75 Apply correct sanitizer in renamer
Closes #2664
2023-08-25 11:40:55 +02:00
Safihre ca6ce3af09 Small formatting change 2023-08-25 10:57:20 +02:00
Safihre 65eaf0fc76 Temporarily remove sparse file support
This reverts commit a179f2a895.

Closes #2628
2023-08-25 09:51:40 +02:00
SABnzbd Automation bfba8d10cf Update translatable texts
[skip ci]
2023-08-25 06:57:48 +00:00
Safihre 6cd89a5614 Restore Enable 7zip text 2023-08-25 08:56:55 +02:00
Safihre 16163c7c5f Do not trigger script-dir in program-dir warning incorrectly
https://forums.sabnzbd.org/viewtopic.php?p=130200
2023-08-23 14:58:03 +02:00
Safihre 0482fbed05 Experiment with Servers text-ad 2023-08-23 14:14:28 +02:00
Safihre d0f1574893 Further improvements to dark mode 2023-08-22 12:29:54 +02:00
thezoggy e64167bb99 Cancel purge log should stay on current page (#2660) 2023-08-21 06:30:03 +02:00
SABnzbd Automation 22098c5424 Update translatable texts
[skip ci]
2023-08-21 02:25:26 +00:00
renovate[bot] 273c56aa0b Update all dependencies 2023-08-21 02:24:37 +00:00
Safihre a951361fa6 Update sabctools to 7.1.1 2023-08-16 09:54:15 +02:00
SABnzbd Automation 2795c3718b Update translatable texts
[skip ci]
2023-08-14 14:59:44 +00:00
Safihre 1a365bdefd Remove unzip support
Closes #2646
2023-08-14 16:58:41 +02:00
SABnzbd Automation d3db70baab Update translatable texts
[skip ci]
2023-08-14 13:19:40 +00:00
Safihre 20324ad88b Update text files for 4.1.0Alpha1 2023-08-14 15:18:08 +02:00
Safihre 80f34bdf3e Further improve Config Dark Mode 2023-08-14 12:17:46 +02:00
renovate[bot] f2dbdb95dc Update dependency orjson to v3.9.4 2023-08-14 04:38:56 +00:00
jcfp 0e3893122d ditch call to get_unique_filename in Sorter.rename (#2653) 2023-08-12 11:33:13 +02:00
SABnzbd Automation 831ff6e3ae Update translatable texts
[skip ci]
2023-08-10 20:06:51 +00:00
Safihre b62d17cbee Convert several statements to walrus operator 2023-08-10 22:06:05 +02:00
Safihre b95d6cfca0 Filename in NZB subject should be at least 6 characters
Closes #2650 #2649
2023-08-09 15:48:06 +02:00
SABnzbd Automation d0d1876783 Update translatable texts
[skip ci]
2023-08-09 12:54:11 +00:00
Safihre df23bf21ea Add option to purge all logs from Config > Folders 2023-08-09 14:53:15 +02:00
Safihre 934561e551 Show text-ad in New Server section 2023-08-09 10:15:07 +02:00
SABnzbd Automation de6c560027 Update translatable texts
[skip ci]
2023-08-08 12:33:31 +00:00
Safihre 9c582fccc8 Small refactor of name_extractor 2023-08-08 14:32:41 +02:00
Andrew LavryshynandSafihre cab5c26e3e Add dark mode for wizard, config, and login (#2621)
* feat: add dark mode for wizard, config, and login

* combine the dark skins

* make the buttons the same as in Glitter

* load the night theme based on config setting

* Changes to darkmode

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-08-07 11:34:25 +02:00
Michael Nightingale cca6dda9e6 Fix quick check of sets with duplicate files (#2645)
* Fix quick check of sets with duplicate files

* Add explanation and example of why sorting par fileset is necessary
2023-08-07 09:48:21 +02:00
renovate[bot] 77aea23007 Update all dependencies 2023-08-07 00:26:40 +00:00
SABnzbd Automation 42c5403bbe Update translatable texts
[skip ci]
2023-08-06 05:38:59 +00:00
thezoggy b14dacd44d unrar 6.23 (#2647) 2023-08-06 07:38:14 +02:00
thezoggy abd47ddcf7 add additional common ebook/audiobook (readarr) (#2643) 2023-08-04 22:37:49 +02:00
Safihre 8611e65fc6 Update reference to SABnzbd-Team 2023-08-04 17:12:01 +02:00
SABnzbd Automation 8663fe39e3 Update translatable texts
[skip ci]
2023-08-04 12:28:34 +00:00
Ricardo Christmann 4891213a88 Fix check-all checkbox state (#2639)
* Fix check-all checkbox state

* Refactor check-all fix
2023-08-04 14:27:48 +02:00
Safihre 828ea8e61a flat_unpack was not applied for 7Zip
Closes #2631
2023-08-02 14:32:02 +02:00
Safihre f6fae7c0b8 Add comment why not all data could be written (#2634) 2023-08-02 14:05:45 +02:00
Michael Nightingale b4b446e770 Ensure all data is written to file (#2634) 2023-08-02 14:04:43 +02:00
Safihre 9ff4fdaab8 Remove small SyntaxWarninh
Thrown by Python 3.12 in `-X dev` mode.
2023-08-02 13:54:00 +02:00
renovate[bot] d3bfbb0642 Update dependency cryptography to v41.0.3 [SECURITY] 2023-08-02 08:29:36 +00:00
SABnzbd Automation 57ab0a05f7 Update translatable texts
[skip ci]
2023-07-31 01:32:12 +00:00
renovate[bot] 296aee9757 Update dependency more-itertools to v10 2023-07-31 01:31:29 +00:00
Safihre 3d8c408627 Usernames and passwords were not always sanitized from the log
Closes #2630
2023-07-26 09:51:03 +02:00
renovate[bot] 11cdb24558 Update dependency pyinstaller-hooks-contrib to v2023.6 2023-07-24 00:58:33 +00:00
Safihre 589cc69498 Convert forward slashes to backward slashes in par2 filenames
Closes #2626
2023-07-21 14:19:40 +02:00
SABnzbd Automation 6f17ab1f02 Update translatable texts
[skip ci]
2023-07-21 09:35:04 +00:00
Safihre 7cbbff727f Remove (almost) all references to unused team@sabnzbd.org 2023-07-21 11:33:51 +02:00
Ricardo Christmann daa07ed2d2 Add multi-select to history (#2607)
* Add multi-select to history

* Fix checkbox state when multi-selecting on queue and history

* Refactor multi-select feat and fix for tabbed layout

* Fix failing ci tests

* Fixes and improvements
2023-07-20 21:41:47 +02:00
Safihre b3ced3bb40 Restore Series Duplicate detection
Closes #2620
2023-07-19 15:49:01 +02:00
L2501 20127e5bcd add m4b file extension to known extensions (#2625) 2023-07-19 11:31:43 +02:00
Safihre f7a5e462b7 Update 7zip to 23.01 2023-07-17 08:57:32 +02:00
renovate[bot] 728bc723c2 Update dependency praw to v7.7.1 2023-07-17 00:37:20 +00:00
renovate[bot] b1f75ec35b Update dependency cryptography to v41.0.2 [SECURITY] 2023-07-15 01:51:06 +00:00
Safihre 1709c778a6 Remove redundant README.txt
Stupid mistake.
2023-07-10 15:27:24 +02:00
Safihre 769e110ffb Remove duplicate Reddit posting 2023-07-10 15:19:54 +02:00
Safihre a0808d2d4c Release notes were not present in releases 2023-07-10 14:43:45 +02:00
Safihre 59bd38ddc7 Correct finding of release in appdata 2023-07-10 14:23:45 +02:00
renovate[bot] 000ecb5669 Update all dependencies 2023-07-10 02:06:30 +00:00
jcfp 8525f60488 add optional xff header verification to check_access (#2611)
* add optional xff header verification to check_access

* make xff ip checking code more readable
2023-07-05 20:12:59 +02:00
Sanderandsander 24329faf5c better docker detections: works for older and newer docker versions (#2606)
* better docker detections: works for Ubuntu 18.04 and 22.04

* DOCKER = False, needed for non-POSIX

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2023-07-03 15:10:34 +02:00
renovate[bot] 4a72c6fdf9 Update all dependencies 2023-07-03 00:54:33 +00:00
jcfp 8235c3048e add a grace period for expected filenames to show up (#2609) 2023-06-29 21:30:56 +02:00
jcfp 209e9f0573 add debug output to help with failures in functional sorting test (#2608) 2023-06-28 16:22:33 +02:00
SABnzbd Automation 9455121647 Update translatable texts
[skip ci]
2023-06-28 09:00:26 +00:00
Safihre fa7a11617e Move "On failure, try alternative NZB" to Specials
Might be removed later.
2023-06-28 10:57:45 +02:00
Safihre a6c62bc118 Build binary using Python 3.11.4 2023-06-28 10:00:33 +02:00
Michael Nightingale dbf4073da4 Fix uu decoding when collapsing of lines starting with a doubled period is required (#2605) 2023-06-27 15:14:11 +02:00
renovate[bot] 552ca12bc1 Update dependency jaraco.functools to v3.8.0 2023-06-26 05:09:31 +00:00
renovate[bot] e13968eec1 Update all dependencies 2023-06-26 00:40:59 +00:00
Safihre 2ce56c8581 Add newline after link to Downloads page in Reddit post 2023-06-23 21:45:53 +02:00
jcfp 8d6cc8c86a Fix sorting for #2551 (#2598)
* fix #2551

* add test data dirs

* move sorting test data into subdir

* undo change to sabnews.create_nzb
2023-06-23 09:06:57 +02:00
Safihre 488719de1e Convert various re statements to walrus operator 2023-06-21 21:38:32 +02:00
Safihre 8cb4011a44 Check if version is present appdata before releasing 2023-06-19 15:28:07 +02:00
Safihre 9ff0bab873 Additional logging to debug Direct Unpack 2023-06-18 22:17:36 +02:00
François M 3331738f2b Add versions to appdata (#2595) 2023-06-16 19:25:09 +02:00
Safihre e768ceea96 Lock add/remove_socket in Downloader
See if we can resolve #2591
2023-06-16 15:48:54 +02:00
Safihre cb4215910c Link to Downloads page was not included in Reddit post 2023-06-16 11:49:02 +02:00
Safihre b9e014b8bd No longer * import AppKit and Foundation 2023-06-14 12:56:02 +02:00
Safihre 96f0743ce5 Update release script to post directly to r/usenet and include link 2023-06-13 14:00:25 +02:00
renovate[bot] 560766dfa0 Update all dependencies 2023-06-12 00:48:42 +00:00
thezoggy a2bbccd3ea Unable to modify Sorters (#2587) 2023-06-09 13:51:24 +03:00
Safihre 5570b804ba Correct parameter in release script to merge PR of update 2023-06-07 17:22:28 +02:00
Safihre 3ff1d4b68c Move DirScanner Lock creation 2023-06-06 17:10:01 +02:00
Safihre d19d3c382c Move ipv6_servers to be a Special bool 2023-06-06 16:53:41 +02:00
SABnzbd Automation 05a68a7506 Update translatable texts
[skip ci]
2023-06-06 14:50:57 +00:00
Safihre 9aacf4c780 Remove load_balancing option 2023-06-06 16:50:06 +02:00
Safihre 0390dc14c5 Remove test_ipv6 2023-06-06 16:32:49 +02:00
Safihre 1ee1ef836a Simplify get_server_addrinfo to just allow enabling or disabling IPv6
Closes #2553
2023-06-06 16:10:30 +02:00
SABnzbd Automation bf1080ac5a Update translatable texts
[skip ci]
2023-06-06 13:52:44 +00:00
Safihre ee4fdb9563 Remove useless AMBI_LOCALHOST 2023-06-06 15:51:45 +02:00
Michael NightingaleandSafihre a179f2a895 Write articles to correct offsets and use sparse files (#2574)
* Basic direct write implementation

* Correctly track file_position and only write continuous

* Direct write with sparse files

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-06-06 15:49:12 +02:00
Safihre b4c3a4b19f Only initialize DirScanner Lock after starting event loop 2023-06-05 15:52:34 +02:00
renovate[bot] 71e203f19c Update all dependencies 2023-06-05 02:03:53 +00:00
jcfp 07283ba9ab Fix sorting lowercasing (#2584)
* run lowercasing on season pack setname

* also subject %fn to lowercasing

* add tests

* woops
2023-06-03 16:45:41 +02:00
renovate[bot] decfb2c168 Update dependency cryptography to v41 [SECURITY] (#2583)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 22:49:13 +02:00
Safihre 71778656da Correct reference to removed_from_queue in Direct Unpacker 2023-06-02 22:05:30 +02:00
Safihre 517d6e3e1a Update tests for ppslots 2023-06-02 21:48:44 +02:00
Safihre e11e9e7201 Force full refresh after changing items-per-page
Closes #2416
2023-06-02 21:34:40 +02:00
Safihre 135b9336a4 Show active jobs post processing in tabbed layout
Closes #2580
2023-06-02 21:29:10 +02:00
Safihre e0d4d4abbd Use more reliable marker if job is still active 2023-06-02 15:36:38 +02:00
Safihre 422b4fce7b Notification Script did not get environment variables 2023-05-31 21:16:15 +02:00
Safihre e3a7226648 Move Notification Script Parameters to environment variable
Fixes #2549
2023-05-31 11:35:23 +02:00
Michael Nightingale 5b9fc86319 Fix uu decode workaround (#2573)
* Fix uu decode workaround

* Remove trailing junk test because workaround handles it
2023-05-29 14:20:01 +02:00
renovate[bot] 5afea2d3c7 Update dependency orjson to v3.8.14 2023-05-29 02:10:08 +00:00
SABnzbd Automation 5f942a6943 Update translatable texts
[skip ci]
2023-05-24 15:45:03 +00:00
Safihre 18075c5c51 Print last line in case of error
Closes #2566
2023-05-24 17:44:10 +02:00
Safihre a728225782 Automatically merge website update during release 2023-05-24 09:38:15 +02:00
Safihre 3e6ae26710 Tray icon could not be disabled on macOS 2023-05-23 21:18:49 +02:00
Safihre a8a4e442a8 Add PYTHONUNBUFFERED env variable for Python post-processing scripts 2023-05-23 20:34:38 +02:00
Safihre c16e91734d Catch all errors during rarfile header parsing
Closes #2569
2023-05-22 10:23:28 +02:00
Safihre bb9ad4b546 Disable buffering in POpen calls
Closes #2567
2023-05-22 10:10:46 +02:00
renovate[bot] 43045e5d4e Update all dependencies 2023-05-22 03:18:21 +00:00
Safihre 63c7dbdb4d Rely on POpen's text mode to handle encoding 2023-05-17 17:08:16 +02:00
Safihre ef217bba90 Only open pipe for stdin when we actually need it 2023-05-17 16:52:59 +02:00
Safihre ca9924c38f Only warn about sabctools linking if OpenSSL >= 1.1.1
Relates to #2421
2023-05-17 16:39:06 +02:00
SABnzbd Automation c3c47507e7 Update translatable texts
[skip ci]
2023-05-16 11:18:41 +00:00
Safihre dc237c752a Do not push local translations to allow modifications 2023-05-16 13:17:58 +02:00
SABnzbd Automation 08892c71b2 Update translatable texts
[skip ci]
2023-05-16 11:06:46 +00:00
Safihre 026717b7c2 Build binaries without dependencies 2023-05-16 13:05:23 +02:00
Michael Nightingale be06290f6c Addnzbfile enums and keep empty (#2554)
* Add enum result to add_nzbfile

* Do not delete invalid single file NZBs if file could not be decoded

* Move enum to constants and make it a class
2023-05-15 14:28:49 +02:00
SABnzbd Automation 9ec55478c9 Update translatable texts
[skip ci]
2023-05-15 00:42:16 +00:00
renovate[bot] 4172b4a2a6 Update all dependencies 2023-05-15 00:41:05 +00:00
Safihre 59620c2217 Remove debugging code for Downloader sleep time
Seems your solution worked @puzzledsab!
2023-05-10 21:31:15 +02:00
SABnzbd Automation c410c646b2 Update translatable texts
[skip ci]
2023-05-10 19:26:14 +00:00
Safihre 0b515996d7 Wrap Downloader in try/except
We need diagnostic info. No clue why we didn't do this before.
Relates to #2559
2023-05-10 21:24:28 +02:00
Safihre 8b9b8319a1 Warn users against using application directory as their Scripts Folder
Closes #2557
2023-05-10 21:16:49 +02:00
Safihre 161cf14519 Disabling a server during download doesn't stop it from downloading
Closes #2555
2023-05-10 10:28:18 +02:00
thezoggy c6ac09e938 Disable sorting on pattern key so you can select text on it / prevent it from moving. (#2556) 2023-05-10 06:40:53 +02:00
Safihre fde8f9d133 Allow longer binary startup during release quick-test 2023-05-08 17:04:45 +02:00
SABnzbd Automation 2bd222ca1c Update translatable texts
[skip ci]
2023-05-08 14:57:52 +00:00
Safihre 12228fe1fb Update Watched Folder text to include supported extensions
Relates to #2550
2023-05-08 16:56:32 +02:00
SABnzbd Automation c63b2592f1 Update translatable texts
[skip ci]
2023-05-08 09:52:03 +00:00
e65980258c test writing long and unicode filenames (#2542)
* test writing long and unicode filenames

* Update sabnzbd/filesystem.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* Update sabnzbd/filesystem.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* Update sabnzbd/filesystem.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* Update sabnzbd/filesystem.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* test writing long and unicode filenames

* seperate function test_filesystem_capabilities

* rename test_filesystem_capabilities to filesystem_capabilities

* rename filesystem_capabilities to check_filesystem_capabilities

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-05-08 11:50:49 +02:00
SABnzbd Automation bd0a90d2dd Update translatable texts
[skip ci]
2023-05-08 06:15:40 +00:00
renovate[bot] 33a7e92f4c Update dependency orjson to v3.8.12 2023-05-08 08:14:31 +02:00
Safihre 51d1a1994d Allow for more time to start and shutdown during testing
macOS sometimes needs more time
2023-05-03 14:53:46 +02:00
Safihre 835745e485 Remove PKG-INFO
Closes #2548
2023-05-03 14:25:03 +02:00
Safihre bcb553d9f9 Move release actions to separate build step 2023-05-03 14:22:50 +02:00
Safihre b73b8aae6a Post release notes to Reddit after release
Add praw to builder requirements
2023-05-03 14:22:50 +02:00
Safihre 51792e31a8 Add release to PR of new release 2023-05-02 10:45:48 +02:00
Safihre 636a391db3 Update appdata for 4.0.1 release 2023-05-01 21:36:13 +02:00
Safihre 57d5ed2f21 Add Windows Python 3.8 32bit to CI test
Since we also use it for the release.
2023-05-01 21:33:49 +02:00
Safihre bbb1d1d908 Update sabctools to 7.0.2 2023-05-01 21:29:19 +02:00
François M c5d8f52f03 Add releases tag (#2539)
* Add 3.7.2 release tag

* Add 4.0.0 placeholder
2023-05-01 21:23:30 +02:00
renovate[bot] 1b49e4a355 Update all dependencies 2023-05-01 02:16:27 +00:00
Safihre 878cb589c3 Show a better crash on Python <3.8 2023-04-30 21:37:16 +02:00
Safihre 53ce88d3d2 Make Config link to wiki dynamic 2023-04-26 22:24:53 +02:00
Safihre 85e9bea9e7 Make sure all paths are unique in deobfuscate
Closes #2535
2023-04-26 17:22:56 +02:00
Safihre 7c7f88ebb5 Correctly set version to 4.1.0-develop 2023-04-26 17:20:11 +02:00
SABnzbd Automation cbd007b81a Update translatable texts
[skip ci]
2023-04-26 13:28:51 +00:00
Safihre ac0438de42 Set version to 4.1.0-develop 2023-04-26 15:27:31 +02:00
Safihre b73699be8d Allow 20 min for CI tests 2023-04-25 17:12:31 +02:00
SABnzbd Automation bc87b6e955 Update translatable texts
[skip ci]
2023-04-25 14:48:40 +00:00
Safihre f15155ddc9 Add Keyboard shortcut hint in the Status window
Closes sabnzbd/sabnzbd.github.io/issues/235
2023-04-25 16:47:24 +02:00
renovate[bot] 37b556012e Update all dependencies 2023-04-24 05:38:50 +00:00
SABnzbd Automation 79ba3dd874 Update translatable texts
[skip ci]
2023-04-23 19:40:19 +00:00
Safihre 28795c3158 Re-ordering Sorters was not possible after refactor
Closes #2536
2023-04-23 21:38:57 +02:00
SABnzbd Automation 935d248b53 Update translatable texts
[skip ci]
2023-04-19 14:52:21 +00:00
Safihre b2103afe30 Update text files for 4.0.0RC1 2023-04-19 16:51:05 +02:00
Safihre fcbc4e420e Add locking to __reset_nw
Relates to #2533
2023-04-19 13:21:15 +02:00
Safihre 19fcda877f Show Sorting edit details when clicking on display data 2023-04-19 12:35:34 +02:00
SABnzbd Automation 48cd93ef93 Update translatable texts
[skip ci]
2023-04-19 10:19:27 +00:00
Safihre 80fd39826b Add Quick Start suggestions when user has no Sorters defined 2023-04-19 12:17:50 +02:00
Safihre 50c7d1531b Store yEnc-detected begin and size
We will use this later, see #2526
2023-04-17 22:02:09 +02:00
SABnzbd Automation 657c6f2b7d Update translatable texts
[skip ci]
2023-04-17 05:12:52 +00:00
renovate[bot] e7484fac09 Update all dependencies 2023-04-17 05:11:37 +00:00
Safihre 613ec9c48c Try to fix armhf Snap build 2023-04-14 12:43:41 +02:00
SABnzbd Automation 322050efd8 Update translatable texts
[skip ci]
2023-04-14 09:34:13 +00:00
Safihre 5242368343 Add possibility to mark Option's as non-public
Closes #2489
2023-04-14 11:18:15 +02:00
Safihre 564151e520 Resolve HTML code issues 2023-04-13 13:39:36 +02:00
Safihre b40220cb73 Only convert old-style sorters if they were enabled 2023-04-13 13:14:18 +02:00
Safihre 2ebac74049 Correct HTML for Sorting page 2023-04-13 12:57:27 +02:00
SABnzbd Automation 8ede63a960 Update translatable texts
[skip ci]
2023-04-12 21:06:53 +00:00
Safihre 38a0cc39e6 Improve preset display for Sorters 2023-04-12 22:28:37 +02:00
SABnzbd Automation b482b61770 Update translatable texts
[skip ci]
2023-04-12 15:19:07 +00:00
Safihre 36a6f6e151 First refactor of new Sorting page
@jcfp FYI :)
2023-04-12 17:17:51 +02:00
Safihre 0c45883649 Remove Windows firewall rules on uninstall and prevent duplicating them
Closes #2528
2023-04-12 16:12:22 +02:00
renovate[bot] c243144009 Update all dependencies 2023-04-10 07:24:25 +00:00
Safihre 4e2df006e7 Use correct pip call to update pip itself on Windows 2023-04-08 22:15:55 +02:00
SABnzbd Automation 02964d3bef Update translatable texts
[skip ci]
2023-04-08 20:09:29 +00:00
Safihre c0e50aac48 Update text files for 4.0.0Beta2 2023-04-08 22:08:18 +02:00
Safihre 6c0804ba4f Correctly handle broken par2 files
Closes #2517
2023-04-07 22:39:32 +02:00
Safihre 708b13dd71 Prevent orphaned Article objects resulting in ghost files
Relates to #2521, #2517
2023-04-06 21:41:40 +02:00
Safihre eb64e054b5 Refactor par2file 2023-04-06 21:11:34 +02:00
SABnzbd Automation c42f7f930c Update translatable texts
[skip ci]
2023-04-04 17:36:21 +00:00
Sanderandsander 44c1d7306d Bigger files (50 and 100MB) for internet speed testing (#2524)
Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2023-04-04 19:35:06 +02:00
SABnzbd Automation 2413c22a51 Update translatable texts
[skip ci]
2023-04-03 07:37:32 +00:00
Safihre 31fefb4f86 Actually remove the RAR inspection traceback logging 2023-04-03 09:36:25 +02:00
renovate[bot] 745fd81aa1 Update all dependencies 2023-04-03 05:39:09 +00:00
Safihre f7bf1567c1 Add sleep between Transifex push and pull 2023-04-02 21:30:49 +02:00
Safihre 02021a09b1 Don't show traceback on RAR-inspection failure
Closes #2482
2023-04-02 21:30:49 +02:00
SABnzbd Automation 6411d32228 Update translatable texts
[skip ci]
2023-04-02 19:22:43 +00:00
Safihre 56287e8094 Small refactor of Server-methods 2023-04-02 14:16:02 +02:00
thezoggy 62f70fd628 Set min-width to make macos chrome behave like others (#2518) 2023-03-29 09:16:00 +02:00
Thomas dcca2c5821 Check for errors when creating the download path (#2516)
Fixes https://github.com/sabnzbd/sabnzbd/issues/2515.
2023-03-28 17:54:39 +02:00
dependabot[bot] d22f2296c2 Bump actions/stale from 7 to 8 (#2514)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 13:56:25 +02:00
SABnzbd Automation 2e0ea5d085 Update translatable texts
[skip ci]
2023-03-27 05:49:28 +00:00
renovate[bot] cb4526e8e2 Update all dependencies 2023-03-27 05:48:30 +00:00
puzzledsab fc3132cd77 Set maximum soft sleep time to 0.15 seconds (#2510) 2023-03-22 21:34:51 +01:00
Michael Nightingale e474db33ec Check speedlimit after each recv (#2509) 2023-03-20 21:55:10 +01:00
jcfp 6274d2b250 avoid traceback after postproc script (#2508) 2023-03-20 19:28:51 +01:00
puzzledsab d4bfdaa29e Tweak assembler queue variables for smoother download (#2505) 2023-03-20 08:47:51 +01:00
renovate[bot] 3b7f5f5ce0 Update all dependencies 2023-03-20 05:05:53 +00:00
Safihre 496e2f1840 Bring BPSMeter and Assembler check back in main loop 2023-03-19 22:23:50 +01:00
Safihre 98f3c055d7 Ignore resource fork files created by macOS
Closes #2380
2023-03-19 21:41:31 +01:00
Safihre 7df36ce8b4 switchinterval should be a positive number
Closes #2504
2023-03-17 21:32:23 +01:00
SABnzbd Automation 5deaca45c2 Update translatable texts
[skip ci]
2023-03-16 21:41:31 +00:00
Safihre e790757855 Update text files for 4.0.0Beta1 2023-03-16 22:40:22 +01:00
jcfp 46b2c6494f only save series_info in the history db for job type "tv" (#2496)
* only save series_info for job type "tv"

* make analyse_show return a dictionary
2023-03-16 22:23:45 +01:00
Sanderandsander c4216a4075 Deobfuscate filenames ON by default (#2493)
* Deobfuscate ON by default

* Correct data test set: filename that is not obfuscated. Except test_par2file

* Correct data test set: filename that is not obfuscated. Except test_par2file

* Commented out test in test_par2file.py

* Commented out test in test_par2file.py

* assert for unicode_rar 我喜欢编程 now working too

---------

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2023-03-15 22:31:09 +01:00
SABnzbd Automation 375412aa42 Update translatable texts
[skip ci]
2023-03-15 17:04:36 +00:00
thezoggy 895ac56eb3 change regex for hash from md5 to more generic to catch more hashes (ex: apikey in rss feed), and hide email_from as well (#2499) 2023-03-15 18:03:22 +01:00
SABnzbd Automation c593388ec6 Update translatable texts
[skip ci]
2023-03-14 07:05:56 +00:00
jakepez 1c6960fe44 Corrected msgids - msgid "Pause * prioirty jobs" spelling error (#2501)
* Corrected msgid spelling error

* Reverted change to en.po as requested
2023-03-14 08:04:53 +01:00
Safihre e7ac2ffd6c Broaden renovate trigger window 2023-03-13 12:49:27 +01:00
SABnzbd Automation df35e54fba Update translatable texts
[skip ci]
2023-03-10 20:37:03 +00:00
puzzledsab 15f757ae04 Make cleanup_list use scandir and keep main nzb directory even if it's empty (#2497)
* Make cleanup_list use scandir and keep main nzb directory even if it's empty

* Use entry.path
2023-03-10 21:35:45 +01:00
Safihre b7dc15099c Change quote style of Stale action condition 2023-03-10 08:38:37 +01:00
jcfp dc33c67f48 fix extra info fields for pre-q scripts (#2494) 2023-03-09 17:34:38 +01:00
SABnzbd Automation 89fb517fd1 Update translatable texts
[skip ci]
2023-03-09 13:06:13 +00:00
jcfp 51eb94dbe9 Sorter fixes (#2492)
* fix typos (closes #2488)

* fix logic errors in prepare_extraction_path (closes #2490, closes #2491)
2023-03-09 14:05:01 +01:00
Safihre 03747f618f Do not run Stale action on forks 2023-03-08 09:55:12 +01:00
SABnzbd Automation 8154322448 Update translatable texts
[skip ci]
2023-03-08 08:54:04 +00:00
Safihre 7531ae2749 Replace Stale-bot by Stale-action 2023-03-08 09:52:23 +01:00
SABnzbd Automation 32515172d3 Update translatable texts
[skip ci]
2023-03-06 21:24:14 +00:00
Safihre 3b500ecf69 Update text files for 4.0.0 Alpha 3 2023-03-06 22:23:11 +01:00
SABnzbd Automation b93dd4751d Update translatable texts
[skip ci]
2023-03-06 21:14:18 +00:00
jcfpandSafihre d651f8db34 Replace series/date/movie sorters with a generic one + season pack handling (#2461)
* replace series/date/movie sorters with a generic sorter

* fix test_eval_sort on windoze

* unbreak and de-uglify the fix

* add special setting for season pack sorting

* remove unused import

* replace series/date/movie sorters with a generic sorter

* fix test_eval_sort on windoze

* unbreak and de-uglify the fix

* add special setting for season pack sorting

* remove unused import

* correct type for sort_type entries

* standardize ui

* add visual hints for drag-n-drop

* move presets directly below sort string field

* replace hex with ascii letters to avoid random occurences of (cd|e)[0-9]+

* Some styling things

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-03-06 22:13:12 +01:00
Safihre 3f8f7d21d0 Revert "Make renovate config less strict on when it runs on Monday"
This reverts commit a1d51502c4.
2023-03-06 21:38:05 +01:00
renovate[bot] 824341e396 Update all dependencies 2023-03-06 15:32:27 +00:00
SABnzbd Automation a972708d69 Update translatable texts
[skip ci]
2023-03-06 01:29:48 +00:00
renovate[bot] 47b305c83b Update all dependencies 2023-03-06 01:28:44 +00:00
SABnzbd Automation 2ec3da18f2 Update translatable texts
[skip ci]
2023-03-02 21:32:12 +00:00
Michael Nightingale 70aea9ac0c Decode articles as they are downloaded (#2476)
* Decode articles as they are downloaded

* Combine the recv and process methods

* Less cryptic futures

* Lock get_article because it can be called by multiple threads within the pool

* Add handle_process_nw_result

* Use add_socket helper

* Lock finish_connect_nw

* Add locks and remove callback

* Use same lock for updating nzo statistics

* Remove None typing

* Add downloader lock

* read_fds by index because it will never fail

* Use downloader lock
2023-03-02 22:31:11 +01:00
Safihre 38270bf4e2 Do not auto-update sabctools
We will do it manually when needed, as it also requires the constants.py value to be updated.
2023-02-28 22:00:04 +01:00
thezoggy 05d58ca0da update unrar to 6.21 (#2479) 2023-02-28 11:42:42 +01:00
Safihre 91aab54b43 Update sabctools 2023-02-28 10:40:20 +00:00
renovate[bot] 25d552c09e Update all dependencies 2023-02-28 10:40:20 +00:00
Safihre a1d51502c4 Make renovate config less strict on when it runs on Monday 2023-02-24 08:07:35 +01:00
SABnzbd Automation 883d1dfa19 Update translatable texts
[skip ci]
2023-02-22 22:05:59 +00:00
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
puzzledsabandSafihre 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
jcfpandSafihre 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
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
Safihre ff2e206229 sys.stdout and sys.stderr not defined by new PyInstaller version
Closes #2360
2022-12-06 17:06:56 +01:00
Jagandeep Brar 5f1f82257b fix: set stage_log to empty array on missing database content (#2364)
Closes #2363
2022-12-06 05:15:37 +01:00
Safihre 3df0fab793 Correctly set non-blocking mode
Relates to #2357
2022-12-05 14:03:41 +01:00
dependabot[bot] 7e7fa62c24 Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0 (#2359)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.15.4 to 4.16.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.4...v4.16.0)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 11:54:38 +01:00
renovate[bot] 6220c00dcb Update all dependencies 2022-12-05 00:40:47 +00:00
Safihre 59a3d58c0f Process feedback on Downloader optimizations 2022-12-01 09:43:35 +01:00
Safihre d8fb19c26e Use actual data_size in decoder
To be added to sabyenc3 later
2022-11-29 17:05:01 +01:00
Safihre b0530325c5 Optimize downloader loop
Increase number of pre-fetched articles.
Only update the job download statistics after completing an article instead of after every chunk
2022-11-29 14:38:54 +01:00
Safihre 734a86a248 Optimize synchronized decorator 2022-11-29 13:50:16 +01:00
Safihre a12d447d95 Optimize the has_forced_items check 2022-11-29 12:27:15 +01:00
puzzledsab e9578d9aa0 Optimize highest_server (#2350) 2022-11-28 18:07:06 +01:00
renovate[bot] 5fef185a30 Update all dependencies 2022-11-28 01:04:10 +00:00
puzzledsab ee2b2b2c3a Improve handling of unresolvable news servers (#2347)
* Trying to find cause of git bug #2345

* Try to find IP using happyeyeballs first, fall back to default if it fails

* Fix mistake

* Add host name to connection error message

* Always debug log IP address
2022-11-25 22:47:58 +01:00
Safihre 45d232e401 Scripts set as end-of-queue actions are no longer persistent
https://forums.sabnzbd.org/viewtopic.php?p=128490
2022-11-25 22:33:56 +01:00
Safihre 9a4d56e4e1 Status information was not updated on shortcut-key S
Closes #2346
2022-11-23 10:26:35 +01:00
puzzledsab 63018439c8 Refactor article.get_article (#2344)
* Refactor article.get_article

* Add some tests

* Another test

* Test tries updating

* Fix assignment mistake

* Remove debug logging from get_article
2022-11-21 07:34:20 +01:00
renovate[bot] b5fef2ecb9 Update all dependencies 2022-11-21 01:22:29 +00:00
puzzledsab fd3ece31c7 Do a more thorough check when a bad try_list is detected (#2330)
* Do a more thorough check when a bad try_list is detected

* Improve idle job check and fix DNS lookup problem

* Loop through copy of article list and move nzf.reset_try_list below the article check

Closes #2320
2022-11-16 19:51:13 +01:00
SABnzbd Automation 7aa8e3d60d Update translatable texts
[skip ci]
2022-11-16 15:42:50 +00:00
Safihre 9d71b39b31 Remove Queue/History search term exclusion as we do not support it
Closes #2342
2022-11-16 16:42:18 +01:00
Safihre 7cb09a0e0b Priority list in Add NZB window was not correct
Closes #2332
2022-11-14 16:07:41 +01:00
Safihre fa47448ddc Remove redundant has_bad_articles
Leftover of new-but-failed-quikcheck
2022-11-14 16:00:02 +01:00
thezoggy be7ae3d151 Tweak so hotkeys update both queue+history for non-tabbed layout. (#2337) 2022-11-14 15:20:07 +01:00
Kian-Meng Ang fcb3c11203 Fix typos (#2339)
Found via `codespell -S po,interfaces -L
ciph,fo,ro,nd,parm,parms,readd,reenabled,msdos,sav,tage,datas`
2022-11-14 07:21:42 +01:00
renovate[bot] c63002e145 Update dependency pyinstaller-hooks-contrib to v2022.13 2022-11-14 02:59:03 +00:00
Safihre 7758079efa Disable separateMajorMinor in Renovate config 2022-11-07 21:42:57 +01:00
Safihre 9e43cc30a7 Only run codesign import step if available 2022-11-07 21:37:00 +01:00
dependabot[bot] 40eaf15538 Bump stefanzweifel/git-auto-commit-action from 4.15.3 to 4.15.4 (#2335)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.15.3 to 4.15.4.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.3...v4.15.4)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 11:40:47 +01:00
renovate[bot] a6228b43f3 Update all dependencies 2022-11-07 05:26:12 +00:00
SABnzbd Automation b5fcc90da2 Update translatable texts
[skip ci]
2022-11-07 02:31:55 +00:00
renovate[bot] c66e80fdaf Update all dependencies 2022-11-07 02:31:21 +00:00
Safihre 7853e1990f Replace apple-actions/import-codesign-certs 2022-11-04 10:11:09 +01:00
SABnzbd Automation 9d52a335c3 Update translatable texts
[skip ci]
2022-11-04 07:58:15 +00:00
Safihre 8597784bc6 Correct tests after server timeout correction 2022-11-03 11:24:36 +01:00
Safihre 557b9ef71d Server timeouts were applied wrongly during testing
Closes #2326
2022-11-03 09:23:17 +01:00
SABnzbd Automation c7791a478a Update translatable texts
[skip ci]
2022-11-02 21:38:52 +00:00
renovate[bot] d29a20727b Update dependency cryptography to v38.0.3 [SECURITY] 2022-11-02 21:38:14 +00:00
SABnzbd Automation a14a2f6c96 Update translatable texts
[skip ci]
2022-11-01 16:26:40 +00:00
thezoggy cc402e35a1 codespell (#2321)
* ran through codespell to cleanup a bit of typos, excluded a bit to try and avoid any issues

* fix typos - may need review
2022-10-31 22:51:38 +01:00
renovate[bot] 2813c30536 Update all dependencies 2022-10-31 19:10:35 +00:00
dependabot[bot] 8bd0bdf5b2 Bump stefanzweifel/git-auto-commit-action from 4.15.2 to 4.15.3 (#2323)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.15.2 to 4.15.3.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.2...v4.15.3)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 12:28:24 +01:00
SABnzbd Automation 26a99443d7 Update translatable texts
[skip ci]
2022-10-29 18:02:15 +00:00
Safihre 6d5aa77dee Set version to 3.8.0-develop
Closes #2319
2022-10-29 20:01:22 +02:00
Safihre 5fa7bea885 Update (almost) all Python versions to 3.11 2022-10-27 08:58:28 +02:00
Safihre 62fb85a94b Update Transifex client to supported version 2022-10-25 20:16:55 +02:00
dependabot[bot] c840e3485e Bump stefanzweifel/git-auto-commit-action from 4.15.1 to 4.15.2 (#2317)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.15.1 to 4.15.2.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.1...v4.15.2)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 13:01:11 +02:00
renovate[bot] 04c72d51fd Update all dependencies 2022-10-24 01:02:55 +00:00
renovate[bot] eae1250cac Update all dependencies 2022-10-24 00:48:19 +00:00
dependabot[bot] 634801431d Bump stefanzweifel/git-auto-commit-action from 4.15.0 to 4.15.1 (#2313)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.15.0 to 4.15.1.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.0...v4.15.1)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 13:12:04 +02:00
dependabot[bot] e9a884ab39 Bump syphar/restore-virtualenv from 1.2 to 1.3 (#2312)
Bumps [syphar/restore-virtualenv](https://github.com/syphar/restore-virtualenv) from 1.2 to 1.3.
- [Release notes](https://github.com/syphar/restore-virtualenv/releases)
- [Commits](https://github.com/syphar/restore-virtualenv/compare/v1.2...v1.3)

---
updated-dependencies:
- dependency-name: syphar/restore-virtualenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 13:11:23 +02:00
renovate[bot] 40fc1511d0 Update all dependencies 2022-10-17 02:00:09 +00:00
SABnzbd Automation 8642723c77 Update translatable texts
[skip ci]
2022-10-11 18:16:02 +00:00
Safihre 15ac97e41a Update text files for 3.7.0Beta1 2022-10-11 20:15:14 +02:00
Safihre 8202ae7cf6 PyInstaller now supports Python 3.11 2022-10-10 09:27:26 +02:00
renovate[bot] 1b459460dc Update dependency pyinstaller to v5.5 2022-10-10 01:01:04 +00:00
Safihre bdf7df9ecd Fix importlib_metadata testing-requirement 2022-10-07 21:10:31 +00:00
renovate[bot] 7e55c6a79d Update all dependencies 2022-10-07 21:10:31 +00:00
thezoggy 183570aaa5 WIN: multipar 1.3.2.5 (#2308) 2022-10-05 13:21:43 +02:00
Safihre de1d66d4dd Console logging directed to stdout
Closes #2302
2022-09-26 22:21:21 +02:00
dependabot[bot] 0b27e57ad7 Bump stefanzweifel/git-auto-commit-action from 4.14.1 to 4.15.0 (#2303)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.14.1 to 4.15.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.14.1...v4.15.0)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 12:59:18 +02:00
renovate[bot] 182bbd43c5 Update all dependencies 2022-09-26 01:33:43 +00:00
Safihre cdf4d6c5fd Update README badges, include Discord 2022-09-24 22:46:13 +02:00
SABnzbd Automation 86db74c394 Update translatable texts
[skip ci]
2022-09-24 19:44:02 +00:00
Safihre 856e63794b Small refactor of database.py 2022-09-24 21:40:49 +02:00
Safihre c29a57445a Sanitize RSS-feed name when renaming
Closes #2300
2022-09-23 09:45:20 +02:00
SABnzbd Automation 4aba90ad3f Update translatable texts
[skip ci]
2022-09-22 12:53:52 +00:00
Safihre 4f2b6d4cd7 Update text files for 3.7.0Alpha1 2022-09-22 14:52:44 +02:00
Safihre 92067fa3f3 Build release using Python 3.11 RC 2
Set PYTHONNODEBUGRANGES
Use main pyinstaller branch
rustup target add aarch64-apple-darwin
2022-09-22 14:19:32 +02:00
SABnzbd Automation c26ea4ceeb Update translatable texts
[skip ci]
2022-09-22 12:13:12 +00:00
Safihre 35ccbff5b9 Update label for System load 2022-09-22 14:12:29 +02:00
SABnzbd Automation 1a265a5176 Update translatable texts 2022-09-22 10:49:38 +00:00
Safihre ef2d243fa8 Move sysload indicator to status window 2022-09-22 12:48:58 +02:00
Safihre c2b8fa59a6 Update sabyenc3 to 5.4.4
Only adds Python 3.11 wheels
2022-09-22 12:35:10 +02:00
Safihre a85f9e39bd Force-downloads can result in extra data downloaded of other jobs 2022-09-22 12:12:42 +02:00
Safihre a13f8828fb Move Server - Port setting to Advanced settings 2022-09-22 12:02:32 +02:00
Safihre 7d391b8465 Small improvement of BPSMeter.get_sums
Leftover of Python 2 days
2022-09-21 23:06:50 +02:00
Safihre dbfa7cc4eb Refactor Downloader.bandwidth_perc and bandwidth_limit usage 2022-09-21 22:49:41 +02:00
Safihre 66e99df303 Free Space Detection too strict when using Direct Unpack
Closes #2299
2022-09-21 21:41:24 +02:00
Safihre 77ecf64443 Prevent crash on disappearing Article
Closes #2295
2022-09-21 21:31:02 +02:00
Safihre f7060804b2 Set logging to info when no file given to deobfuscate
Closes #2297
2022-09-20 10:22:00 +02:00
renovate[bot] a44a1269c0 Update all dependencies 2022-09-19 01:53:27 +00:00
Safihre ac6fc37c7d Small improvements of to_units and opts_to_pp 2022-09-16 06:50:48 +02:00
Safihre 9472d65af9 Update output tests to match removed API fields 2022-09-15 22:49:36 +02:00
Safihre 1b4c07f229 Remove categories and scripts from queue-API-call
So we don't check the disk for available scripts every second
2022-09-15 14:49:20 +02:00
Safihre a645058ae1 Update Snapcraft release process 2022-09-13 16:48:28 +02:00
Safihre edec6defbb Show the custom job name in case of fetch-failure
Closes #2294
2022-09-12 22:52:44 +02:00
SABnzbd Automation 27b3a3ddef Update translatable texts 2022-09-12 13:58:44 +00:00
Safihre da0903b8a6 Link to Not-complete info on low article availability 2022-09-12 15:57:57 +02:00
renovate[bot] a49a3b45e5 Update dependency cryptography to v38 2022-09-12 05:08:14 +00:00
SABnzbd Automation b9225fb153 Update translatable texts 2022-09-12 03:09:18 +00:00
renovate[bot] 656b7f0948 Update dependency pyinstaller to v5.4.1 2022-09-12 03:08:39 +00:00
SABnzbd Automation 08b249ee09 Update translatable texts 2022-09-08 15:15:35 +00:00
Safihre 5d76ebfe6e Force push requires automation token 2022-09-08 17:14:40 +02:00
Safihre 0d53b12ade Force-push updates to translation files 2022-09-08 17:01:54 +02:00
Safihre f403e12a2a Add option to specify Backup Folder and clarify scheduler usage
Closes #2288
2022-09-08 16:54:13 +02:00
Safihre 5abce26309 Update build_release.yml
Update the actual macOS build code
2022-09-06 12:35:44 +00:00
Safihre e73cb0958f Update macOS build script 2022-09-06 12:35:44 +00:00
renovate[bot] 70070e2f1c Update dependency pyinstaller-hooks-contrib to v2022.10 2022-09-06 12:35:44 +00:00
Sanderandsander 2685f9adab more some extensions that are non-mainstream (#2285)
Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2022-09-03 16:20:59 +02:00
renovate[bot] c43e74eabd Update all dependencies 2022-08-29 01:51:48 +00:00
m0vie b0d3306209 Determine password from <meta> before running preprocessing script (#2282)
This way the environment variable SAB_PASSWORD (whose documentation
says is supplied by user OR the nzb) is filled properly and the
password is available in a preprocessing script.
2022-08-27 20:08:08 +02:00
Safihre 4aaabae109 Pin jaraco.text to lower version due to irrelevant extra dependencies 2022-08-26 11:32:02 +02:00
Safihre b8188f999e Prevent failure in TestPar2Repair if it takes more than 0 seconds
Closes #2273
2022-08-25 20:28:39 +02:00
Safihre 4dc5ceb9b1 Delete .pyup.yml 2022-08-25 13:20:50 +02:00
Safihre 4f8e5053f7 Update renovate.json (#2280) 2022-08-25 07:23:48 +00:00
renovate[bot] 3d97ce99e1 Update all dependencies 2022-08-24 16:34:41 +00:00
renovate[bot]andSafihre 8620412b3a Configure Renovate (#2277)
* Add renovate.json

* Create renovate.json

* Delete renovate.json

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-08-24 14:25:35 +00:00
SABnzbd Automation a6d07d89d0 Update translatable texts 2022-08-22 17:55:36 +00:00
Safihre a63efcefd6 Make sure also short-dates are detected as YY-MM-DD in Sorting 2022-08-22 19:54:49 +02:00
Safihre bce9207161 Update backup tests 2022-08-22 10:40:45 +02:00
SABnzbd Automation 12670dedbe Update translatable texts 2022-08-21 20:14:14 +00:00
Safihre 40393f9548 Add Create Backup to Scheduler 2022-08-21 22:13:31 +02:00
Safihre 94cae5f015 Only allow Config-backup to the Complete Folder
Closes #2261
2022-08-21 22:05:42 +02:00
Safihre 8353227f9d No longer install builder requirements during CI 2022-08-20 23:13:38 +02:00
Safihre 5c1d69b934 Run Linux CI tests on Python 3.11 2022-08-20 23:03:40 +02:00
thezoggyandSafihre fb04b58b57 selenium syntax update (#2271)
* handle sab path with spaces

* fix py3.10 win "Unable to remove cache dir"

* remove unused imports

* update selenium find_element(s) syntax

* Fix selenium_wrapper usage

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-08-19 22:25:48 +02:00
Safihre 2bb14bba2a Correct: Compressed NZB filename could exceed OS limitation 2022-08-19 13:31:33 +02:00
Safihre 91195eb21b Compressed NZB filename could exceed OS limitation
See https://www.reddit.com/r/SABnzbd/comments/wrserd/importing_nzb_files/
2022-08-19 13:15:38 +02:00
3b8d6dd3c8 detect and log fully encrypted (obfuscated) rars (#2266)
* detect fully encrypted rars

* debug.warning working, nzo.fail_msg alas is overwritten

* a bit of clean-up

* a bit of clean-up

* the real clean-up

* no intermediate variable

Co-authored-by: Safihre <safihre@sabnzbd.org>

* Shorter message

Co-authored-by: Safihre <safihre@sabnzbd.org>

* more clean-up

* unittest

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-08-17 02:00:26 +02:00
Safihreandpyup-bot ff2ab2da8d Pyup/scheduled update 2022 08 15 (#2270)
* Update setuptools from 63.4.2 to 65.0.0

* Update orjson from 3.7.11 to 3.7.12

* Update jaraco.text from 3.8.1 to 3.9.0

* Update more-itertools from 8.13.0 to 8.14.0

* Update pytz from 2022.1 to 2022.2.1

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-08-16 20:20:07 +02:00
Sanderandsander 85aed457b2 Handle Unicoded filenames add via SAB GUI (cherrypy) (#2268)
* Linux: handle Unicoded filenames add via SAB GUI

* Unittest

* Unittest

* Unittest

* Unittest

* Unittest

* Unittest more

* naming, less code

* even less code

* better unittests

* and less, less code

Closes #2267

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2022-08-15 19:57:58 +02:00
Safihre d624d1d5b6 Do not repeatedly add password to meta-password list 2022-08-14 11:36:55 +02:00
Safihre 6c6a1049ea Validation error would not be shown on Config General page
Due to #2253
2022-08-12 16:48:30 +02:00
SABnzbd Automation f380889d98 Update translatable texts 2022-08-12 14:44:22 +00:00
Sanderandsander f61df0e126 Check if host is valid: an IP address, or a name/FQDN that resolves (#2253)
* Check if host is valid: an IP address, or a name/FQDN that resolves

* Check if host is valid: an IP address, or a name/FQDN that resolves

* default to "127.0.0.1"

* default to "127.0.0.1"

* manual black

* manual black

* manual black

* based on feedback, plus back-to-basics

* based on feedback, plus back-to-basics, plus debug logging

* based on feedback, plus back-to-basics, plus debug logging

* based on feedback, plus back-to-basics, plus debug logging

* clean formatting

* clean formatting

Co-authored-by: sander <san.d.erjonkers+github@gmail.com>
2022-08-12 16:43:40 +02:00
Safihre ffca12123f Update Unrar to 6.11/6.12
Closes #2265
2022-08-12 10:49:10 +02:00
SABnzbd Automation 1077ca3753 Update translatable texts 2022-08-12 08:45:59 +00:00
Safihre c7189dbceb Graceful log sabyenc decoding (CRC/formatting) errors
Closes sabnzbd/sabyenc#62
2022-08-12 10:43:59 +02:00
SABnzbd Automation f2361c49b4 Update translatable texts 2022-08-10 06:54:38 +00:00
thezoggy f84cbb66c3 Add option to replace underscores in folder name. (#2263) 2022-08-10 08:53:54 +02:00
Safihre e45f254d19 strftime does not require explicit call to localtime 2022-08-09 21:54:04 +02:00
Safihre b6cd3c0bae Config backup filename in same format as *arr apps
See #2261
2022-08-09 21:51:58 +02:00
pyup.io bot 4a98724a35 Update setuptools from 63.3.0 to 63.4.2 (#2262) 2022-08-09 07:39:49 +02:00
SABnzbd Automation 4680fa5ae9 Update translatable texts 2022-08-05 19:19:00 +00:00
Safihre 458f4e2bdc Remove deprecation notices 2022-08-05 21:18:12 +02:00
Safihre 3357fd81c7 Add Filter and Age columns to Downloaded RSS-feed tab
Closes #2257
2022-08-03 21:58:40 +02:00
Safihre 3ebe277303 Update macOS Python version to 3.10.6 2022-08-02 22:30:26 +02:00
Safihre 29c57dce0f Remove new QuickCheck implementation
See https://github.com/sabnzbd/sabnzbd/discussions/2160
And https://github.com/sabnzbd/sabnzbd/issues/2251
2022-08-02 22:16:21 +02:00
Safihreandpyup-bot 27a9330638 Pyup/scheduled update 2022 08 01 (#2260)
* Update pyinstaller from 5.2 to 5.3

* Update setuptools from 63.2.0 to 63.3.0

* Update orjson from 3.7.8 to 3.7.11

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-08-02 20:25:31 +02:00
Safihre 4b42b1f55d Upgrade pip/wheel before installing requirements
Closes #2244
2022-07-26 09:52:58 +02:00
pyup.io bot db761395e5 Update orjson from 3.7.7 to 3.7.8 (#2250) 2022-07-26 09:51:09 +02:00
Sander 249d73e270 Deobfuscation: comments and logging (#2246)
* Comment block that explains what deobfuscation does

* get better logging (with reason of no deobfuscation), leading to other code structure

* get better logging (with reason of no deobfuscation), leading to other code structure

* get better logging (with reason of no deobfuscation), leading to other code structure

* based on feedback: comment with typical cases to the beginning of function, error logging if file is not given/found, other logical notation in if-statement
2022-07-25 22:19:11 +02:00
Safihre 5d359afedb Downloads in Checking-status were not displayed correctly
Closes #2249
2022-07-25 11:02:26 +02:00
Safihre 5e8e37e6a2 Correctly remove disable_api_key 2022-07-21 21:39:07 +02:00
SABnzbd Automation a74df6f04f Update translatable texts 2022-07-21 19:30:52 +00:00
Safihre 10991d5472 Remove replace_illegal option 2022-07-21 21:26:30 +02:00
Safihre b3206fe1db Remove enable_meta option 2022-07-21 21:24:29 +02:00
Safihre 70391ea055 Remove disable_key option 2022-07-21 21:22:19 +02:00
thezoggy 5b69155d49 Tweak hotkeys, add pagination navigation, use jquery.hotkeys (#2235) 2022-07-20 13:38:11 +02:00
pyup.io bot 941bb8adca Scheduled weekly dependency update for week 29 (#2242)
* Update setuptools from 63.1.0 to 63.2.0

* Update cherrypy from 18.7.0 to 18.8.0

* Update jaraco.functools from 3.5.0 to 3.5.1

* Update jaraco.collections from 3.5.1 to 3.5.2

* Update jaraco.text from 3.8.0 to 3.8.1

* Update jaraco.classes from 3.2.1 to 3.2.2

* Update jaraco.context from 4.1.1 to 4.1.2

* Update tempora from 5.0.1 to 5.0.2
2022-07-20 13:36:55 +02:00
Sander b5eb014084 Only pick biggest file for deobfuscation (#2241)
* Only pick biggest file for deobfuscation

* unit tests working again

* unit tests working again

* get counter nr_files_renamed right

* also deobfuscate sample and other files with same basename

* also deobfuscate sample and other files with same basename

* naming, comments

* unit test with just one small file (should get deobfuscated). Plus improved text/names.

* Moved most typical unit test (test_deobfuscate_big_file_small_accompanying_files() ) more to the top

* Moved most typical unit test (test_deobfuscate_big_file_small_accompanying_files() ) more to the top
2022-07-20 13:36:40 +02:00
jcfp ee4b9339a7 use OSType in pyfakefs instead of setting separate properties (#2243) 2022-07-19 22:36:44 +02:00
pyup.io bot 3acfe19499 Scheduled weekly dependency update for week 28 (#2239)
* Update cryptography from 37.0.3 to 37.0.4

* Update cryptography from 37.0.3 to 37.0.4

* Update pyinstaller from 5.1 to 5.2

* Update pyinstaller-hooks-contrib from 2022.7 to 2022.8

* Update orjson from 3.7.6 to 3.7.7

* Update cherrypy from 18.6.1 to 18.7.0
2022-07-12 08:09:54 +02:00
pyup.io bot 9bac23b38f Scheduled weekly dependency update for week 27 (#2237)
* Update setuptools from 62.6.0 to 63.1.0

* Update orjson from 3.7.3 to 3.7.6

* Update cffi from 1.15 to 1.15.1

* Update ujson from 5.3.0 to 5.4.0
2022-07-04 23:20:33 +02:00
Safihreandpyup-bot b028258cbd Pyup/scheduled update 2022 06 27 (#2226)
* Update cryptography from 37.0.2 to 37.0.3

* Update cryptography from 37.0.2 to 37.0.3

* Update orjson from 3.7.2 to 3.7.3

* Update chardet from 4.0.0 to 5.0.0

* Force selenium<4.3.0

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-06-28 08:48:45 +02:00
Safihre 4d442159cb Remove unused code 2022-06-22 20:17:29 +02:00
Safihre 181a91ccf6 Prevent crash if DNS lookup fails for external IPv4
Closes #2217
2022-06-21 22:31:01 +02:00
SABnzbd Automation 1c6f2e9d10 Update translatable texts 2022-06-21 07:54:26 +00:00
Safihre 244fe3b116 Remove unused translations from Glitter 2022-06-21 09:52:41 +02:00
Safihreandpyup-bot 9ee7391918 Pyup/scheduled update 2022 06 20 (#2215)
* Update setuptools from 62.4.0 to 62.6.0

* Update charset-normalizer from 2.0.12 to 2.1.0

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-06-21 08:32:28 +02:00
Safihre 2eadc3ace6 Merge osx_menu, osx_speed and win_menu into tray_icon
See also #2214
2022-06-21 08:28:09 +02:00
SABnzbd Automation 786b29c18d Update translatable texts 2022-06-19 18:38:48 +00:00
Safihre 315f787d20 Prevent scheduler crash if event is canceled that was no longer queued
https://www.reddit.com/r/SABnzbd/comments/vfa1fr/what_is_causing_this_error_its_not_harming/
2022-06-19 20:38:04 +02:00
Safihre 0347907044 Prevent crash in new Quick-check if file was already moved 2022-06-16 13:53:54 +02:00
Joulinar f2ae281195 Update sabyenc3 to 5.4.3 (#2209)
* Update requirements.txt

Update requirements sabyenc3 to new version

* Update sabyenc3 to 5.4.3

Update sabyenc3 to 5.4.2
2022-06-15 13:24:12 +02:00
Safihre a4f76d59b0 Prevent showing crash on Status window during Shutdown 2022-06-14 11:36:00 +02:00
Safihre 52a3e04eae Fix macOS cffi version and test orjson by installing build requirements 2022-06-14 11:26:25 +02:00
pyup.io bot 390abb00df Scheduled weekly dependency update for week 24 (#2208)
* Update pyinstaller-hooks-contrib from 2022.6 to 2022.7

* Update setuptools from 62.3.2 to 62.4.0

* Update pkginfo from 1.8.2 to 1.8.3

* Update orjson from 3.7.1 to 3.7.2
2022-06-14 10:58:38 +02:00
dependabot[bot] 02c50e4b17 Bump actions/setup-python from 3 to 4 (#2207)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 13:35:42 +02:00
Sander 8c8a78c0ab Less narrow exception handling with publicipv4 (#2202)
* wider exception handling

* Easier coding for easier reading

* Easier coding for easier reading

* except Exception:
2022-06-09 20:05:25 +02:00
Safihre fb75cde710 Print hashes for Synology release 2022-06-09 08:47:17 +02:00
Safihre fc855dccff Remove enable_https_verification from possible deprecation list 2022-06-07 09:31:22 +02:00
pyup.io bot 3d57def676 Scheduled weekly dependency update for week 23 (#2198)
* Update orjson from 3.6.8 to 3.7.1

* Update jaraco.text from 3.7.0 to 3.8.0
2022-06-06 22:51:42 +02:00
pyup.io bot 74d2da8857 Update pyinstaller-hooks-contrib from 2022.5 to 2022.6 (#2195) 2022-05-31 00:12:43 +02:00
Safihre 8cfd721ef6 Prevent unnecessary update API-calls when searching 2022-05-30 14:48:30 +02:00
Safihre d4e10f32e7 Added filtering for Queue (category, priority) and History (category)
Closes #1158
2022-05-30 10:55:19 +02:00
Safihre 5a7cff491d Update sabyenc3 to 5.4.2 2022-05-29 14:29:09 +02:00
puzzledsab 392ae695d0 Change variable names from completed to remaining for consistency and fix sort order (#2194) 2022-05-29 13:01:15 +02:00
SABnzbd Automation b39effc067 Update translatable texts 2022-05-28 18:23:22 +00:00
Safihre 908f4f01cf Update develop branch to 3.7.0-develop 2022-05-28 20:22:43 +02:00
Safihre 8baab13192 Additional refactor of queue sorting 2022-05-27 22:17:05 +02:00
SABnzbd Automation abb38d3e49 Update translatable texts 2022-05-27 17:50:11 +00:00
puzzledsab d0016e390a Optimize sort_queue_function (#2192) 2022-05-27 19:49:33 +02:00
puzzledsab c80012e367 Remove redundant if in _nzo_completed_cmp (#2191) 2022-05-26 22:19:31 +02:00
SABnzbd Automation 19fc60a1d8 Update translatable texts 2022-05-26 09:58:29 +00:00
puzzledsab 487c9e96ce Add sort by completedness (#2186)
* Add sort by completedness

* Change sortCompleted text and move resort code

* Update explain-auto_sort

* Split explain-auto_sort for easier translation update
2022-05-26 11:57:46 +02:00
Safihre cd337cb164 NZB files not removed when rejected by pre-queue script
Closes #2188
2022-05-24 17:25:47 +02:00
Safihre 5c15747d62 Also check for writing of special characters even if sanitize_safe is on
Relates to #2165
2022-05-24 10:39:35 +02:00
Safihreandpyup-bot 7f11e6946b Scheduled weekly dependency update for week 21 (#2189)
* Update pyinstaller from 5.0.1 to 5.1

* Update pyinstaller-hooks-contrib from 2022.4 to 2022.5

* Update setuptools from 62.2.0 to 62.3.2

* Update sabyenc3 from 5.3.0 to 5.4.0

* Update feedparser from 6.0.8 to 6.0.10

* Update ujson from 5.2.0 to 5.3.0

* Update sabyenc3 to 5.4.1

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-05-24 10:16:31 +02:00
SABnzbd Automation 8fa77691d0 Update translatable texts 2022-05-23 14:41:12 +00:00
Safihre 894e5910c3 Also allow "cat" to filter categories on history call 2022-05-23 16:40:16 +02:00
SABnzbd Automation 54f33a72c4 Update translatable texts 2022-05-23 09:26:34 +00:00
Safihre 566f90ff30 Switched noslots and noslots_total
Closes #2187
2022-05-23 11:25:57 +02:00
SABnzbd Automation debc59744f Update translatable texts 2022-05-19 10:31:16 +00:00
Safihre 33c6ac813c Update text files for 3.6.0RC2 2022-05-19 12:30:35 +02:00
Safihre 04875d07c5 Update sabyenc3 to 5.3.0 2022-05-19 12:20:01 +02:00
SABnzbd Automation 39eb594e12 Update translatable texts 2022-05-18 11:56:30 +00:00
Safihre 2561182126 Remove unused and undocumented API-calls 2022-05-18 13:46:58 +02:00
SABnzbd Automation a68ab27bac Update translatable texts 2022-05-17 08:33:00 +00:00
Safihre c27acb0e90 Warn users that we want to remove some settings 2022-05-17 10:32:02 +02:00
SABnzbd Automation 875d1ab952 Update translatable texts 2022-05-17 08:30:21 +00:00
Safihre 3496480254 Remove unused option movie_extra_folder 2022-05-17 10:29:27 +02:00
pyup.io bot 2ca79ab3b9 Scheduled weekly dependency update for week 20 (#2181)
* Update setuptools from 62.1.0 to 62.2.0

* Update puremagic from 1.12 to 1.14
2022-05-17 07:42:11 +02:00
Safihre 51ce7b657c Use directory of Default Category if the NZB-Category doesn't have one
Closes #2179
2022-05-16 13:45:31 +02:00
Safihre 67a34dcc78 Test for consistency of sabyenc3 version between code and requirements 2022-05-16 13:42:20 +02:00
Safihre 81d27ece54 Update BPS when we delay the Downloader due to full queues
Prevents "constant" speed that users see
2022-05-13 16:08:29 +02:00
Koen van Wijngaarden f3a2e54e61 Disable password manager autofill on socks5 field (#2177)
* disable password manager autofill on socks5 field

* autocomplete="off" in socks5 field
2022-05-12 23:04:59 +02:00
Safihre 1894ed72e3 Move the building of source distribution to macOS job 2022-05-12 16:51:29 +02:00
SABnzbd Automation 64bf7d541e Update translatable texts 2022-05-12 09:33:36 +00:00
Safihre 8beba13430 Update text files for 3.6.0RC1 2022-05-12 11:32:40 +02:00
Safihre 6379869d41 Also create complete directory, if it does not exists 2022-05-12 10:52:28 +02:00
Safihre 5a666a28ef Remove tr language files (empty) 2022-05-12 09:56:54 +02:00
SABnzbd Automation 3c80053010 Update translatable texts 2022-05-12 06:37:57 +00:00
jcfp 7fd4941923 Add bash completion (#2175)
* add bash completion

* restore missing return for --server
2022-05-12 08:37:15 +02:00
SABnzbd Automation b42e600285 Update translatable texts 2022-05-11 17:41:00 +00:00
SanderandSafihre df8859d49e Check filesystem capability for writing and writing filenames with special characters (#2167)
* functions to test directory for writing capabilities

* functions to test directory for writing capabilities

* use checking in postproc, and give warning if needed

* use checking in postproc, and give warning if needed

* put into function, with translatable folder names

* remove test file if still there

* better message formatting

* remove friendly directory name. Less comments

* move stuff into filesystem.py

* clean it up

* unit test for check_directory_writing_capability on tempdir

* unit test for check_directory_writing_capability on tempdir

* unit test for check_directory_writing_capability on tempdir

* unit test for check_directory_writing_capability on tempdir

* unit test for check_directory_writing_capability on tempdir

* Update sabnzbd/filesystem.py

Co-authored-by: Safihre <safihre@sabnzbd.org>

* feedback processed

* feedback processed

* feedback processed

* Merge remote-tracking branch 'origin/check_filesystem_capabilty' into check_filesystem_capabilty

# Conflicts:
#	sabnzbd/filesystem.py

* typo: uniformed on "writable"

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-05-11 19:40:19 +02:00
Safihre d62d006398 Do not show extrapar files twice in get_files API-call
Regression from the removal of QNFO tuples.
2022-05-11 14:17:03 +02:00
Safihre dadf1bdcc1 Use orjson with fallback to ujson/json 2022-05-10 15:04:30 +02:00
pyup.io bot da961b7722 Scheduled weekly dependency update for week 19 (#2174)
* Update cryptography from 37.0.1 to 37.0.2

* Update cryptography from 37.0.1 to 37.0.2

* Update more-itertools from 8.12.0 to 8.13.0
2022-05-10 03:14:53 +02:00
SABnzbd Automation 087326ed32 Update translatable texts 2022-05-06 18:59:46 +00:00
Safihre fc9f66e3e2 Update test_par2file 2022-05-06 20:59:02 +02:00
Safihre cb25e0dcb3 Add test to see if every option has a Wiki-entry
Maybe annoying, but needed.
2022-05-05 12:54:09 +02:00
Safihre 88da458c2b Allow multiple parameters to be passed to par2cmdline/Multipar
Closes #2172
2022-05-05 08:39:09 +02:00
SABnzbd Automation 705b3aa74e Update translatable texts 2022-05-04 14:30:21 +00:00
Safihre f35bfa45db Update text files for 3.6.0Beta6 2022-05-04 16:29:09 +02:00
SABnzbd Automation cc59037fbc Update translatable texts 2022-05-04 11:44:09 +00:00
Safihre 1c442128dd Small changes to osxmenu 2022-05-04 13:40:25 +02:00
Safihre d70d8d34dc Delay in test_adding_nzbs_nzoids to allow transition to History 2022-05-03 09:30:14 +02:00
Safihre 2c972995d3 UnRar on Windows escapes quotes by double quoting them 2022-05-03 09:30:14 +02:00
Safihreandpyup-bot 794f6239bb Pyup/scheduled update 2022 05 02 (#2168)
* Update cryptography from 36.0.2 to 37.0.1

* Update cryptography from 36.0.2 to 37.0.1

* Update wrapt from 1.14.0 to 1.14.1

* Update pywin32 from 303 to 304

Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-05-03 08:46:31 +02:00
SABnzbd Automation 5f498c3bb1 Update translatable texts 2022-05-02 10:52:58 +00:00
Safihre 8efce7430f Refactor queue-API data collection and XML output changes 2022-05-02 12:51:56 +02:00
SABnzbd Automation fa3bf93464 Update translatable texts 2022-04-28 20:12:24 +00:00
Safihre ff1f0986cf Remove "eta" API-fields from main queue and slots
Please let me know if this is a problem.
2022-04-28 22:11:33 +02:00
SABnzbd Automation a1601a0c1f Update translatable texts 2022-04-28 20:03:12 +00:00
Safihre 2f457c2721 Remove unused texts from skintext and add test for it 2022-04-28 22:02:31 +02:00
Safihre 02c9d0d387 Keep nzo.md5packs for backwards compatibility 2022-04-28 20:18:31 +02:00
Safihre 9b002fe568 Set minval for num_simd_decoders 2022-04-28 20:15:53 +02:00
Safihre 73ec5df88d Move test_adding_nzbs_nzoids to separate module to have a clean instance 2022-04-28 11:08:50 +02:00
Safihre 82e0635995 Previous tests could break nzo_ids test 2022-04-27 14:30:53 +02:00
SABnzbd Automation da0ff7be27 Update translatable texts 2022-04-27 06:54:31 +00:00
Safihre 569260b396 Update text files for 3.6.0Beta4 2022-04-27 08:53:32 +02:00
Safihre bbce0afbf4 Add tests for correct nzo_ids on failed NZBs 2022-04-26 16:00:08 +02:00
Safihre 33022d82c4 Remove undocumented "xcat" API-option 2022-04-26 12:44:43 +02:00
Safihre a7c29fa317 Refactor NZB rejection, no nzo_ids were returned for Fail to history
See: https://forums.sabnzbd.org/viewtopic.php?p=127386
2022-04-26 12:36:46 +02:00
Safihre 8974944044 Make sure duplicate md5of16k hashes are not used in Quick-check 2022-04-26 08:34:19 +02:00
pyup.io bot 60c86a45da Scheduled weekly dependency update for week 17 (#2163)
* Update pyinstaller from 5.0 to 5.0.1

* Update pyobjc from 8.4.1 to 8.5
2022-04-26 07:09:56 +02:00
Safihre 92883f313a Improve new Quick-check implementation
We only care about missing/broken articles in files that we have par2 for. So we check for each NZF if it has bad articles, and only fail if it is part of a par2 set. Additionally we check if the file size matches the one from par2.

Since this also enables CRC check for sabyenc3, it will be slower and the default of num_simd_decoders is increased to 2.
2022-04-25 13:45:49 +02:00
Safihre ce4524e2bb Do not show traceback when getipaddress functions timeout 2022-04-21 11:26:17 +02:00
SABnzbd Automation fdf4242a6c Update translatable texts 2022-04-20 23:44:32 +00:00
Safihre e44c603ba7 Interface did not default correctly to Glitter - Auto 2022-04-21 01:43:44 +02:00
Safihre 1f30714e17 Move Black to CI Test workflow 2022-04-19 09:43:05 +02:00
SABnzbd Automation 36f32f518f Update translatable texts 2022-04-19 07:39:29 +00:00
Safihre bdbd02fa0b Warn in case there are no valid servers
https://forums.sabnzbd.org/viewtopic.php?p=127310
2022-04-19 09:38:42 +02:00
pyup.io bot 0a1e018144 Scheduled weekly dependency update for week 16 (#2159)
* Update pyinstaller from 4.10 to 5.0

* Update pyinstaller-hooks-contrib from 2022.3 to 2022.4
2022-04-19 06:38:02 +02:00
dependabot[bot] 601649e028 Bump stefanzweifel/git-auto-commit-action from 4.14.0 to 4.14.1 (#2157)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.14.0 to 4.14.1.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.14.0...v4.14.1)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 15:29:28 +02:00
Sander 7c17dc64c9 Solve traceback and failing GUI when unknown language setting sabnzbd.ini (#2156)
* solve traceback and failing GUI when unknown langauge setting in sabnzbd.ini

* make black happy

* make black happy
2022-04-16 22:17:37 +02:00
SABnzbd Automation 647f04b6f0 Update translatable texts 2022-04-14 11:08:25 +00:00
Safihre c2102c38f3 Update text files for 3.6.0Beta4 2022-04-14 13:07:45 +02:00
Safihre 6c82e47d32 Add black to test requirements
Not really, but still needed.
2022-04-14 09:53:27 +02:00
Safihre b53529614e Note that SABnzbd also works with pre-Rust cryptography
Closes #2155
2022-04-14 08:59:03 +02:00
thezoggy 2a25c201a7 Fix category script typeahead alignment (#2153) 2022-04-12 20:41:29 +02:00
Safihre 8f3d5047fc Update test_par2file.py
Update test_par2file.py
2022-04-12 17:02:59 +02:00
Safihre 6a08b5b71b Implement new style Quick-check 2022-04-12 17:02:59 +02:00
Safihre c08715614a Revert "Use multiple Assemblers in case SIMD is available" 2022-04-12 17:02:59 +02:00
Safihre ea2b130b57 Mark functional download tests as flaky 2022-04-12 14:33:25 +02:00
Safihreandpyup-bot daa3b25822 Update setuptools from 62.0.0 to 62.1.0 (#2149)
Co-authored-by: pyup-bot <github-bot@pyup.io>
2022-04-12 08:58:42 +02:00
dependabot[bot] 0184e8de2f Bump actions/upload-artifact from 2 to 3 (#2147)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 12:39:36 +02:00
SABnzbd Automation eec59252f6 Update translatable texts 2022-04-10 09:51:37 +00:00
Safihre 2b7f8fb1c9 Move assembler steps in separate function 2022-04-10 10:46:00 +02:00
SABnzbd Automation 345a37d024 Update translatable texts 2022-04-08 18:56:07 +00:00
Safihre 5f04211c58 Update text files for 3.6.0Beta3 2022-04-08 20:51:10 +02:00
Safihre 80b679e9dc Use multiple Assemblers in case SIMD is available 2022-04-08 18:15:18 +02:00
SABnzbd Automation e9ecf39d54 Update translatable texts 2022-04-07 20:14:46 +00:00
Safihre c5a022958c Remove additional unused translations and functions 2022-04-07 22:05:26 +02:00
SABnzbd Automation 97abbafbe9 Update translatable texts 2022-04-07 19:54:51 +00:00
Safihre 776b0367a5 Remove Indexer Integration
Closes #2118
Closes #1317
2022-04-07 21:54:12 +02:00
Safihre c6822fc4f5 Remove included Deobfuscate.py as it is outdated 2022-04-05 09:48:15 +02:00
SABnzbd Automation a2f10b5416 Update translatable texts 2022-04-05 07:18:41 +00:00
pyup.io botandSafihre 4ea7ce7138 Scheduled weekly dependency update for week 14 (#2141)
* Update pyinstaller-hooks-contrib from 2022.2 to 2022.3

* Update setuptools from 60.10.0 to 62.0.0

* Update cheetah3 from 3.2.6.post1 to 3.2.6.post2

* Stop Cheetah3 updates

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-04-05 09:18:01 +02:00
SABnzbd Automation ab9842b599 Update translatable texts 2022-04-04 19:44:52 +00:00
Safihre 7bba292f46 Only allow .zip files in Backup-file-picker 2022-04-04 21:44:08 +02:00
SABnzbd Automation 867bbd5326 Update translatable texts 2022-04-01 07:56:54 +00:00
Safihre 2690f26300 Update text files for 3.6.0Beta2 2022-04-01 09:55:42 +02:00
Safihre b514c81015 Update sabyenc3 to 5.1.6 2022-03-30 23:19:43 +02:00
Safihre cd75d5acd3 Only handle par2 files that could be parsed
Closes #2132
2022-03-30 23:04:54 +02:00
Safihre b9a60f598c Also use lower_case_ext validator for quick_check_ext_ignore 2022-03-30 22:59:42 +02:00
Safihre 7b39578461 Use new extension validator and rename ext_rename_ignore
Closes #2139
2022-03-30 22:51:17 +02:00
Sander 8934c29617 User defined extensions (#2135)
* checkdir: is_writable(check_dir: str) -> bool

* user can define well known extensions

* user can define well known extensions

* user can define well known extensions

* user can define well known extensions

* user can define well known extensions

* user can define well known extensions

* user can define well known extensions

* unit-test

* unit-test

* unit-test

* based on feedback

* introduce validation=lower_case_extensions_without_dot to get clean extensions

* introduce validation=lower_case_extensions_without_dot to get clean extensions

* introduce validation=lower_case_extensions_without_dot to get clean extensions
2022-03-30 15:38:07 +02:00
Safihre dbaed5c8ed Fix werkzeug version due to problem with httpbin 2022-03-28 22:46:54 +02:00
Safihre 5a091d55a6 Make sure all unpack_info messages are strings
Closes #2134
2022-03-26 20:01:38 +01:00
Safihre a28d7ecfab Update macOS release Python to 3.10.4 2022-03-25 10:53:22 +01:00
Safihre 7dea433f52 Revert cheetah3 to 3.2.6.post1
Closes #2133
2022-03-25 10:07:18 +01:00
Safihre 80a2ffdead Do not put partial NZF in Assembler queue if it's already there 2022-03-23 11:03:02 +01:00
pyup.io bot e4b5d937d7 Scheduled weekly dependency update for week 12 (#2131)
* Update cryptography from 36.0.1 to 36.0.2

* Update cheetah3 from 3.2.6 to 3.2.6.post2
2022-03-22 11:27:30 +01:00
dependabot[bot] 5806f816b8 Bump setuptools from 60.9.3 to 60.10.0 (#2126)
Bumps [setuptools](https://github.com/pypa/setuptools) from 60.9.3 to 60.10.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v60.9.3...v60.10.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 15:48:03 +01:00
dependabot[bot] 385928c6e5 Bump pyobjc from 8.4 to 8.4.1 (#2125)
Bumps [pyobjc](https://github.com/ronaldoussoren/pyobjc) from 8.4 to 8.4.1.
- [Release notes](https://github.com/ronaldoussoren/pyobjc/releases)
- [Changelog](https://github.com/ronaldoussoren/pyobjc/blob/master/docs/changelog.rst)
- [Commits](https://github.com/ronaldoussoren/pyobjc/compare/v8.4...v8.4.1)

---
updated-dependencies:
- dependency-name: pyobjc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 15:47:55 +01:00
dependabot[bot] 3e1654356d Bump pytz from 2021.3 to 2022.1 (#2124)
Bumps [pytz](https://github.com/stub42/pytz) from 2021.3 to 2022.1.
- [Release notes](https://github.com/stub42/pytz/releases)
- [Commits](https://github.com/stub42/pytz/compare/release_2021.3...release_2022.1)

---
updated-dependencies:
- dependency-name: pytz
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 15:47:48 +01:00
dependabot[bot] def4d596dc Bump macholib from 1.15.2 to 1.16 (#2123)
Bumps [macholib](https://github.com/ronaldoussoren/macholib) from 1.15.2 to 1.16.
- [Release notes](https://github.com/ronaldoussoren/macholib/releases)
- [Changelog](https://github.com/ronaldoussoren/macholib/blob/master/doc/changelog.rst)
- [Commits](https://github.com/ronaldoussoren/macholib/commits/v1.16)

---
updated-dependencies:
- dependency-name: macholib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 15:47:38 +01:00
dependabot[bot] a239039a89 Bump cryptography from 36.0.1 to 36.0.2 (#2122)
Bumps [cryptography](https://github.com/pyca/cryptography) from 36.0.1 to 36.0.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/36.0.1...36.0.2)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 15:47:00 +01:00
Safihre 1a71265354 Further update pyup.yml 2022-03-21 12:53:41 +01:00
pyup.io botandSafihre 9a3a3b0868 Config file for pyup.io (#2130)
* create pyup.io config file

* Update pyup

* Remove dependabot

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-03-21 12:49:05 +01:00
dependabot[bot] b0a109bd0d Bump actions/cache from 2 to 3 (#2127)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 12:05:32 +01:00
dependabot[bot] 525d10c0ae Bump stefanzweifel/git-auto-commit-action from 4.13.1 to 4.14.0 (#2128)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.13.1 to 4.14.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.13.1...v4.14.0)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-21 12:02:57 +01:00
SABnzbd Automation 8de65d48f3 Update translatable texts 2022-03-18 18:01:01 +00:00
Safihre a5f21c764c Update text files for 3.6.0Beta1 2022-03-18 18:59:46 +01:00
Safihre 1e4e18e51d Correct refactor mistakes 2022-03-18 18:52:46 +01:00
SABnzbd Automation 281921ec59 Update translatable texts 2022-03-17 11:10:49 +00:00
Safihre c10efcbf4c Update handling of errors in servertest
Many errors were just thrown on 1 big pile and even connection-errors were accepted as success because all 4xx codes were accepted.
2022-03-17 12:10:04 +01:00
Safihre 661ab24d6f NNTPLib wil be removed in future version of Python 2022-03-17 11:20:02 +01:00
Safihre 4bf33f5a0a Bump sabyenc3 to 5.1.2
See https://github.com/sabnzbd/sabyenc/issues/33
2022-03-16 15:55:30 +01:00
SABnzbd Automation b256e086c7 Update translatable texts 2022-03-16 10:05:52 +00:00
jcfp a9470ae959 Ensure sufficient available blocks remain if add_parfile fails (#2119)
* ensure sufficient available blocks remain if add_parfile fails

* replace while loop, drop use of pop()
2022-03-16 11:05:14 +01:00
SABnzbd Automation 100018d6bf Update translatable texts 2022-03-16 08:53:31 +00:00
SABnzbd Automation 7719513c72 Update translatable texts 2022-03-15 20:58:27 +00:00
Safihre 970703671d Revert "Update translatable texts"
This reverts commit 1ffdd53629.
2022-03-15 21:57:45 +01:00
Safihre 6d3a4a391c Catch all sabyenc3 import exceptions 2022-03-15 21:52:30 +01:00
SABnzbd Automation 9838c6a05c Update translatable texts 2022-03-15 20:49:49 +00:00
Safihre 5744b1ae98 Revert "Remove Prowl/Pushover/Pushbullet support"
This reverts commit 97f91e734a.
See #2093
2022-03-15 20:52:51 +01:00
Safihre 879af8744d Reduce default number of decoders now that we have SIMD 2022-03-14 20:34:06 +01:00
Safihre 640f941180 Remove unused truncatedText 2022-03-14 20:15:53 +01:00
Safihre a48d8b8f6a Catch all errors during startup in test_sab_binary
We can wait 10 seconds in case something is wrong.
2022-03-14 16:43:42 +01:00
Safihre 20d92bf36b Ask for feedback about Indexer Integration
See #2118
2022-03-14 16:40:44 +01:00
Safihre 7f2ab5d629 Remove cache_max, refresh_rate, rating_enable from queue API-call
They are not queue related information
2022-03-14 16:26:35 +01:00
Safihre bb46b474c3 Small API cleanup 2022-03-14 16:08:05 +01:00
Safihre 5a3e8836e0 Report SIMD set as part of the CPU information 2022-03-14 15:37:30 +01:00
Safihre e100c4ce7f Correct highlight of pop-up tabs 2022-03-14 13:19:02 +01:00
dependabot[bot] 32b3db80d8 Bump pyobjc from 8.3 to 8.4
Bumps [pyobjc](https://github.com/ronaldoussoren/pyobjc) from 8.3 to 8.4.
- [Release notes](https://github.com/ronaldoussoren/pyobjc/releases)
- [Changelog](https://github.com/ronaldoussoren/pyobjc/blob/master/docs/changelog.rst)
- [Commits](https://github.com/ronaldoussoren/pyobjc/compare/v8.3...v8.4)

---
updated-dependencies:
- dependency-name: pyobjc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 11:48:53 +01:00
dependabot[bot] 7ac24e69c4 Bump wrapt from 1.13.3 to 1.14.0
Bumps [wrapt](https://github.com/GrahamDumpleton/wrapt) from 1.13.3 to 1.14.0.
- [Release notes](https://github.com/GrahamDumpleton/wrapt/releases)
- [Changelog](https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst)
- [Commits](https://github.com/GrahamDumpleton/wrapt/compare/1.13.3...1.14.0)

---
updated-dependencies:
- dependency-name: wrapt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 11:41:59 +01:00
dependabot[bot] 80f2a5476e Bump sabyenc3 from 5.1.0 to 5.1.1
Bumps [sabyenc3](https://github.com/sabnzbd/sabyenc) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/sabnzbd/sabyenc/releases)
- [Commits](https://github.com/sabnzbd/sabyenc/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: sabyenc3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 11:41:51 +01:00
Safihre d27237832e Prevent stall when decoder/assembler queues are full 2022-03-14 08:21:41 +01:00
SABnzbd Automation 73a3ce9889 Update translatable texts 2022-03-13 14:18:02 +00:00
Safihre ff66b8ec01 Show in the status window why download speed was limited
Set to show if >5 times. Arbitrary number, might change in future.
2022-03-13 15:17:25 +01:00
Safihre d632084c58 Update URL's to wiki pages 2022-03-13 13:14:57 +01:00
Safihre 4257ff3e67 Forgot to update SABYENC_VERSION_REQUIRED 2022-03-10 17:17:42 +01:00
Safihre 72ca0a6ef7 Update sabyenc3 to 5.1.0 2022-03-10 15:48:52 +01:00
Safihre 5b361a6a2e Jobs waiting to fetch get stuck indefinitely upon restart
Closes #2114
2022-03-10 13:40:02 +01:00
Safihre 40d3a69b1c Prevent Direct Unpack proceeding faster than it should, locking files
Relates to #2113
2022-03-10 13:40:02 +01:00
Safihre 0cc618e1b2 Revert "Revert "Disable buffering when writing files in assembler""
This reverts commit de4ca8e55c.

Turns out not to be the case, see #2113
2022-03-10 13:40:02 +01:00
Safihre 0ee04ada31 Log also the OSError.winerror just to be sure 2022-03-10 08:25:16 +01:00
Safihre 807b1c64dd Update MultiPar to v1.3.2.3
Closes #2097
2022-03-08 10:25:49 +01:00
Safihre 690aad123c No longer build sabyenc3 from sources for the release 2022-03-08 08:40:17 +01:00
Safihre 73b6a3159f Allow longer build timeouts
Especially on macOS this can be really slow on busy days.
2022-03-08 08:37:45 +01:00
Safihre 73e8a18d5a Force codesign_identity to None if not set 2022-03-07 21:48:45 +01:00
dependabot[bot] e613dda536 Bump pyinstaller from 4.9 to 4.10
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 4.9 to 4.10.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/v4.10/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v4.9...v4.10)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 21:48:45 +01:00
dependabot[bot] 2621b90d3b Bump actions/checkout from 2 to 3 (#2110)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 21:19:37 +01:00
Sander 9e95736b48 In case of sabyenc version mismatch, log the sabyenc file used, to help debugging (#2108) 2022-03-04 17:50:06 +01:00
Safihre de4ca8e55c Revert "Disable buffering when writing files in assembler"
This reverts commit 3c3aeac93c.

It turns out this causes problems!
2022-03-03 15:44:06 +01:00
Safihre f4247e0361 Use 1 shared ThreadPoolExecutor instead of ThreadPool (#2103)
See #2103
2022-03-02 10:04:29 +01:00
Safihre d9df7b66f5 Sign files before handing them over to PyInstaller 2022-03-01 17:38:50 +01:00
Safihre c5feb5bdc9 Revert "Let PyInstaller sign the macOS executable and the app" 2022-03-01 15:54:29 +01:00
Safihre ee170d2f51 Update SABYenc to 5.0.1 2022-03-01 14:58:04 +01:00
dependabot[bot] eea6d07613 Bump actions/setup-python from 2 to 3 (#2101)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 14:37:26 +01:00
dependabot[bot] 4a9a26d470 Bump stefanzweifel/git-auto-commit-action from 4.5.1 to 4.13.1 (#2100)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.5.1 to 4.13.1.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.5.1...v4.13.1)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 14:37:17 +01:00
Safihre f949487a75 Add dependabot for GitHub Actions 2022-03-01 14:21:15 +01:00
Safihre d7572c5772 RSS filters At most/least were broken 2022-03-01 08:42:14 +01:00
dependabot[bot] 74e3bbb83b Bump pyobjc from 8.1 to 8.3 (#2099)
Bumps [pyobjc](https://github.com/ronaldoussoren/pyobjc) from 8.1 to 8.3.
- [Release notes](https://github.com/ronaldoussoren/pyobjc/releases)
- [Changelog](https://github.com/ronaldoussoren/pyobjc/blob/master/docs/changelog.rst)
- [Commits](https://github.com/ronaldoussoren/pyobjc/commits/v8.3)

---
updated-dependencies:
- dependency-name: pyobjc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 13:01:07 +01:00
Sander adaa4cade5 SAB wizard: get_access_info() more robust with try-except (#2090) 2022-02-28 13:00:29 +01:00
Safihre 09e670bce4 Try to fix the functional tests 2022-02-28 12:17:49 +01:00
SABnzbd Automation d6b601968d Update translatable texts 2022-02-25 22:14:32 +00:00
Safihre f07db641d4 Set version to 3.6.0-develop and make sure we keep it correct
Relates to Sonarr/Sonarr/4912
Closes sabnzbd/sabnzbd/2095
2022-02-25 23:13:39 +01:00
SABnzbd Automation 1ffdd53629 Update translatable texts 2022-02-24 15:37:29 +00:00
Safihre 97f91e734a Remove Prowl/Pushover/Pushbullet support
Closes #2093
2022-02-24 16:35:37 +01:00
Christopher Kreft 4eee13ac02 #2089 - try to fix build/stage packages for arm64/armhf (#2094)
* #2089 - use snapcraft-preload to rewrite the /dev/shm path dynamically

* #2089 - try to fix build/stage packages for arm64/armhf
2022-02-22 14:50:43 +01:00
Christopher Kreft 5869022a28 #2089 - use snapcraft-preload to rewrite the /dev/shm path dynamically (#2092) 2022-02-22 12:47:24 +01:00
Safihre 19e77590f3 Make sure all extrapars and md5packs are unique
Closes #2084
2022-02-21 11:56:23 +01:00
dependabot[bot] bc790275aa Bump setuptools from 60.9.0 to 60.9.3 (#2087)
Bumps [setuptools](https://github.com/pypa/setuptools) from 60.9.0 to 60.9.3.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v60.9.0...v60.9.3)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 11:46:38 +01:00
dependabot[bot] 1c35cd9d65 Bump pyinstaller-hooks-contrib from 2022.1 to 2022.2 (#2086)
Bumps [pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib) from 2022.1 to 2022.2.
- [Release notes](https://github.com/pyinstaller/pyinstaller-hooks-contrib/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/2022.1...2022.2)

---
updated-dependencies:
- dependency-name: pyinstaller-hooks-contrib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 11:29:02 +01:00
Safihre d6dd8da81e Prevent crash due to get_formatted_stats returning int 2022-02-20 19:26:39 +01:00
Safihre d55b23c482 Multiset-unpack with partial failure should correctly be reported
Relates to #2084
2022-02-20 11:05:10 +01:00
Safihre f95f83c85b Allow longer timeouts for status update
Closes #2066
2022-02-16 16:46:54 +01:00
Safihre f0fa67d16d Add Debug logging when applying permissions failed 2022-02-16 13:08:50 +01:00
Safihre 89756b7c9e Allow chmod failures if no custom permissions are set
This is the same as before 3.5.0!
2022-02-16 10:38:07 +01:00
Safihre 5f9693cb34 Perform the internetspeed measure in separate thread 2022-02-15 15:37:05 +01:00
Safihre 2856f3af8c Use 1 ThreadPool for all timeout_decorators 2022-02-15 15:05:34 +01:00
Safihre e7b1db8b09 Prevent logging performance/network measures twice 2022-02-15 10:39:53 +01:00
Sander 48c3a84b85 Logging of performance measurements (#2071)
* logging.debug of all performance measurements

* logging.debug of all performance measurements

* logging.debug of all performance measurements

* logging.debug of all performance measurements

* black black black

* internetspeed ... logging.debug start & done

* internetspeed ... back to total 8 seconds, plus a Note in comments

* no more logging "starting ..."

* change the Note a bit

* internetspeed: correct seconds, and Note

* SAB-standard wording. Plus meausurement of duration, where possibly relevant

* SAB-standard wording. Plus meausurement of duration, where possibly relevant

* shorter variable name for disk writing MB per sec

* shorter variable name for disk writing MB per sec
2022-02-14 21:30:30 +01:00
Safihre eca3705794 Let PyInstaller sign the macOS executable and the app
It signs the binaries anyway, so let it do it properly.
Verify signature applied by PyInstaller
2022-02-14 15:38:26 +01:00
dependabot[bot] 74fd17d7ac Bump charset-normalizer from 2.0.11 to 2.0.12 (#2077)
Bumps [charset-normalizer](https://github.com/ousret/charset_normalizer) from 2.0.11 to 2.0.12.
- [Release notes](https://github.com/ousret/charset_normalizer/releases)
- [Changelog](https://github.com/Ousret/charset_normalizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ousret/charset_normalizer/compare/2.0.11...2.0.12)

---
updated-dependencies:
- dependency-name: charset-normalizer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 12:55:33 +01:00
dependabot[bot] 35cbf0ebb4 Bump setuptools from 60.8.1 to 60.9.0 (#2078)
Bumps [setuptools](https://github.com/pypa/setuptools) from 60.8.1 to 60.9.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v60.8.1...v60.9.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 12:55:21 +01:00
dependabot[bot] 2eb8b8e2b2 Bump puremagic from 1.11 to 1.12 (#2076)
Bumps [puremagic](https://github.com/cdgriffith/puremagic) from 1.11 to 1.12.
- [Release notes](https://github.com/cdgriffith/puremagic/releases)
- [Changelog](https://github.com/cdgriffith/puremagic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cdgriffith/puremagic/compare/1.11...1.12)

---
updated-dependencies:
- dependency-name: puremagic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 12:54:52 +01:00
dependabot[bot] 883596d1d7 Bump pyinstaller-hooks-contrib from 2022.0 to 2022.1 (#2079)
Bumps [pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib) from 2022.0 to 2022.1.
- [Release notes](https://github.com/pyinstaller/pyinstaller-hooks-contrib/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/2022.0...2022.1)

---
updated-dependencies:
- dependency-name: pyinstaller-hooks-contrib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 12:54:29 +01:00
Wolfgang SchererandSafihre 698487377b Do not fail if attribute subject is missing in NZB file-section (#2075)
* Use attribute poster of file element, if attribute subject ist missing

* Don't fail, if subject is missing.

* Textual change

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-02-14 09:15:53 +01:00
jcfp c3d826df8c set log level of "completed not on fat" to debug 2022-02-10 12:47:19 +01:00
Safihre d5536ed246 Wait before removing the temporary directory in binary test 2022-02-09 13:05:20 +01:00
Safihre df077f8ef6 Add small delay to test_download check of result file
To prevent zip-test-failures on Windows.
2022-02-09 12:55:04 +01:00
Safihre 4293a098e3 Fix version of more dependencies 2022-02-09 08:52:12 +01:00
SABnzbd Automation cf07260186 Update translatable texts 2022-02-07 14:28:21 +00:00
Safihre 9ad5bd477b Correctly handle the transition from download to active post-processing 2022-02-07 15:27:43 +01:00
Safihre 1d2c1dbc6f Restore correct display of Direct Unpack progress 2022-02-07 15:12:13 +01:00
Safihre 8c44c5b79a Correct mistake in 171f04 2022-02-07 11:57:34 +01:00
dependabot[bot] 0c84eb3dd0 Bump pyinstaller from 4.8 to 4.9 in /builder
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 4.8 to 4.9.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/v4.9/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v4.8...v4.9)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 11:51:01 +01:00
dependabot[bot] 869792c09e Bump setuptools from 60.6.0 to 60.8.1 in /builder
Bumps [setuptools](https://github.com/pypa/setuptools) from 60.6.0 to 60.8.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v60.6.0...v60.8.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 11:50:51 +01:00
Safihre 09ab158d66 Prevent Direct Unpack crash on obfuscated posts
Closes #2060
2022-02-07 11:49:57 +01:00
Safihre f539a8ccda Dependabot update config
It will pick up sub-directories automatically
2022-02-07 11:33:16 +01:00
Safihre 171f049607 Use nzo.deleted instead of nzo.is_gone to prevent assembly during pp
Relates to #2059, #2054 and #1509.
2022-02-07 10:37:28 +01:00
Safihre 43e47e6249 Correct undefined function remove_data 2022-02-05 09:51:45 +01:00
Safihre afbfe72489 Use notarytool on macOS to do notarization 2022-02-04 22:28:04 +01:00
Safihre 59d042c9a7 Test starting of binary during release building 2022-02-04 21:46:09 +01:00
Safihre 38a613de45 Pin even more requirements
Closes #2056
2022-02-04 10:09:32 +01:00
Safihre 1c27ebc1e4 Add unittests for case where api_warnings is disabled 2022-01-31 10:22:49 +01:00
Safihre 6f1d8a99e7 Do not return access denied message when api_warnings is disabled
Closes #2029
2022-01-31 10:13:07 +01:00
Safihre 8c9e5b4963 Add small delay between volumes in Direct Unpack to prevent UnRar error 2022-01-31 09:23:39 +01:00
Safihre 3c3aeac93c Disable buffering when writing files in assembler 2022-01-30 10:51:48 +01:00
Safihre 846c2761f6 Fix dependencies in requirements.txt and configure dependabot 2022-01-30 09:59:50 +01:00
Safihre d03eabe4d5 Black formatting update 2022-01-30 09:25:54 +01:00
Safihre cad9be6e74 RSS feeds with HTML-chars in the feed name would result in crash 2022-01-28 12:36:14 +01:00
SABnzbd Automation dbb166e94f Update translatable texts 2022-01-28 11:06:30 +00:00
Safihre 6b92922ee5 Test using separate par2 libomp.dylib 2022-01-28 12:05:57 +01:00
Safihre 479431b283 Add M1 (arm64) versions of unrar 6.10 and par2cmdline 0.8.1 2022-01-28 12:05:57 +01:00
Safihre 2ab1a27f8b Update 7zip to 21.07, including universal2 version for macOS 2022-01-28 12:05:57 +01:00
Safihre 8470e61e3f Reduce par2cmdline output log in Debug mode 2022-01-26 16:36:23 +01:00
Safihre 6c6c8c86d8 Rename DARWIN constant to MACOS 2022-01-25 13:44:51 +01:00
SABnzbd Automation efab6ee229 Update translatable texts 2022-01-25 07:15:06 +00:00
jcfp 72a1173615 add appstream metadata, sample desktop and mimeinfo files (#2040)
* add appstream metadata, sample desktop and mimeinfo files

* remove overlooked plus
2022-01-25 08:14:32 +01:00
Safihre 1dfa3a64a7 Cache whole vitualenv for CI and release building 2022-01-24 14:31:42 +01:00
Safihre 7b36396570 Do not trigger keyboard shortcuts if the user pressed keycombos 2022-01-23 15:00:54 +01:00
Safihre c1a8470dcf Handle early NNTP 500 Access Denied
Closes #2033
Closes #2034
Removed old code for some attack that could still happen on the regular connect.
2022-01-23 13:54:21 +01:00
Safihre ba0d9ac834 Do not trigger keyboard shortcuts if the user is typing in text field 2022-01-23 13:27:06 +01:00
SABnzbd Automation 56d0feab12 Update translatable texts 2022-01-22 16:27:12 +00:00
SvenandSafihre 0674737796 Add keyboard shortcuts (#2031)
* Add keybinds

* Change quote style to match codebase

* Store keyboard binding setting in config

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-01-22 17:26:45 +01:00
SABnzbd Automation 58b632b6c6 Update translatable texts 2022-01-22 16:26:31 +00:00
Safihre 43f3e13491 Prevent extra error when no 7zip is available
Closes #2036, #2035
2022-01-22 17:25:48 +01:00
SABnzbd Automation 7b69060776 Update translatable texts 2022-01-22 08:51:38 +00:00
puzzledsabandSafihre 75f6cc7f0f Backup and restore admin data (#2023)
* Backup and restore admin data

* Don't import archives containing subpaths

* Show result after uploading

* Use existing upload system and fixed list of admin files

* Fix confusing order of code lines

* Add translations and link from wizard

* Refactoring, change some names and move some code to sabnzbd.config

* Remove unused imports

* Remove queue and scan databases from backup

* Style changes

* Code changes

* Add tests and don't crash if any admin files are missing

* Cleanup

* Small changes and rebase on develop

Co-authored-by: Safihre <safihre@sabnzbd.org>
2022-01-22 09:51:01 +01:00
Safihre 8ef8200363 Set Python for macOS release to 3.10.2 2022-01-21 16:53:15 +01:00
Safihre 8b31c38229 Cache pip packages in Github Actions 2022-01-21 16:45:14 +01:00
Safihre 651591a063 Correctly implement skipping duplicate check if the job is forced
Closes #2032
2022-01-21 16:39:08 +01:00
SABnzbd Automation c86b3c972b Update translatable texts 2022-01-20 09:52:21 +00:00
Safihre 7529297151 Pass nzo to deobfuscate.deobfuscate
Closes #2030
2022-01-20 10:51:34 +01:00
Safihre 2c411e343d Only build 32bit release when we are creating a full release 2022-01-19 17:22:39 +01:00
Safihre e9d8f6aebd Skip duplicate check for downloads with Force-priority
Closes #2002
2022-01-19 13:06:49 +01:00
SABnzbd Automation d144582f1c Update translatable texts 2022-01-19 10:14:36 +00:00
Safihre 2d3e703979 List Deobfuscate result in history 2022-01-19 11:12:24 +01:00
SABnzbd Automation af440ffffa Update translatable texts 2022-01-19 08:32:10 +00:00
Safihre e129b2df57 Always sanitize config-section name 2022-01-19 09:18:44 +01:00
Safihre 09f2b36920 Style refactor of config.py 2022-01-18 16:39:08 +01:00
Safihre 37af295873 HTML-sanitizer would sanitize the source data
Closes #2026
2022-01-17 14:08:17 +01:00
Safihre 52d21e94d3 Sort sevenset so x.7z.001 is always the first file 2022-01-15 17:09:35 +01:00
Safihre acd80cc05e Failed 7zip unpack was not reported in the history 2022-01-15 17:04:52 +01:00
Safihre de48464661 Set version to 3.6.0-develop
Create new wiki-pages later.
2022-01-13 14:56:18 +01:00
Safihre 623cac6220 Use new env-variable to force PyInstaller bootloader from sources 2022-01-13 11:40:26 +01:00
SABnzbd Automation ad558b4984 Update translatable texts 2022-01-11 10:20:49 +00:00
Safihre ae0ba59f67 Only update interface settings in the config after fetching them
Closes #2012
2022-01-11 11:19:33 +01:00
Safihre fd28a8b427 Escape all HTML on template-based pages 2022-01-10 12:14:05 +01:00
Sander b390e5de98 Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory (#2022)
* Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory

* Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory

* Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory

* Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory

* Do not deobfuscate/rename anything if there is a typical DVD or Bluray directory
2022-01-10 09:26:59 +01:00
Sander 82402abe43 Dont run deobfuscate if dvd or bluray typical directory name (#2020)
* detect DVD/Bluray structure, and do not run deobfuscate on that

* detect DVD/Bluray structure, and do not run deobfuscate on that

* detect DVD/Bluray structure, and do not run deobfuscate on that

* detect DVD/Bluray structure, and do not run deobfuscate on that

* detect IGNORED_MOVIE_FOLDERS in filelist

* detect IGNORED_MOVIE_FOLDERS in filelist

* better code

* better code

* better code

* better code

* better code

* use one-liner

* wording in comment

* unittest for VIDEO_TS

* unittest for VIDEO_TS
2022-01-09 16:25:13 +01:00
SABnzbd Automation 78da7ddb55 Update translatable texts 2022-01-08 13:22:06 +00:00
Safihre 1dd48743c2 Refactor location of functions from __init__ 2022-01-08 14:21:23 +01:00
Safihre 015417d640 Only run macOS universal2-check when running on GitHub or releasing 2022-01-08 13:16:41 +01:00
Safihre 94de00b14c Automatically release latest snap when building a tag 2022-01-08 10:41:45 +01:00
Safihre 4d237c4328 Add unit tests for format_time_left 2022-01-08 09:49:44 +01:00
SABnzbd Automation b7f721e869 Update translatable texts 2022-01-08 08:46:01 +00:00
Safihre 49ba555fc0 Revert "Change timeleft format from 0:00:00 to 0:00"
Reverts 1d3a922a7b
2022-01-08 09:45:20 +01:00
SABnzbd Automation cd1b25ec2b Update translatable texts 2022-01-07 08:30:46 +00:00
Safihre 109725fafe Update text files for 3.5.0RC1 2022-01-07 09:29:57 +01:00
Safihre 9c7b61070b Update copyright year to 2022 2022-01-07 09:29:32 +01:00
SABnzbd Automation 8b5a1fef51 Update translatable texts 2022-01-06 21:11:39 +00:00
Safihre 72f8dd5b3a Show an estimated time-left indicator for par2-repair and unrar 2022-01-06 22:10:55 +01:00
Safihre 1d3a922a7b Change timeleft format from 0:00:00 to 0:00 2022-01-06 22:10:55 +01:00
Safihre ab2b145556 Literal is not supported on Python 3.7 2022-01-06 13:42:52 +01:00
SABnzbd Automation 8960ff5a4d Update translatable texts 2022-01-06 12:10:55 +00:00
Safihre 06b41b1b5a Create directories before moving to new path 2022-01-06 12:53:39 +01:00
Safihre 4277ac65a4 Add ".ssa" as common extension 2022-01-06 12:53:39 +01:00
Safihre 6ed815f1ac Refactor 7zip handling similar to unrar and skip extra join step 2022-01-06 12:53:39 +01:00
Sander 4ebfa6a3d0 more known extensions (#2016)
* more known extensions, based on mime-type extensions

* put NZB detection first
2022-01-06 12:08:08 +01:00
Safihre 529f75467b Multipar does repair broken parts of joinables 2022-01-05 13:43:03 +01:00
Safihre 062895c7ca Catch ValueError for publicipv4 lookup
Closes #2008
2022-01-04 15:13:34 +01:00
SABnzbd Automation 7b174ac498 Update translatable texts 2022-01-04 13:52:51 +00:00
Safihre beb8f627ee Add unit tests for par2 filejoin 2022-01-04 14:40:44 +01:00
Safihre 1badbaa182 Refactor of postproc and newsunpack functions 2022-01-04 10:47:07 +01:00
Safihre 75f2930f53 Refactor of newsunpacking functions 2022-01-04 10:16:21 +01:00
Safihre 60b746e4dd Refactor par2cmdline processing 2022-01-04 10:16:21 +01:00
Safihre dbef9af0df Add unit tests for Multipar and par2cmdline processing 2022-01-04 10:16:21 +01:00
SABnzbd Automation 2a5cdf49ad Update translatable texts 2022-01-03 09:44:33 +00:00
Safihre 0bb5432223 Do not apply permissions if not requested by the user, but remove xbits (#2004)
* Do not apply permissions if not requested by the user, but remove xbits

* Verify umask and user-permissions and warn for potential access problems

* Correctly name umask/permissions options

* Apply permissions only on download_dir creation

* Refactor some permissions related actions

* Block setting permissions=0 and only stat when no custom_permissions
2022-01-03 10:43:57 +01:00
SABnzbd Automation f565a50e90 Update translatable texts 2022-01-01 15:04:17 +00:00
Safihre 0a840228b2 No longer throw warnings/errors during unpacking, only set job status 2022-01-01 16:03:11 +01:00
SABnzbd Automation 37c1964991 Update translatable texts 2022-01-01 14:48:07 +00:00
Sander f3cd5b06fa 7z password detection relocation (#2009)
* coding style for 7z unpacking

* coding style: better order

* make black happy

* make black happy

* make black happy

* make black happy

* make black happy

* make black happy

* use two standard message so no translations needed

* use two standard message so no translations needed

* setname_from_path(sevenset)

* setname_from_path(sevenset)

* anything ret > 0 is one case
2022-01-01 15:47:33 +01:00
SanderandSanderJo c735ad5110 to avoid exception when no 7z/7za was found/defined (#2013)
Co-authored-by: SanderJo <sand.e.rjonkers+github@gmail.com>
2022-01-01 10:16:18 +01:00
Graham Morrison 51b27cb002 snap: 7z env and path fix for outdated deb (#2011) 2021-12-31 14:44:12 +01:00
Safihre 0406f1df01 In multi-set fail_msg should only be set for full fail 2021-12-30 14:54:12 +01:00
Safihre a72401a529 On Retry the number of downloaded bytes could exceed the total bytes 2021-12-30 09:40:40 +01:00
Safihre 406c4d20cf When Retrying a job, finished par2's were still counted as available 2021-12-27 21:54:43 +01:00
SABnzbd Automation 49ef9ae85d Update translatable texts 2021-12-27 14:00:41 +00:00
Safihre d65eacea41 Correctly parse helpful_warning in extract_pot 2021-12-27 14:59:50 +01:00
SABnzbd Automation 347904297e Update translatable texts 2021-12-27 10:26:41 +00:00
Safihre 404aeb026d Correctly name the helpful_warning function and option
Yes, this will break current users of the old name. Too bad.
2021-12-27 11:25:52 +01:00
Safihre 29df51a4b0 Standardize 7zip version detection 2021-12-27 11:17:55 +01:00
Sander 397cde2be2 bugfix with 7z if ionice is set: command must be a list (#2007) 2021-12-26 22:13:20 +01:00
Sander a848283d59 Detect another obfuscation pattern (#2005)
* this is obfuscated now: "[BlaBla] something [More] something 5937bc5e32146e.bef89a622e4a23f07b0d3757ad5e8a.a02b264e [Brrr]"

* this is obfuscated now: "[BlaBla] something [More] something 5937bc5e32146e.bef89a622e4a23f07b0d3757ad5e8a.a02b264e [Brrr]"
2021-12-26 17:38:24 +01:00
SABnzbd Automation 80b4582e81 Update translatable texts 2021-12-25 20:08:19 +00:00
Sander 9d5c7d3317 if too little disk space reported by 7z unzipping, report so in GUI (#2000)
* if too little disk space reported by 7z unzipping, report so in GUI

* comment about 7z version needed

* find and print 7z version at startup

* feedback from safihre

* change to existing wording, so no translations needed

* change to existing wording, so no translations needed

* even better wording: re-use existing error message
2021-12-25 21:07:47 +01:00
SABnzbd Automation b860741ab8 Update translatable texts 2021-12-23 12:50:31 +00:00
Safihre 792825bdaa Update text files for 3.5.0 Beta 3 2021-12-23 13:48:19 +01:00
Graham Morrison ad2371dc9a snap build fix for snap/snapcraft.yaml (#1998)
* updated snapcraft.yaml.

* snap: updated target builds
2021-12-17 07:45:44 +01:00
Safihre dfb771a51e Add basic tests of nzbparser 2021-12-16 12:49:16 +01:00
SABnzbd Automation 14a0dbbd5c Update translatable texts 2021-12-16 09:59:55 +00:00
Safihre bb1c63cc92 Unrar logging of Direct Unpack was not log if it was aborted 2021-12-16 10:58:55 +01:00
Safihre 38ca26e6f3 Basic tests for SevenZip-code 2021-12-12 17:55:42 +01:00
SABnzbd Automation 285d5688f5 Update translatable texts 2021-12-12 14:29:24 +00:00
Safihre 26cdfc2279 Rework adding of NZB's to use filehandlers (#1994)
* Rework adding of NZB's to use filehandlers

* Use zf.open() instead of zf.read()

* Make SevenZip-class compatible with file handler approach

* Do not attempt to overwrite existing admin-NZB

* Reset pointer when checking for incomplete NZB

* No longer check for incomplete NZB

* Refactor of archived NZB handling
2021-12-12 15:28:46 +01:00
Safihre d915dfc941 NZO URL property was incorrectly filled with filename 2021-12-09 14:55:43 +01:00
puzzledsabandSafihre d29bd65f97 Read NZB from file using iterparse (#1992)
* Read XML from file using iterparse

* Ignore XML namespace

* Minor cleanup

* More tweaking

* Small improvements to the NZB-backup process

* Add type-hint and logging of backup

* Don't remove nzo data after failed import

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-12-08 08:58:30 +01:00
Safihre 81d378498e Automatically retry newswrapper tests 2021-12-06 15:39:30 +01:00
Safihre d32630c759 Improve stability of the test_newswrapper test 2021-12-03 09:03:43 +01:00
puzzledsab b8d7ec0723 Add option to preserve paused state after restart (#1990)
* Add option to preserve Downloader run state

* Add updating to set_paused_state

* Restore set_paused_state call

* Messed up again

* Requested changes

* Missed one
2021-12-02 22:09:52 +01:00
Safihre 207c5430c1 Make sure the test-server in test_newswrapper is shut down 2021-12-01 16:35:25 +01:00
Safihre b922274b61 Update text files for 3.5.0 Beta 2 2021-11-30 16:49:50 +01:00
Safihre 863c0e5eb7 Add unittests for the NNTP SSL/cipher settings 2021-11-30 16:19:16 +01:00
Safihre 46f9956791 Force TLSv1.2 when setting custom ciphers 2021-11-30 16:19:16 +01:00
Safihre 879a6f2552 Always set SSL ciphers to allow TLSv1.2 connections 2021-11-30 16:19:16 +01:00
Safihre 5e3d237c99 HappyEyeBalls used SSL even though it wasn't needed 2021-11-30 16:19:16 +01:00
puzzledsab 1eb83e4eb0 Print low level Windows status error on IOError (#1986)
* Print low level Windows status error on assembler IOError

* Include error code in renamer OSError message
2021-11-30 08:06:11 +01:00
puzzledsab 194c0e6708 Add all passwords to list every time (#1985) 2021-11-28 08:28:10 +01:00
Safihre a87d38c61f Full Apple M1 compatibility
Closes #1711 (see for more details!)
2021-11-27 16:28:08 +01:00
Safihre ed0e5bbf9b Add placeholder for SOCKS5 Proxy input 2021-11-22 16:54:19 +01:00
Safihre 2249b623e6 Restore CI functional tests
Use build-in Chrome and ChromeDriver, we shouldn't try to be smarter than GitHub Actions 😉
2021-11-21 13:58:00 +01:00
SABnzbd Automation 854ca5f5d4 Update translatable texts 2021-11-21 08:06:35 +00:00
Safihre a0a8029c36 Set the minimum supported TLS version the new way 2021-11-21 09:06:00 +01:00
Safihre e7eec8e4f1 Check for PySocks at start-up to give a nice error 2021-11-21 08:54:21 +01:00
Safihre a354c1984b Update text files for 3.5.0 Beta 1 2021-11-20 09:49:11 +01:00
Safihre 34799c397c Force compile all Python modules on macOS 2021-11-20 09:31:56 +01:00
Safihre 2c88dddc1e Set selenium-requirement to fix tests 2021-11-20 09:31:41 +01:00
SABnzbd Automation 64b0216ba9 Update translatable texts 2021-11-20 06:06:10 +00:00
puzzledsab f950520475 Compare variable with int, not string (#1981) 2021-11-20 07:05:34 +01:00
SABnzbd Automation 60f3de2a91 Update translatable texts 2021-11-19 13:39:58 +00:00
puzzledsabandSafihre 06e13483bd SOCKS 5 support (#1894)
* Add testable socks support

* Messed up merge

* Use proxy for urllib.request.urlopen

* Reset socket before trying to get public IP

* Add socks requirement

* PySocks, not socks?

* Use only PySocks

* Clean up and reduce number of new translations

* Move configuration to special variable socks5_proxy_url

* Remove useless dereferencing

* Catch OSError on proxy preconnect

* Try only setting socks proxy once

* Missed some spots

* Catch all errors for IPv6 checks

* Move proxy initialization up before threads are started

* No special `sock.connect` required for Socks5

* Revert "No special `sock.connect` required for Socks5"

This reverts commit 5e901f8b58.

* Remove callback and ORIGINAL_SOCKET variable

* Move all `sock.connect` code

* Create SSLContext only once for each server

It is re-created if server-settings are updated.

* Add SOCKS5 proxy configuration to General page

* Show if proxy is active in Status-window

Co-authored-by: Safihre <safihre@sabnzbd.org>
2021-11-19 14:39:23 +01:00
Safihre f00cbe89bc Refactor HappyEyeBalls 2021-11-18 20:27:49 +01:00
SABnzbd Automation e450f5744b Update translatable texts 2021-11-18 14:27:05 +00:00
jcfp 255242eca5 disable randomisation of directory listings in pyfakefs (#1978) 2021-11-18 15:26:26 +01:00
Safihre cbeab4dd55 Force rebuild for binary pip-packages 2021-11-16 21:56:10 +01:00
Safihre 6b8506c986 Set target-arch to universal2 for macOS 2021-11-16 21:40:42 +01:00
Safihre d5d5647b7c Add hidden import of guessit.data 2021-11-16 21:24:35 +01:00
Safihre 1a76de1ca3 Build PyInstaller bootloader from sources to support macOS 10.9 2021-11-16 20:40:24 +01:00
Safihre 1913109623 Add freeze support for multiprocessing
See https://github.com/pyinstaller/pyinstaller/issues/6368
2021-11-16 13:58:12 +01:00
Safihre e76b4395a7 Remove specific macOS version check
Old macOS versions just have to deal with it
2021-11-15 21:41:31 +01:00
Safihre 6670156397 Correct Scheduler Wiki-URL 2021-11-08 13:15:13 +01:00
Safihre 37b7a77b70 Update snapcraft build 2021-11-07 09:08:43 +01:00
Safihre ddb5a007a5 Update snapcraft base to Ubuntu 20.04 2021-11-07 08:50:06 +01:00
SABnzbd Automation 8568df4552 Update translatable texts 2021-11-05 06:57:19 +00:00
jcfp 493a5f715c Reintroduce uu support (#1969)
* reintroduce uu support

* housekeeping, bug fixes

* add tests for decode_uu()

* simplify, fix typo

* remove leftover debugging; housekeeping

* oops

* add non-ascii input for test_broken_uu
2021-11-05 07:56:39 +01:00
Safihre a61b27992e Update code-format to 3.7
No changes really
2021-11-05 07:50:55 +01:00
Safihre 798eec7aa8 Drop (official) Python 3.6 support and run fully on 3.10
Probably still runs, we just don't test it.
2021-11-05 07:45:24 +01:00
Safihre 0d29603e2b portable.cmd was no longer included in Windows release
Closes sabnzbd/sabnzbd.github.io/176
2021-11-03 21:06:28 +01:00
SABnzbd Automation 48882220d6 Update translatable texts 2021-11-02 10:32:30 +00:00
Safihre b4ad292ec5 Build release using 3.10
Closes #1958
2021-11-02 11:31:43 +01:00
Safihre b59a14f6b7 Correct "Remove even more unused imports"
My fault.
2021-10-22 10:04:35 +02:00
SABnzbd Automation 80ed385a41 Update translatable texts 2021-10-22 07:52:02 +00:00
Safihre 04cd67b98b Remove even more unused imports 2021-10-22 09:51:24 +02:00
jcfp 68eded2c0c remove unused imports (#1966) 2021-10-19 19:29:54 +02:00
Safihre 389a0d3afa Revert to using regex based sample detection
Closes #1964
2021-10-13 18:24:55 +02:00
Safihre 5a3e4a28fe Solve deprecation warnings 2021-10-12 11:20:33 +02:00
SABnzbd Automation 66b5629a31 Update translatable texts 2021-10-12 07:30:17 +00:00
Safihre eae77eb236 Prevent double guessit parsing 2021-10-12 09:29:38 +02:00
Safihre 5f44ec8a0d Correct behavior of Sorter when no filename and/or extension is supplied
Closes #1962, #1957
2021-10-08 10:35:06 +02:00
Safihre 9d8c62de6b Only fail jobs if the sorter should have renamed 2021-10-08 10:35:06 +02:00
Safihre 3229fd8d28 Use general detection of RAR-files in file-extension correction
Correct file_extension test
2021-10-08 10:35:06 +02:00
SABnzbd Automation fdee789637 Update translatable texts 2021-10-08 08:34:20 +00:00
Safihre c762dda1b1 Fix tavern for Python 3.6 and run tests on Python 3.10 (Linux-only) 2021-10-08 10:33:37 +02:00
SABnzbd Automation c5c8b902c4 Update translatable texts 2021-10-06 12:36:55 +00:00
Safihre ee255a5042 Require at least 1 category to be set for Sorting and warn if not set
Before 3.4.0, only for TV sorting we allowed to set 0 categories. But for Movies and Date Sorting we did require at least 1 category to be set. This was harmonized in 3.4.0, breaking existing setups. Added warning for those users.
The Sorting behavior is different from Notifications: in Notifications selecting Default only(!) means to apply it to all categories.
However, that has never been the case for Sorting. So for now added a bit more help texts to the Affected categories box on both pages.
2021-10-06 14:34:15 +02:00
Sander 3952965632 make .cbz a well-known extension, so that no extension is added (#1960) 2021-10-05 22:00:30 +02:00
Safihre 85db706bbe Always require TLS1.2 or higher for NNTP connections 2021-10-05 17:32:39 +02:00
Safihre ea570442c6 Update Wiki-URL to 3.5 2021-10-05 17:21:29 +02:00
Safihre 9c109b803d Do not fail all jobs if one job fails in order to locate the failing job 2021-10-05 12:29:37 +02:00
Safihre 86f77f8064 Only run Transifex if the TX_TOKEN is set 2021-10-05 12:26:34 +02:00
Sander 81c33d65e4 make .cbr a well-known extension, so that no extension (".rar") is added (#1959) 2021-10-05 10:11:52 +02:00
SABnzbd Automation a1cf822141 Update translatable texts 2021-10-03 08:06:24 +00:00
Safihre ce48a9697a Check for puremagic and guessit first and add comments about cherrypy 2021-10-03 10:05:39 +02:00
Safihre 9b22c4b23c Always show number of MB missing
https://forums.sabnzbd.org/viewtopic.php?f=2&t=25573
2021-10-03 09:59:26 +02:00
Safihre 6283b0460a Job failure due to Sorting-problems was not shown in the interface 2021-10-01 15:43:13 +02:00
Safihre 4fe977fa47 rXX files are popular extensions and don't need renames
Closes #1955
2021-09-29 09:17:19 +02:00
SABnzbd Automation f188e55692 Update translatable texts 2021-09-29 06:37:30 +00:00
Safihre f5487ed932 Do not search whole file when checking if txt or nzb file 2021-09-29 08:36:48 +02:00
Safihre c69b25ff0d Only run process_unpacked_par2 when cleanup happened
Relates to https://forums.sabnzbd.org/viewtopic.php?f=1&t=25552
2021-09-29 08:24:27 +02:00
SABnzbd Automation b608af640f Update translatable texts 2021-09-27 18:22:43 +00:00
puzzledsab 315f1ff3bc Add required server option (#1948)
* Add required server option

* Use plan_resume() instead of the resume_task system

* Retry articles on required servers after connection failure

* Update comment to match new code

* Remove unnecessary try
2021-09-27 20:22:02 +02:00
Safihre b6c2ac194b Set version information to 3.5.0-develop 2021-09-24 13:41:12 +02:00
Safihre 00570d2089 Make add_parfile return if it could actually add the file
Maybe it was long finished, which could result in crashes.
Closes #1953
2021-09-24 08:57:53 +02:00
Safihre 56375b16fe Do not rename in decode_par2 if the filename didn't change
Closes #1952
2021-09-23 10:00:19 +02:00
Safihre 447a7b684c Update text files for 3.4.1 2021-09-23 08:50:04 +02:00
Safihre 82379481dd Revert "Un-pin version of PyInstaller"
This reverts commit a95714710b.
2021-09-23 08:44:44 +02:00
puzzledsab 06f9e28170 Don't show undefined if metric is bytes in speedometer slider (#1951) 2021-09-22 13:52:57 +02:00
Safihre d89b6f814b Update text files for 3.4.0 2021-09-17 20:41:13 +02:00
SABnzbd Automation fad69356c1 Update translatable texts 2021-09-17 18:38:28 +00:00
Safihre 2285c6e430 Small refactor of the new content-disposition parsing 2021-09-17 20:36:34 +02:00
p0ps c1b9b727e6 Correctly parse the filename in content-disposition header. (#1946)
* Implement regex to match the filename in the content-disposition header.

The following srings will match:
filename=Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb; filename*=UTF-8''Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb
filename=Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb;
filename*=UTF-8''Zombie.Land.Saga.Revenge.S02E12.480p.x264-mSD.nzb

* Missed quote

* Implement the mailbox/Message solution
* Add basic tests

* Add `attachment;`

* Add example with attachment.

* Fix some linting.
* Added edge case tests.

* Added comment.

* Added test to include path elements.

* Only try the content-disposition header when it has `filename` in it

* Project uses double quotes.

* Update test.
* Add `attachment;`

* black formatter

* remove release names.

* trailing commas

* quote enclosures
2021-09-11 22:56:17 +02:00
Safihre a95714710b Un-pin version of PyInstaller 2021-09-08 09:12:18 +02:00
Safihre 82268b58e2 Update Python build version to 3.9.7 2021-09-01 23:45:30 +02:00
Safihre 0dd7e71fd1 Update text files for 3.4.0 RC 1 2021-09-01 23:35:26 +02:00
Safihre 63f1d2905f Correct reference to Sorter vs BaseSorter
Closes #1941
2021-08-14 09:35:50 +02:00
SABnzbd Automation ea9b409a04 Update translatable texts 2021-08-13 10:11:22 +00:00
Safihre 8957a8421d Update text files for 3.4.0 Beta 2 2021-08-13 12:10:42 +02:00
SABnzbd Automation 7c171081c6 Update translatable texts 2021-08-13 07:50:29 +00:00
Safihre e4520e9e16 Prevent crashing Assembler from missing saved_articles
Closes #1933
2021-08-13 09:49:41 +02:00
SABnzbd Automation 336c373dd0 Update translatable texts 2021-08-02 13:05:22 +00:00
Safihre fc721f31c5 Only run recover_par2_names if all_ok 2021-08-02 15:04:31 +02:00
Safihre 062ed9f7b8 decode_par2 should return a list
Yeah Typing
2021-08-01 17:10:18 +02:00
SABnzbd Automation 59a915cdac Update translatable texts 2021-08-01 14:43:07 +00:00
Safihre 191f7d2152 Warning instead of Info when we restart due to crashed threads
Closes #1936
2021-08-01 16:42:09 +02:00
puzzledsab a76e9c2c1f Always deobfuscate names from par2 (#1935)
* Always deobfuscate names from par2

* Different par2 test

* Different par2 test take 2

* Make par2 filename decoding optional and add some typing

* Rename variable
2021-07-30 16:01:30 +02:00
SABnzbd Automation 9d616459b7 Update translatable texts 2021-07-28 12:32:51 +00:00
Safihre 82fa42d182 Correct sorting test 2021-07-28 14:26:08 +02:00
Safihre 0c36aaa5ff nzo.correct_password was not always defined
Closes #1932
2021-07-25 17:35:44 +02:00
Safihre a9761464a0 Only run Direct Unpack if enable_unrar=1 2021-07-25 10:28:55 +02:00
Safihre 355d02faa3 Sorting would always update final path even if disabled 2021-07-25 09:58:13 +02:00
jcfp 1052f37d02 create a record for the successful password (#1919)
* create a record for the successful password

* make get_all_passwords not return all, expand nzo.correct_password to directunpacker
2021-07-23 14:35:00 +02:00
449 changed files with 79047 additions and 50776 deletions

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
# `git blame` master ignore list.
#
# This file contains a list of git hashes of revisions to be ignored
# by `git blame`. These revisions are considered "unimportant" in
# that they are unlikely to be what you are interested in when blaming.
# They are typically expected to be formatting-only changes.
#
# It can be used for `git blame` using `--ignore-revs-file` or by
# setting `blame.ignoreRevsFile` in the `git config`[1].
#
# Ignore these commits when reporting with blame. Calling
#
# git blame --ignore-revs-file .git-blame-ignore-revs
#
# will tell `git blame` to ignore changes made by these revisions when
# assigning blame, as if the change never happened.
#
# You can enable this as a default for your local repository by
# running
#
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# This will probably be automatically picked by your IDE
# (VSCode+GitLens and JetBrains products are confirmed to do this).
#
# Important: if you are switching to a branch without this file,
# `git blame` will fail with an error.
#
# GitHub also excludes the commits listed below from its "Blame"
# views[2][3].
#
# [1]: https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile
# [2]: https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/
# [3]: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
# Black changes
465a88154152fb0607a63fa24c8446bff43ec886
f06891926661986fff52d6eb4b4cb120c71972d1
9bcbcaefdfecc85aedfd8e2f8aaa1ca7f959404e
433dcab02b29f7bd3827e237434034deecc1b549
9f6a9f991222efccc87b45a701086c95629c67b6
f89114ca7e1b20bf8e645ecd0b52b707ec857aa9
+32
View File
@@ -0,0 +1,32 @@
name: Bug report
description: >
Did you discover a bug in SABnzbd? Report it here!
If you are not 100% certain this is a bug please go to our forums, Reddit or Discord server first.
labels:
- Support
type: bug
body:
- type: input
attributes:
label: SABnzbd version
validations:
required: true
- type: input
attributes:
label: Operating system
validations:
required: true
- type: dropdown
attributes:
label: Using Docker image
options:
- linuxserver
- hotio
- binhex
- Other
- type: textarea
attributes:
label: Description
description: Include error logs directly or link to extended logs on https://pastebin.com/
validations:
required: true
+11
View File
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Support forum
url: https://forums.sabnzbd.org/
about: Support questions can be asked on our forums, Reddit or Discord server.
- name: Discord
url: https://discord.sabnzbd.org
about: Support questions can be asked on our forums, Reddit or Discord server.
- name: Reddit - r/sabnzbd
url: https://www.reddit.com/r/sabnzbd
about: Support questions can be asked on our forums, Reddit or Discord server.
@@ -0,0 +1,11 @@
name: Feature request
description: What new feature would you like to have added to SABnzbd?
labels:
- Support
type: feature
body:
- type: textarea
attributes:
label: Description
validations:
required: true
+69
View File
@@ -0,0 +1,69 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":disableDependencyDashboard"
],
"schedule": [
"before 8am on Monday"
],
"minimumReleaseAge": "14 days",
"baseBranches": ["develop"],
"pip_requirements": {
"fileMatch": [
"requirements.txt",
"tests/requirements.txt",
"builder/requirements.txt",
"builder/release-requirements.txt"
]
},
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^\\.github/workflows/build_release\\.yml$"],
"matchStrings": ["PYTHON_VERSION:\\s*\"(?<currentValue>.*?)\""],
"datasourceTemplate": "python-version",
"depNameTemplate": "python"
},
{
"customType": "regex",
"fileMatch": ["^sabnzbd/constants\\.py$"],
"matchStrings": ["SABCTOOLS_VERSION_REQUIRED\\s*=\\s*\"(?<currentValue>.*?)\""],
"datasourceTemplate": "pypi",
"depNameTemplate": "sabctools"
},
{
"customType": "regex",
"fileMatch": ["^\\.github/workflows/translations\\.yml$"],
"matchStrings": ["TX_VERSION=\"(?<currentValue>.*?)\""],
"datasourceTemplate": "github-releases",
"depNameTemplate": "transifex/cli"
}
],
"ignorePaths": [],
"ignoreDeps": [
"jaraco.text",
"jaraco.context",
"jaraco.collections",
"tempora",
"cryptography"
],
"packageRules": [
{
"matchManagers": ["github-actions"],
"matchPackageNames": ["windows", "macos"],
"enabled": false
},
{
"matchPackagePatterns": [
"*"
],
"groupName": "all dependencies",
"groupSlug": "all",
"separateMajorMinor": false,
"automerge": true
}
],
"automergeStrategy": "squash",
"platformAutomerge": true
}
-23
View File
@@ -1,23 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "Feature request"
- "Work in progress"
- "Bug"
# Label to use when marking an issue as stale
staleLabel: "Stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
-22
View File
@@ -1,22 +0,0 @@
name: Black Code Formatter
on: [push, pull_request]
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Black Code Formatter
uses: lgeiger/black-action@master
with:
args: >
SABnzbd.py
sabnzbd
scripts
tools
builder
tests
--line-length=120
--target-version=py36
--check
--diff
+189 -81
View File
@@ -2,113 +2,221 @@ name: Build binaries and source distribution
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Setting PYTHONNODEBUGRANGES reduces binary size
PYTHONNODEBUGRANGES: 1
# For macOS we download the official Python, because the GitHub one only support newer macOS 11+ versions
# We also use the specific pin for Windows release, so Renovate can update it all at once
PYTHON_VERSION: "3.14.7"
jobs:
build_windows:
name: Build Windows binary
runs-on: windows-latest
env:
AUTOMATION_GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
name: Build Windows binary (${{ matrix.architecture }})
strategy:
fail-fast: false
matrix:
include:
- architecture: x64
runs-on: windows-2022
- architecture: arm64
runs-on: windows-11-arm
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9 (64bit)
uses: actions/setup-python@v2
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: 3.9
architecture: x64
- name: Install Python dependencies (64bit)
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.architecture }}
cache: pip
cache-dependency-path: "**/requirements.txt"
- name: Install Python dependencies
# Without dependencies to make sure everything is covered in the requirements.txt
# Special settings:
# cryptography see https://github.com/pyca/cryptography/pull/14216
run: |
python --version
pip install --upgrade pip wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -r builder/requirements.txt
- name: Build source distribution
run: python builder/package.py source
- name: Upload source distribution
uses: actions/upload-artifact@v2
with:
path: "*-src.tar.gz"
name: Source distribution
- name: Build Windows standalone binary and installer (64bit)
run: python builder/package.py installer
- name: Upload Windows standalone binary (64bit)
uses: actions/upload-artifact@v2
with:
path: "*-win64-bin.zip"
name: Windows Windows standalone binary (64bit)
- name: Upload Windows installer (64bit)
uses: actions/upload-artifact@v2
with:
path: "*-win-setup.exe"
name: Windows installer
- name: Set up Python 3.8 (32bit and legacy)
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x86
- name: Install Python dependencies (32bit and legacy)
run: |
python --version
pip install --upgrade pip wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -r builder/requirements.txt
- name: Build Windows standalone binary (32bit and legacy)
python -m pip install --upgrade pip wheel
pip install -r requirements.txt --no-dependencies --only-binary=cryptography
pip install -r builder/requirements.txt --no-dependencies
- name: Build Windows standalone binary
id: windows_binary
run: python builder/package.py binary
- name: Upload Windows standalone binary (32bit and legacy)
uses: actions/upload-artifact@v2
- name: Upload Windows standalone binary (unsigned)
# When releasing, SignPath consumes this artifact directly and requires the
# zip-in-zip layout because they don't support the archive-flag
uses: actions/upload-artifact@v7
id: upload-unsigned-binary
with:
path: "*-win32-bin.zip"
name: Windows Windows standalone binary (32bit and legacy)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python builder/package.py release
archive: ${{ contains(github.ref, 'refs/tags/') }}
path: "*-win*-bin.zip"
name: Windows standalone binary (${{ matrix.architecture }})
- name: Sign Windows standalone binary
uses: signpath/github-action-submit-signing-request@v2
if: contains(github.ref, 'refs/tags/')
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORG_ID }}
project-slug: "sabnzbd"
artifact-configuration-slug: "sabnzbd-binary"
signing-policy-slug: "release-signing"
github-artifact-id: ${{ steps.upload-unsigned-binary.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: "signed"
- name: Upload Windows standalone binary (signed)
# The release file is a .zip, which download-artifact would extract if
# uploaded raw, so keep it archived and let the release job unpack it
uses: actions/upload-artifact@v7
if: contains(github.ref, 'refs/tags/')
with:
name: Windows standalone binary (${{ matrix.architecture }}, signed)
path: "signed/*-win*-bin.zip"
- name: Build Windows installer
if: matrix.architecture == 'x64'
run: python builder/package.py installer
- name: Upload Windows installer
if: matrix.architecture == 'x64'
uses: actions/upload-artifact@v7
id: upload-unsigned-installer
with:
archive: ${{ contains(github.ref, 'refs/tags/') }}
path: "*-win-setup.exe"
name: Windows installer (${{ matrix.architecture }})
- name: Sign Windows installer
if: matrix.architecture == 'x64' && contains(github.ref, 'refs/tags/')
uses: signpath/github-action-submit-signing-request@v2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORG_ID }}
project-slug: "sabnzbd"
artifact-configuration-slug: "sabnzbd-installer"
signing-policy-slug: "release-signing"
github-artifact-id: ${{ steps.upload-unsigned-installer.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: "signed"
- name: Upload Windows installer (signed)
if: matrix.architecture == 'x64' && contains(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v7
with:
archive: false
path: "signed/*-win-setup.exe"
build_macos:
name: Build macOS binary
runs-on: macos-latest
runs-on: macos-14
timeout-minutes: 15
env:
SIGNING_AUTH: ${{ secrets.SIGNING_AUTH }}
NOTARIZATION_USER: ${{ secrets.NOTARIZATION_USER }}
NOTARIZATION_PASS: ${{ secrets.NOTARIZATION_PASS }}
AUTOMATION_GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
# 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.9.5
MACOSX_DEPLOYMENT_TARGET: 10.9
MACOSX_DEPLOYMENT_TARGET: "10.15"
# We need to force compile for universal2 support
CFLAGS: -arch x86_64 -arch arm64
ARCHFLAGS: -arch x86_64 -arch arm64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
- name: Set up Python
# Only use this for the caching of pip packages!
uses: actions/setup-python@v7
with:
python-version: "3.14"
cache: pip
cache-dependency-path: "**/requirements.txt"
- name: Cache Python download
id: cache-python-download
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/python.pkg
key: macOS-Python-${{ env.PYTHON_VERSION }}
- name: Get Python
key: cache-macOS-Python-${{ env.PYTHON_VERSION }}
- name: Get Python from python.org
if: steps.cache-python-download.outputs.cache-hit != 'true'
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg -o ~/python.pkg
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.pkg -o ~/python.pkg
- name: Install Python
run: sudo installer -pkg ~/python.pkg -target /
- name: Install Python dependencies
# We have to manually compile some modules as they don't automatically fetch universal2 binaries
run: |
python3 --version
pip3 install --upgrade pip wheel
pip3 install --upgrade -r requirements.txt
pip3 install --upgrade -r builder/requirements.txt
pip3 install -r requirements.txt --no-binary cffi,CT3,PyYAML,httptools --no-dependencies
pip3 install -r builder/requirements.txt --no-dependencies
- name: Import macOS codesign certificates
uses: apple-actions/import-codesign-certs@v1
if: env.SIGNING_AUTH
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Build macOS binary
# Taken from https://github.com/Apple-Actions/import-codesign-certs/pull/27 (comments)
env:
CERTIFICATES_P12: ${{ secrets.CERTIFICATES_P12 }}
CERTIFICATES_P12_PASSWORD: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
MACOS_KEYCHAIN_TEMP_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_TEMP_PASSWORD }}
if: env.CERTIFICATES_P12
run: |
python3 builder/package.py app
python3 builder/make_dmg.py
- name: Upload macOS binary
uses: actions/upload-artifact@v2
echo $CERTIFICATES_P12 | base64 --decode > certificate.p12
security create-keychain -p "$MACOS_KEYCHAIN_TEMP_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$MACOS_KEYCHAIN_TEMP_PASSWORD" build.keychain
security set-keychain-settings -lut 21600 build.keychain
security import certificate.p12 -k build.keychain -P "$CERTIFICATES_P12_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productsign -T /usr/bin/xcrun
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_KEYCHAIN_TEMP_PASSWORD" build.keychain
- name: Build source distribution
# Run this on macOS so the line endings are correct by default
run: python builder/package.py source
- name: Upload source distribution
uses: actions/upload-artifact@v7
with:
path: "*-osx.dmg"
name: macOS binary (not notarized)
- name: Prepare official release
if: env.AUTOMATION_GITHUB_TOKEN && startsWith(github.ref, 'refs/tags/')
run: python3 builder/package.py release
archive: false
path: "*-src.tar.gz"
- name: Build macOS binary
env:
SIGNING_AUTH: ${{ secrets.SIGNING_AUTH }}
NOTARIZATION_USER: ${{ secrets.NOTARIZATION_USER }}
NOTARIZATION_PASS: ${{ secrets.NOTARIZATION_PASS }}
run: |
python3 builder/package.py app dmg
- name: Upload macOS binary
uses: actions/upload-artifact@v7
with:
archive: false
path: "*-macos.dmg"
release:
name: Prepare Release
runs-on: ubuntu-latest
needs: [build_windows, build_macos]
if: contains(github.ref, 'refs/tags/')
environment: release
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.14"
cache: pip
cache-dependency-path: "builder/release-requirements.txt"
- name: Download release artifacts
# The installer, source and macOS builds are uploaded with archive: false,
# so their artifact name is the release filename
uses: actions/download-artifact@v8
with:
pattern: "SABnzbd-*"
merge-multiple: true
- name: Download signed Windows binaries
# These stay archived (.zip release files), so download-artifact unpacks
# them back into the release .zip
uses: actions/download-artifact@v8
with:
pattern: "*signed*"
merge-multiple: true
- name: Prepare official release
env:
AUTOMATION_GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
REDDIT_TOKEN: ${{ secrets.REDDIT_TOKEN }}
LINUXSERVER_WEBHOOK_TOKEN: ${{ secrets.LINUXSERVER_WEBHOOK_TOKEN }}
DISCORD_WEBHOOK_TESTING: ${{ secrets.DISCORD_WEBHOOK_TESTING }}
DISCORD_WEBHOOK_STABLE: ${{ secrets.DISCORD_WEBHOOK_STABLE }}
run: |
pip3 install -r builder/release-requirements.txt --no-dependencies
python3 builder/release.py
+91
View File
@@ -0,0 +1,91 @@
name: Build and publish Snap packages
on:
push:
paths:
- 'snap/**'
- 'requirements.txt'
- '.github/workflows/build_snaps.yml'
pull_request:
paths:
- 'snap/**'
- 'requirements.txt'
- '.github/workflows/build_snaps.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-snap:
name: Build Snap Packages (${{ matrix.linux_arch }})
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
linux_arch: x64
- os: ubuntu-24.04-arm
linux_arch: arm64
steps:
- uses: actions/checkout@v7
- name: Cache par2cmdline-turbo tarball
uses: actions/cache@v6
id: cache-par2cmdline
# Clearing the cache in case of new version requires manual clearing in GitHub!
with:
path: snap/par2cmdline.tar.gz
key: cache-par2cmdline
- name: Download par2cmdline-turbo tarball
if: steps.cache-par2cmdline.outputs.cache-hit != 'true'
run: |
PAR2_TARBALL=$(curl -sL https://api.github.com/repos/animetosho/par2cmdline-turbo/releases/latest | jq -r '.tarball_url')
curl -o snap/par2cmdline.tar.gz -L "$PAR2_TARBALL"
- uses: snapcore/action-build@v1
name: Build snap
id: snapcraft
- name: Test snap installation
run: |
sudo snap install --dangerous *.snap
sudo snap connect sabnzbd:removable-media
# Installing a daemon snap starts the service automatically.
if ! curl -fsSL -o /dev/null \
--retry 30 --retry-delay 2 --retry-connrefused --retry-all-errors \
http://127.0.0.1:8080/; then
echo "::error::SABnzbd web UI did not come up"
sudo snap logs sabnzbd -n 200 || true
systemctl status snap.sabnzbd.sabnzbd.service --no-pager || true
exit 1
fi
echo "SABnzbd web UI responded"
sudo snap remove sabnzbd
- name: Upload snap
uses: actions/upload-artifact@v7
with:
name: Snap package (${{ matrix.linux_arch }})
path: ${{ steps.snapcraft.outputs.snap }}
- name: Determine snap channel
if: contains(github.ref, 'refs/tags/')
id: snap-channel
run: |
TAG="${GITHUB_REF#refs/tags/}"
if [[ "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "channel=stable,beta" >> "$GITHUB_OUTPUT"
else
echo "channel=beta" >> "$GITHUB_OUTPUT"
fi
- name: Publish snap
uses: snapcore/action-publish@v1
if: contains(github.ref, 'refs/tags/')
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
with:
store_login: ${{ secrets.SNAP_TOKEN }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: ${{ steps.snap-channel.outputs.channel }}
+32
View File
@@ -0,0 +1,32 @@
name: "Claude Review (manual)"
on:
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
issues: read
jobs:
review:
name: "Review PR on @claude mention"
# Only PR comments containing @claude, and only from maintainers
if: >
github.repository_owner == 'sabnzbd' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Full history so the review can diff the PR against its base branch
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# Actual triggering is gated by the job-level `if` above; this disables
# the action's internal write-permission check, which contributors fail
allowed_non_write_users: "*"
+47 -13
View File
@@ -2,38 +2,72 @@ name: CI Tests
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
black-and-ruff:
name: Black and Ruff checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: pip install ruff black
- name: Black code formatter
run: >
black
SABnzbd.py
sabnzbd
scripts
builder
builder/SABnzbd.spec
tests
tools
--check
--diff
- name: Ruff checks
run: ruff check
test:
name: Test ${{ matrix.name }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-20.04]
# TODO: Remove libxml2-dev libxslt-dev below once 3.15 is stable and lxml releases wheels!
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev" ]
name: ["Linux"]
os: [ubuntu-latest]
include:
- name: macOS
os: macos-latest
python-version: 3.9
python-version: "3.14"
- name: Windows
os: windows-latest
python-version: 3.9
os: windows-2022
python-version: "3.14"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "**/requirements.txt"
- name: Install system dependencies
if: runner.os == 'Linux'
run: sudo apt-get install unrar p7zip-full par2 chromium-chromedriver
run: sudo apt-get install unrar 7zip par2 libxml2-dev libxslt-dev
- name: Install Python dependencies
run: |
python --version
pip install --upgrade pip
pip install --upgrade -r requirements.txt
python -m pip install --upgrade pip wheel
pip install -r requirements.txt --no-dependencies
pip install --upgrade -r tests/requirements.txt
- name: Install Playwright browser
run: python -m playwright install chromium --with-deps
- name: Test SABnzbd
run: pytest -s
run: pytest -n auto --dist loadscope
+37
View File
@@ -0,0 +1,37 @@
name: "Close and lock old issues"
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
stale:
name: "Close stale issues"
if: github.repository_owner == 'sabnzbd'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v11
with:
days-before-stale: 21
days-before-close: 7
stale-issue-label: "Stale"
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
only-issue-labels: "Support"
lock:
name: "Lock old issues"
if: github.repository_owner == 'sabnzbd'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v6
with:
log-output: true
issue-inactive-days: 60
pr-inactive-days: 60
+38 -16
View File
@@ -5,32 +5,54 @@ on:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
translations:
name: Update translatable texts
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
with:
# Need the parent commit too so we can diff HEAD and detect local translation edits
fetch-depth: 2
- name: Generate translatable texts
run: |
python3 tools/extract_pot.py
- name: Install Transifex client
# Sudo is needed to link the "tx"-command
run: |
sudo -H python3 -m pip install setuptools wheel
sudo -H python3 -m pip install transifex-client
- name: Push/pull Transifex translations
if: env.TX_TOKEN
# We use fixed version and manual download (instead of their sh script) to prevent potential supply-chain attack.
# Changes are commited directly to the repo, so this is quite sensative and worth the extra hassle!
# When the current commit contains local translation edits (changes to po/**/*.po), we add --translation so
# those edits are pushed to Transifex. Note: this overwrites the matching translations in Transifex with our
# local versions, so we only do it when local .po files actually changed.
run: |
tx push --source --parallel
tx pull --all --force --parallel
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
TX_VERSION="v1.6.17"
curl -fsSL "https://github.com/transifex/cli/releases/download/${TX_VERSION}/tx-linux-amd64.tar.gz" -o tx-linux-amd64.tar.gz
tar -xzf tx-linux-amd64.tar.gz
PUSH_ARGS="--source"
if git show --name-only --format= HEAD | grep -qE '^po/.+\.po$'; then
echo "Local translation edits detected; also pushing translations to Transifex."
PUSH_ARGS="--source --translation"
fi
./tx push ${PUSH_ARGS}
./tx pull --all --force
- name: Compile translations to validate them
run: |
python3 tools/make_mo.py
- name: Push translatable and translated texts back to repo
uses: stefanzweifel/git-auto-commit-action@v4.5.1
with:
commit_message: Update translatable texts
commit_user_name: SABnzbd Automation
commit_user_email: bugs@sabnzbd.org
commit_author: SABnzbd Automation <bugs@sabnzbd.org>
if: env.TX_TOKEN
run: |
git config user.name "SABnzbd Automation"
git config user.email "bugs@sabnzbd.org"
git add po/*.pot po/*.po *.nsi
git diff --cached --quiet || git commit -m "Update translatable texts" -m "[skip ci]"
git push
+201
View File
@@ -0,0 +1,201 @@
name: Update bundled tools
on:
schedule:
# Nightly check for new releases of the bundled tools
- cron: "30 4 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
unrar:
name: Update unrar
if: github.repository == 'sabnzbd/sabnzbd'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
BRANCH: automation/update-unrar
steps:
- uses: actions/checkout@v7
- name: Determine latest unrar version
id: version
run: |
RAW_VERSION=$(curl -fsSL --retry 3 https://www.rarlab.com/download.htm -o- | sed -n 's%.*/rarmacos-x64-\([0-9]\+\)\.tar\.gz.*%\1%p' | head -1)
if [ -z "$RAW_VERSION" ]; then
echo "Could not determine the latest unrar version from the rarlab download page"
exit 1
fi
# Version is encoded without separator, e.g. 723 = 7.23
VERSION="${RAW_VERSION%??}.${RAW_VERSION: -2}"
echo "Latest unrar version: $VERSION"
echo "raw_version=$RAW_VERSION" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Download and extract new binaries
env:
RAW_VERSION: ${{ steps.version.outputs.raw_version }}
run: |
mkdir -p "$RUNNER_TEMP/unrar"
cd "$RUNNER_TEMP/unrar"
for FILE in "rarmacos-x64-$RAW_VERSION.tar.gz" "rarmacos-arm-$RAW_VERSION.tar.gz" "winrar-x64-$RAW_VERSION.exe"; do
curl -fsSL --retry 3 -o "$FILE" "https://www.rarlab.com/rar/$FILE"
done
mkdir macos-x64 macos-arm64 windows
tar -xzf "rarmacos-x64-$RAW_VERSION.tar.gz" -C macos-x64
tar -xzf "rarmacos-arm-$RAW_VERSION.tar.gz" -C macos-arm64
# Unpack UnRAR.exe from the WinRAR installer, which is a self-extracting
# RAR archive that the preinstalled 7-Zip can read
7z x -y -owindows "winrar-x64-$RAW_VERSION.exe" UnRAR.exe > /dev/null
- name: Copy binaries into the repository
run: |
install -m 755 "$RUNNER_TEMP/unrar/macos-x64/rar/unrar" macos/unrar/unrar
install -m 755 "$RUNNER_TEMP/unrar/macos-arm64/rar/unrar" macos/unrar/arm64/unrar
install -m 755 "$RUNNER_TEMP/unrar/windows/UnRAR.exe" win/unrar/UnRAR.exe
- name: Create pull request
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
if git diff --quiet; then
echo "Bundled unrar is already at version $VERSION"
exit 0
fi
git config user.name "SABnzbd Automation"
git config user.email "bugs@sabnzbd.org"
git add macos/unrar win/unrar
git commit -m "unrar $VERSION"
# Skip the push if an open PR already contains these exact binaries
OPEN_PRS=$(gh pr list --head "$BRANCH" --state open --json number --jq length)
if [ "$OPEN_PRS" != "0" ] && git fetch origin "$BRANCH" && git diff --quiet FETCH_HEAD HEAD -- macos/unrar win/unrar; then
echo "Existing pull request already updates unrar to $VERSION"
exit 0
fi
git push --force origin "HEAD:refs/heads/$BRANCH"
if [ "$OPEN_PRS" = "0" ]; then
gh pr create --head "$BRANCH" --title "unrar $VERSION" --body "Automated update of the bundled unrar binaries to version $VERSION.
[Changelog](https://www.rarlab.com/rarnew.htm)"
fi
sevenzip:
name: Update 7-Zip
if: github.repository == 'sabnzbd/sabnzbd'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
BRANCH: automation/update-7zip
steps:
- uses: actions/checkout@v7
- name: Determine latest 7-Zip version
id: version
run: |
VERSION=$(gh api repos/ip7z/7zip/releases/latest --jq .tag_name)
# Assets are named without separator, e.g. 7z2602-extra.7z for 26.02
RAW_VERSION="${VERSION//./}"
echo "Latest 7-Zip version: $VERSION"
echo "raw_version=$RAW_VERSION" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Download and extract new binaries
env:
RAW_VERSION: ${{ steps.version.outputs.raw_version }}
VERSION: ${{ steps.version.outputs.version }}
run: |
mkdir -p "$RUNNER_TEMP/7zip"
cd "$RUNNER_TEMP/7zip"
gh release download "$VERSION" --repo ip7z/7zip \
--pattern "7z$RAW_VERSION-extra.7z" --pattern "7z$RAW_VERSION-mac.tar.xz"
mkdir macos windows
tar -xJf "7z$RAW_VERSION-mac.tar.xz" -C macos
# The preinstalled 7-Zip unpacks the extra package that contains
# the standalone Windows console version
7z x -y -owindows "7z$RAW_VERSION-extra.7z" 7za.exe > /dev/null
- name: Copy binaries into the repository
run: |
install -m 644 "$RUNNER_TEMP/7zip/windows/7za.exe" win/7zip/7za.exe
install -m 755 "$RUNNER_TEMP/7zip/macos/7zz" macos/7zip/7zz
- name: Create pull request
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
if git diff --quiet; then
echo "Bundled 7-Zip is already at version $VERSION"
exit 0
fi
git config user.name "SABnzbd Automation"
git config user.email "bugs@sabnzbd.org"
git add macos/7zip win/7zip
git commit -m "7-Zip $VERSION"
# Skip the push if an open PR already contains these exact binaries
OPEN_PRS=$(gh pr list --head "$BRANCH" --state open --json number --jq length)
if [ "$OPEN_PRS" != "0" ] && git fetch origin "$BRANCH" && git diff --quiet FETCH_HEAD HEAD -- macos/7zip win/7zip; then
echo "Existing pull request already updates 7-Zip to $VERSION"
exit 0
fi
git push --force origin "HEAD:refs/heads/$BRANCH"
if [ "$OPEN_PRS" = "0" ]; then
gh pr create --head "$BRANCH" --title "7-Zip $VERSION" --body "Automated update of the bundled 7-Zip binaries to version $VERSION.
[Release notes](https://github.com/ip7z/7zip/releases/tag/$VERSION)"
fi
par2:
name: Update par2cmdline-turbo
if: github.repository == 'sabnzbd/sabnzbd'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
BRANCH: automation/update-par2
steps:
- uses: actions/checkout@v7
- name: Determine latest par2cmdline-turbo version
id: version
run: |
TAG=$(gh api repos/animetosho/par2cmdline-turbo/releases/latest --jq .tag_name)
# Assets are named without the leading v, e.g. par2cmdline-turbo-1.4.0-win-x64.zip for tag v1.4.0
VERSION="${TAG#v}"
echo "Latest par2cmdline-turbo version: $VERSION"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Download and extract new binaries
env:
TAG: ${{ steps.version.outputs.tag }}
VERSION: ${{ steps.version.outputs.version }}
run: |
mkdir -p "$RUNNER_TEMP/par2"
cd "$RUNNER_TEMP/par2"
for ARCH in win-x64 win-arm64 macos-universal; do
gh release download "$TAG" --repo animetosho/par2cmdline-turbo \
--pattern "par2cmdline-turbo-$VERSION-$ARCH.zip"
unzip -q -d "$ARCH" "par2cmdline-turbo-$VERSION-$ARCH.zip"
done
- name: Copy binaries into the repository
run: |
install -m 644 "$RUNNER_TEMP/par2/win-x64/par2.exe" win/par2/par2.exe
install -m 644 "$RUNNER_TEMP/par2/win-arm64/par2.exe" win/par2/arm64/par2.exe
install -m 755 "$RUNNER_TEMP/par2/macos-universal/par2" macos/par2/par2
- name: Create pull request
env:
TAG: ${{ steps.version.outputs.tag }}
VERSION: ${{ steps.version.outputs.version }}
run: |
if git diff --quiet; then
echo "Bundled par2cmdline-turbo is already at version $VERSION"
exit 0
fi
git config user.name "SABnzbd Automation"
git config user.email "bugs@sabnzbd.org"
git add macos/par2 win/par2
git commit -m "par2cmdline-turbo $VERSION"
# Skip the push if an open PR already contains these exact binaries
OPEN_PRS=$(gh pr list --head "$BRANCH" --state open --json number --jq length)
if [ "$OPEN_PRS" != "0" ] && git fetch origin "$BRANCH" && git diff --quiet FETCH_HEAD HEAD -- macos/par2 win/par2; then
echo "Existing pull request already updates par2cmdline-turbo to $VERSION"
exit 0
fi
git push --force origin "HEAD:refs/heads/$BRANCH"
if [ "$OPEN_PRS" = "0" ]; then
gh pr create --head "$BRANCH" --title "par2cmdline-turbo $VERSION" --body "Automated update of the bundled par2cmdline-turbo binaries to version $VERSION.
[Release notes](https://github.com/animetosho/par2cmdline-turbo/releases/tag/$TAG)"
fi
+5 -10
View File
@@ -29,25 +29,20 @@ SABnzbd-*/
# WingIDE/PyCharm project files
*.wp[ru]
.idea
# VScode
.vscode/
# Testing folders
.cache
.xprocess
.pytest*
tests/cache
tests/cache_gw*
# General junk
*.keep
*.bak
*.log
# Some people use Emacs as an editor
\#*
.\#*
# Ignore all hidden directories at repo root, except used ones
.*/
!.github/
!.tx/
# Apple
.DS_Store
+3 -4
View File
@@ -1,24 +1,23 @@
[main]
host = https://www.transifex.com
[sabnzbd-translations.po-main-sabnzbd-pot--develop]
[o:sabnzbd:p:sabnzbd-translations:r:po-main-sabnzbd-pot--develop]
file_filter = po/main/<lang>.po
minimum_perc = 0
source_file = po/main/SABnzbd.pot
source_lang = en
type = PO
[sabnzbd-translations.po-email-sabemail-pot--develop]
[o:sabnzbd:p:sabnzbd-translations:r:po-email-sabemail-pot--develop]
file_filter = po/email/<lang>.po
minimum_perc = 0
source_file = po/email/SABemail.pot
source_lang = en
type = PO
[sabnzbd-translations.po-nsis-sabnsis-pot--develop]
[o:sabnzbd:p:sabnzbd-translations:r:po-nsis-sabnsis-pot--develop]
file_filter = po/nsis/<lang>.po
minimum_perc = 0
source_file = po/nsis/SABnsis.pot
source_lang = en
type = PO
+6 -19
View File
@@ -1,10 +1,11 @@
(c) Copyright 2007-2021 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2026 by The SABnzbd-Team (sabnzbd.org)
The SABnzbd-team is:
The SABnzbd-Team is:
Active team:
Safihre
mnightingale
sanderjo
jcfp
inpheaux
@@ -17,21 +18,8 @@ Sleeping members:
Honorary member (and original author):
Gregor Kaufmann
The main contributors and moderators of the translations:
Danish: Rene (nordjyden6), Scott
Dutch: ShyPike, Safihre
French: rAf, Fox Ace, Fred, Morback, Jih
German: Severin Heiniger, Tim Hartmann, DonPizza, Alex
Norwegian: Protx, mjelva, TomP, John
Romanian: nicusor
Serbian: Ozzii, Krišan Darko
Swedish: Malmis, Kim Joahnsson, Patrik-liind, Chris M
Spanish: Syquus, Adolfo Jayme
Portuguese (Brazil): lrrosa, diegosps
Russian: Pavel Maryanov
Polish: Tomasz 'Zen' Napierala
Chinese: XsLiDian
Finnish: Matti Ylönen
The contributors and moderators of the translations are credited in the
header of each translation file in the po/ directory.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -44,7 +32,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
along with this program; if not, see <https://www.gnu.org/licenses/>.
See accompanying files GPL2.txt and GPL3.txt.
-110
View File
@@ -1,110 +0,0 @@
SABnzbd
-------------------------------------------------------------------------------
0) LICENSE
-------------------------------------------------------------------------------
(c) Copyright 2007-2021 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
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-------------------------------------------------------------------------------
1) INSTALL with the Windows installer
-------------------------------------------------------------------------------
Just run the downloaded EXE file and the installer will start.
It's just a simple standard installer.
After installation, find the SABnzbd program in the Start menu and start it.
Within a few seconds your web browser will start and show the user interface.
Use the "Help" button in the web-interface to be directed to the Help Wiki.
-------------------------------------------------------------------------------
2) INSTALL pre-built Windows binaries
-------------------------------------------------------------------------------
Unzip pre-built version to any folder of your liking.
Start the SABnzbd.exe program.
Within a few seconds your web browser will start and show the user interface.
Use the "Help" button in the web-interface to be directed to the Help Wiki.
-------------------------------------------------------------------------------
3) INSTALL pre-built macOS binaries
-------------------------------------------------------------------------------
Download the DMG file, mount and drag the SABnzbd icon to Applications.
Just like you do with so many apps.
-------------------------------------------------------------------------------
4) INSTALL with only sources
-------------------------------------------------------------------------------
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.6 and above is supported.
On Linux systems you need to install:
par2 unrar unzip python3-setuptools python3-pip
On non-X86 platforms, for which PyPI does not provide all pre-compiled packages,
you also need to install these development libraries (exact names might differ per platform):
libffi-dev libssl-dev
Unpack the ZIP-file containing the SABnzbd sources to any folder of your liking.
Inside the SABnzbd source directory, install all required Python packages by running:
python3 -m pip install -r requirements.txt
If you want non-English languages, you need to compile the translations.
Start this from a shell terminal (or command prompt):
python3 tools/make_mo.py
To start SABnzbd, run this from a shell terminal (or command prompt):
python3 -OO SABnzbd.py
Within a few seconds your web browser will start and show the user interface.
Use the "Help" button in the web-interface to be directed to the Help Wiki.
-------------------------------------------------------------------------------
5) TROUBLESHOOTING
-------------------------------------------------------------------------------
Your browser may start up with just an error page.
This means that SABnzbd cannot use the default port 8080 to run its web-server on.
Try to use another port, you'll need to use the a command window:
SABnzbd.exe -s localhost:7777
or
python3 SABnzbd.py -s localhost:7777
You may of course try other port numbers too.
For troubleshooting on Windows you can use the program SABnzbd-console.exe.
This will show a black window where logging information will be shown. This
may help you solve problems easier.
-------------------------------------------------------------------------------
6) MORE INFORMATION
-------------------------------------------------------------------------------
Visit our wiki:
https://sabnzbd.org/wiki/
-------------------------------------------------------------------------------
7) CREDITS
-------------------------------------------------------------------------------
Several parts of SABnzbd were built by other people, illustrating the
wonderful world of Free Open Source Software.
See the licenses folder of the main program and of the skin folders.
-55
View File
@@ -1,55 +0,0 @@
*******************************************
*** Known issues ***
*******************************************
- To prevent unexpectedly large NZBs from eating your download quota you can set
the option 'size_limit' on the Config->Special page.
Any NZB larger than this size will be set to paused and get a low priority.
- When par2 or unrar hang up, never just stop SABnzbd.
Instead use your operating system's task manager to stop the par2 or unrar program.
Forcing SABnzbd to quit may damage your queues.
- Some Usenet servers have intermittent login (or other) problems.
For these the server blocking method is not very favourable.
There is an INI-only option that will limit blocks to 1 minute.
no_penalties = 1
See: https://sabnzbd.org/wiki/configuration/3.4/special
- Some third-party utilties try to probe SABnzbd API in such a way that you will
often see warnings about unauthenticated access.
If you are sure these probes are harmless, you can suppress the warnings by
setting the option "api_warnings" to 0.
See: https://sabnzbd.org/wiki/configuration/3.4/special
- On macOS you may encounter downloaded files with foreign characters.
The par2 repair may fail when the files were created on a Windows system.
The problem is caused by the PAR2 utility and we cannot fix this now.
This does not apply to files inside RAR files.
- The "Watched Folder" sometimes fails to delete the NZB files it has
processed. This happens when other software still accesses these files.
Some third-party utilities supporting SABnzbd are known to do this.
We cannot solve this problem, because the Operating System (read Windows)
prevents the removal.
- When SABnzbd cannot send notification emails, check your virus scanner,
firewall or security suite. It may be blocking outgoing email.
- When you are using external drives or network shares on macOS or Linux
make sure that the drives are mounted.
The operating system will simply redirect your files to alternative locations.
You may have trouble finding the files when mounting the drive later.
On macOS, SABnzbd will not create new folders in /Volumes.
The result will be a failed job that can be retried once the volume has been mounted.
- If you use a mounted drive as "temporary download folder", it must be present when SABnzbd
starts up. If not, SABnzbd will use the default location.
You can make SABnzbd wait for a mount of the "temporary download folder" by setting
Config->Special->wait_for_dfolder to 1.
SABnzbd will appear to hang until the drive is mounted.
- If you experience speed-drops to KB/s when using a VPN, try setting the number of connections
to your servers to a total of 7. There is a CPU-usage reduction feature in SABnzbd that
gets confused by the way some VPN's handle the state of a connection. Below 8 connections
this feature is not active.
+1 -1
View File
@@ -1,4 +1,4 @@
(c) Copyright 2007-2021 by "The SABnzbd-team" <team@sabnzbd.org>
(c) Copyright 2007-2026 by The SABnzbd-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
-10
View File
@@ -1,10 +0,0 @@
Metadata-Version: 1.0
Name: SABnzbd
Version: 3.4.0Beta1
Summary: SABnzbd-3.4.0Beta1
Home-page: https://sabnzbd.org
Author: The SABnzbd Team
Author-email: team@sabnzbd.org
License: GNU General Public License 2 (GPL2 or later)
Description: Fully automated Usenet Binary Downloader
Platform: posix
+14 -7
View File
@@ -1,10 +1,8 @@
SABnzbd - The automated Usenet download tool
============================================
![CI tests](https://github.com/sabnzbd/sabnzbd/workflows/CI%20Tests/badge.svg)
![Build binaries](https://github.com/sabnzbd/sabnzbd/workflows/Build%20binaries%20and%20source%20distribution/badge.svg)
[![License](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![Join our Discord](https://img.shields.io/discord/976737547558461480?color=7289DA&label=Discord&logo=Discord&logoColor=white)](https://discord.sabnzbd.org)
SABnzbd is an Open Source Binary Newsreader written in Python.
@@ -18,15 +16,15 @@ 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.6 and higher, often called `python3`)
- Python modules listed in `requirements.txt`. Install with `python3 -m pip install -r requirements.txt -U`
- `python` (Python 3.10 and above, often called `python3`)
- Python modules listed in `requirements.txt`. Install with `python3 -m pip install -r requirements.txt`
- `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)
Optional:
- See `requirements.txt`
Your package manager should supply these. If not, we've got links in our [installation guide](https://github.com/sabnzbd/sabnzbd/blob/master/INSTALL.txt).
Your package manager should supply these. If not, we've got links in our [installation guide](https://sabnzbd.org/wiki/installation/install-off-modules).
## Running SABnzbd from source
@@ -68,3 +66,12 @@ Conditions:
- Bugfixes created specifically for a release branch are done there (because they are specific, they're not cherry-picked to `develop`).
- Bugfixes done on `develop` may be cherry-picked to a release branch.
- We will not release a 1.0.2 if a 1.1.0 has already been released.
## Privacy Policy
This program will not transfer any information to other networked systems unless
specifically requested by the user or the person installing or operating it.
## Code Signing Policy
For our Windows release, free code signing is provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
+54 -24
View File
@@ -1,33 +1,63 @@
Release Notes - SABnzbd 3.4.0 Beta 1
Release Notes - SABnzbd 5.1.0 Release Candidate 2
=========================================================
## Changes since 3.3.1
- Extended `Deobfuscate final filenames` to attempt to set the correct
file extension based on the file signature if the file extension is
not present or meaningless.
- Added additional pattern keys that can be used in the `Sort String`
for Sorting, by using the `guessit` package internally for parsing.
- Regular expressions can be used to specify `Unwanted extensions`.
- Some interface-only options were added as API-call.
- The Plush skin has been removed.
This is the second release candidate of version 5.1.
## Bugfixes since 3.3.1
- Duplicate check based on `.nzb` MD5 was performed before it was calculated.
- Enforce `local_ranges` for broadcasts (Bonjour/SSDP).
## New features in 5.1.0
* Refreshed the interface.
* When Retrying a job, only the actually missing articles are tried again.
This only works for jobs downloaded in 5.1.0 (or newer).
* RSS items are now stored in the database instead of on disk.
* New RSS `Age` rule to filter jobs based on their age.
* Downloaded RSS items are cleared from the RSS database after 3 days.
* Added support for filename and path pattern matching to the `Cleanup List`.
* `Unwanted extensions` will also be removed after unpacking.
* Allow job setting changes directly from `Extra queue columns`.
* Added support for unpacking `.tar` files during post-processing.
* Improved anonymization of the logs when using `Show Logging`.
* Added `SAB_FILES` environment variable to Post-processing scripts,
listing all files that resulted from the job.
* New Servers will default to 16 connections instead of 8.
* Use media duration as part of `Ignore Samples` detection.
* Added option to (auto) sort the queue by Remaining Percentage.
* Improved support for screen readers.
* Parsing of header-encrypted RARs will use significantly fewer resources.
* Add Ayatana AppIndicator tray support on GNOME.
* Removed redundant `INSTALL.txt` file.
* Dropped support for Python 3.9.
* Windows and macOS: Updated Python to 3.14.6, Unrar to 7.23 and 7zip to 26.02.
## Bug fixes in 5.1.0
* Prevent incorrect warnings about non-writeable directories.
* Files unrelated to job could get removed by the `Cleanup List` logic.
* Prevent path traversal in orphaned job APIs.
* `Disk Full` errors from unrar were not handled gracefully during unpacking.
* Memory leak could occur during article decoding.
* In containers (like Docker), the Article Cache could exceed the memory limit.
* Diskspace checks would be too strict when unpacking to different disk.
* Prevent deadlock when a second signal arrives during shutdown procedure.
* Verification using SFV-checks could fail, even though files were correct.
* Windows: Uninstall would not remove Settings or Windows Service.
* Windows: Warn for OS-limit if more than 1024 connections are configured.
* macOS: AppleDouble files could result in failures in `Moving` stage.
* macOS: Restarting the application resulted in Terminal window.
## Upgrade notices
- The download statistics file `totals10.sab` is updated in 3.2.x
version. If you downgrade to 3.1.x or lower, detailed download
statistics will be lost.
## Known problems and solutions
- Read the file "ISSUES.txt"
* You can directly upgrade from version 3.0.0 and newer.
* Upgrading from older versions will require performing a `Queue repair`.
## Code Signing Policy
Windows code signing is provided by SignPath.io using a SignPath Foundation certificate.
## About
SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically, thanks
to its web-based user interface and advanced built-in post-processing options
that automatically verify, repair, extract and clean up posts downloaded
from Usenet.
(c) Copyright 2007-2021 by "The SABnzbd-team" \<team@sabnzbd.org\>
SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically, thanks to its web-based
user interface and advanced built-in post-processing options that automatically verify, repair,
extract and clean up posts downloaded from Usenet.
(c) Copyright 2007-2026 by The SABnzbd-Team (sabnzbd.org)
+350 -555
View File
File diff suppressed because it is too large. Load diff
+79 -83
View File
@@ -1,56 +1,32 @@
# -*- mode: python -*-
import re
import os
import sys
import pkginfo
from PyInstaller.building.api import EXE, COLLECT, PYZ
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.osx import BUNDLE
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
from builder.common import EXTRA_FILES, EXTRA_FOLDERS, RELEASE_VERSION, RELEASE_VERSION_BASE, RELEASE_VERSION_TUPLE
# Add extra files in the PyInstaller-spec
extra_pyinstaller_files = []
# Also modify these in "package.py"!
extra_files = [
"README.txt",
"INSTALL.txt",
"LICENSE.txt",
"GPL2.txt",
"GPL3.txt",
"COPYRIGHT.txt",
"ISSUES.txt",
"PKG-INFO",
]
extra_folders = [
"scripts/",
"licenses/",
"locale/",
"email/",
"interfaces/Glitter/",
"interfaces/wizard/",
"interfaces/Config/",
"scripts/",
"icons/",
]
# Get the version
RELEASE_VERSION = pkginfo.Develop(".").version
# Add hidden imports
extra_hiddenimports = ["Cheetah.DummyTransaction", "cheroot.ssl.builtin", "certifi"]
extra_hiddenimports = ["Cheetah.DummyTransaction", "certifi"]
extra_hiddenimports.extend(collect_submodules("apprise"))
extra_hiddenimports.extend(collect_submodules("babelfish.converters"))
extra_hiddenimports.extend(collect_submodules("guessit.data"))
# Add platform specific stuff
if sys.platform == "darwin":
extra_hiddenimports.extend(["pyobjc", "objc", "PyObjCTools"])
extra_hiddenimports.extend(["objc", "PyObjCTools"])
# macOS folders
extra_folders += ["osx/par2/", "osx/unrar/", "osx/7zip/"]
EXTRA_FOLDERS += ["macos/par2/", "macos/unrar/", "macos/7zip/"]
# Add NZB-icon file
extra_pyinstaller_files.append(("builder/osx/image/nzbfile.icns", "."))
extra_pyinstaller_files.append(("builder/macos/image/nzbfile.icns", "."))
# Version information is set differently on macOS
version_info = None
version_info_console = version_info = None
else:
# Build would fail on non-Windows
from PyInstaller.utils.win32.versioninfo import (
@@ -64,102 +40,115 @@ else:
)
# Windows
extra_hiddenimports.append("win32timezone")
extra_folders += ["win/multipar/", "win/unrar/", "win/7zip/"]
# Parse the version info
version_regexed = re.search(r"(\d+)\.(\d+)\.(\d+)([a-zA-Z]*)(\d*)", RELEASE_VERSION)
version_tuple = (int(version_regexed.group(1)), int(version_regexed.group(2)), int(version_regexed.group(3)), 0)
extra_hiddenimports.extend(["win32timezone", "winrt.windows.foundation.collections"])
EXTRA_FOLDERS += ["win/par2/", "win/unrar/", "win/7zip/"]
EXTRA_FILES += ["portable.cmd"]
# Detailed instructions are in the PyInstaller documentation
# We don't include the alpha/beta/rc in the counters
version_info = VSVersionInfo(
ffi=FixedFileInfo(
filevers=version_tuple,
prodvers=version_tuple,
mask=0x3F,
flags=0x0,
OS=0x40004,
fileType=0x1,
subtype=0x0,
date=(0, 0),
),
kids=[
StringFileInfo(
[
StringTable(
"040904B0",
[
StringStruct("Comments", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("CompanyName", "The SABnzbd-Team"),
StringStruct("FileDescription", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("FileVersion", RELEASE_VERSION),
StringStruct("LegalCopyright", "The SABnzbd-Team"),
StringStruct("ProductName", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("ProductVersion", RELEASE_VERSION),
],
)
]
def make_version_info(filename):
return VSVersionInfo(
ffi=FixedFileInfo(
filevers=RELEASE_VERSION_TUPLE,
prodvers=RELEASE_VERSION_TUPLE,
mask=0x3F,
flags=0x0,
OS=0x40004,
fileType=0x1,
subtype=0x0,
date=(0, 0),
),
VarFileInfo([VarStruct("Translation", [1033, 1200])]),
],
)
kids=[
StringFileInfo(
[
StringTable(
"040904B0",
[
StringStruct("Comments", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("CompanyName", "The SABnzbd-Team"),
StringStruct("FileDescription", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("FileVersion", RELEASE_VERSION),
StringStruct("InternalName", "SABnzbd"),
StringStruct("LegalCopyright", "The SABnzbd-Team"),
StringStruct("OriginalFilename", filename),
StringStruct("ProductName", f"SABnzbd {RELEASE_VERSION}"),
StringStruct("ProductVersion", RELEASE_VERSION),
],
)
]
),
VarFileInfo([VarStruct("Translation", [1033, 1200])]),
],
)
version_info = make_version_info("SABnzbd.exe")
version_info_console = make_version_info("SABnzbd-console.exe")
# Process the extra-files and folders
for file_item in extra_files:
for file_item in EXTRA_FILES:
extra_pyinstaller_files.append((file_item, "."))
for folder_item in extra_folders:
for folder_item in EXTRA_FOLDERS:
extra_pyinstaller_files.append((folder_item, folder_item))
# Add babelfish data files
extra_pyinstaller_files.extend(collect_data_files("babelfish"))
extra_pyinstaller_files.extend(collect_data_files("guessit"))
extra_pyinstaller_files.extend(collect_data_files("apprise"))
extra_pyinstaller_files.extend(collect_data_files("dateutil"))
pyi_analysis = Analysis(
["SABnzbd.py"],
datas=extra_pyinstaller_files,
hiddenimports=extra_hiddenimports,
excludes=["FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter"],
excludes=["ujson", "FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter", "pydoc", "pydoc_data.topics"],
module_collection_mode={"apprise.plugins": "py"},
)
pyz = PYZ(pyi_analysis.pure, pyi_analysis.zipped_data)
pyz = PYZ(pyi_analysis.pure)
codesign_identity = os.environ.get("SIGNING_AUTH")
if not codesign_identity:
# PyInstaller needs specifically None, not just an empty value
codesign_identity = None
# macOS specific parameters are ignored on other platforms
exe = EXE(
pyz,
pyi_analysis.scripts,
[],
exclude_binaries=True,
name="SABnzbd",
upx=True,
console=False,
append_pkg=False,
icon="icons/sabnzbd.ico",
contents_directory=".",
version=version_info,
target_arch="universal2",
entitlements_file="builder/macos/entitlements.plist",
codesign_identity=codesign_identity,
)
coll = COLLECT(exe, pyi_analysis.binaries, pyi_analysis.zipfiles, pyi_analysis.datas, name="SABnzbd")
coll = COLLECT(exe, pyi_analysis.binaries, pyi_analysis.datas, name="SABnzbd")
# We need to run again for the console-app
if sys.platform == "win32":
# Enable console=True for this one
console_exe = EXE(
pyz,
pyi_analysis.scripts,
[],
exclude_binaries=True,
name="SABnzbd-console",
upx=True,
console=True,
append_pkg=False,
icon="icons/sabnzbd.ico",
version=version_info,
contents_directory=".",
version=version_info_console,
)
console_coll = COLLECT(
console_exe,
pyi_analysis.binaries,
pyi_analysis.zipfiles,
pyi_analysis.datas,
upx=True,
name="SABnzbd-console",
)
@@ -169,6 +158,7 @@ if sys.platform == "darwin":
"NSUIElement": 1,
"NSPrincipalClass": "NSApplication",
"CFBundleShortVersionString": RELEASE_VERSION,
"CFBundleVersion": RELEASE_VERSION_BASE,
"NSHumanReadableCopyright": "The SABnzbd-Team",
"CFBundleIdentifier": "org.sabnzbd.sabnzbd",
"CFBundleDocumentTypes": [
@@ -182,8 +172,14 @@ if sys.platform == "darwin":
"NSPersistentStoreTypeKey": "Binary",
}
],
"LSMinimumSystemVersion": "10.9",
"LSMinimumSystemVersion": "10.15",
"LSEnvironment": {"LANG": "en_US.UTF-8", "LC_ALL": "en_US.UTF-8"},
}
app = BUNDLE(coll, name="SABnzbd.app", icon="builder/osx/image/sabnzbdplus.icns", info_plist=info_plist)
app = BUNDLE(
coll,
name="SABnzbd.app",
icon="builder/macos/image/sabnzbdplus.icns",
bundle_identifier="org.sabnzbd.sabnzbd",
info_plist=info_plist,
)
+88
View File
@@ -0,0 +1,88 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2026 by The SABnzbd-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
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import platform
import re
# Constants
VERSION_FILE = "sabnzbd/version.py"
APPDATA_FILE = "linux/org.sabnzbd.sabnzbd.appdata.xml"
# To draft a release or not to draft a release?
ON_GITHUB_ACTIONS = os.environ.get("CI", False)
RELEASE_THIS = "refs/tags/" in os.environ.get("GITHUB_REF", "")
# Import version.py without the sabnzbd overhead
with open(VERSION_FILE) as version_file:
exec(version_file.read())
RELEASE_VERSION = __version__
# Parse the version info for Windows file properties information
version_regexed = re.search(r"(\d+)\.(\d+)\.(\d+)([a-zA-Z]*)(\d*)", RELEASE_VERSION)
RELEASE_VERSION_TUPLE = (int(version_regexed.group(1)), int(version_regexed.group(2)), int(version_regexed.group(3)), 0)
RELEASE_VERSION_BASE = f"{RELEASE_VERSION_TUPLE[0]}.{RELEASE_VERSION_TUPLE[1]}.{RELEASE_VERSION_TUPLE[2]}"
# Pre-releases carry an alpha suffix (e.g. 5.1.0Beta1); stable releases don't (e.g. 5.1.0 or 5.1.10)
PRERELEASE = bool(version_regexed.group(4))
# Define release name
RELEASE_NAME = "SABnzbd-%s" % RELEASE_VERSION
RELEASE_TITLE = "SABnzbd %s" % RELEASE_VERSION
RELEASE_SRC = RELEASE_NAME + "-src.tar.gz"
RELEASE_WIN_BIN_X64 = RELEASE_NAME + "-win64-bin.zip"
RELEASE_WIN_BIN_ARM64 = RELEASE_NAME + "-win-arm64-bin.zip"
RELEASE_WIN_INSTALLER = RELEASE_NAME + "-win-setup.exe"
RELEASE_MACOS = RELEASE_NAME + "-macos.dmg"
RELEASE_README = "README.mkd"
# Detect architecture
RELEASE_WIN_BIN = RELEASE_WIN_BIN_X64
if platform.machine() == "ARM64":
RELEASE_WIN_BIN = RELEASE_WIN_BIN_ARM64
# Used in package.py and SABnzbd.spec
EXTRA_FILES = [
RELEASE_README,
"README.html",
"LICENSE.txt",
"GPL2.txt",
"GPL3.txt",
"COPYRIGHT.txt",
]
EXTRA_FOLDERS = [
"scripts/",
"licenses/",
"locale/",
"email/",
"interfaces/Glitter/",
"interfaces/wizard/",
"interfaces/Config/",
"icons/",
]
def pe_has_authenticode_signature(pe_file: str) -> bool:
"""Check if a PE file (.exe) has an embedded Authenticode signature by
inspecting the certificate table in the optional header data directory."""
# Imported here as tools/extract_pot.py execs this file without
# the build dependencies to get the RELEASE_VERSION_BASE
import pefile
pe = pefile.PE(pe_file, fast_load=True)
security = pe.OPTIONAL_HEADER.DATA_DIRECTORY[pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_SECURITY"]]
return security.VirtualAddress != 0 and security.Size != 0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-206
View File
@@ -1,206 +0,0 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2017 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
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os
import pkginfo
# We need to call dmgbuild from command-line, so here we can setup how
if __name__ == "__main__":
# Check for DMGBuild
try:
import dmgbuild
except:
print("Requires dmgbuild-module, use pip install dmgbuild")
exit()
# Make sure we are in the src folder
if not os.path.exists("builder"):
raise FileNotFoundError("Run from the main SABnzbd source folder: python builder/package.py")
# Check if signing is possible
authority = os.environ.get("SIGNING_AUTH")
# Extract version info and set DMG path
# Create sub-folder to upload later
release = pkginfo.Develop(".").version
prod = "SABnzbd-" + release
fileDmg = prod + "-osx.dmg"
# Path to app file
apppath = "dist/SABnzbd.app"
# Copy Readme
readmepath = os.path.join(apppath, "Contents/Resources/README.txt")
# Path to background and the icon
backgroundpath = "builder/osx/image/sabnzbd_new_bg.png"
iconpath = "builder/osx/image/sabnzbdplus.icns"
# Make DMG
print("Building DMG")
dmgbuild.build_dmg(
filename=fileDmg,
volume_name=prod,
settings_file="builder/make_dmg.py",
defines={"app": apppath, "readme": readmepath, "background": backgroundpath, "iconpath": iconpath},
)
# Resign APP
if authority:
print("Siging DMG")
os.system('codesign --deep -f -i "org.sabnzbd.SABnzbd" -s "%s" "%s"' % (authority, fileDmg))
print("Signed!")
else:
print("Signing skipped, missing SIGNING_AUTH.")
exit()
### START OF DMGBUILD SETTINGS
### COPIED AND MODIFIED FROM THE EXAMPLE ONLINE
application = defines.get("app", "AppName.app")
readme = defines.get("readme", "ReadMe.rtf")
appname = os.path.basename(application)
# .. Basics ....................................................................
# Volume format (see hdiutil create -help)
format = defines.get("format", "UDBZ")
# Volume size (must be large enough for your files)
size = defines.get("size", "100M")
# Files to include
files = [application, readme]
# Symlinks to create
symlinks = {"Applications": "/Applications"}
# Volume icon
#
# You can either define icon, in which case that icon file will be copied to the
# image, *or* you can define badge_icon, in which case the icon file you specify
# will be used to badge the system's Removable Disk icon
#
badge_icon = defines.get("iconpath", "")
# Where to put the icons
icon_locations = {readme: (70, 160), appname: (295, 220), "Applications": (510, 220)}
# .. Window configuration ......................................................
# Window position in ((x, y), (w, h)) format
window_rect = ((100, 100), (660, 360))
# Background
#
# This is a STRING containing any of the following:
#
# #3344ff - web-style RGB color
# #34f - web-style RGB color, short form (#34f == #3344ff)
# rgb(1,0,0) - RGB color, each value is between 0 and 1
# hsl(120,1,.5) - HSL (hue saturation lightness) color
# hwb(300,0,0) - HWB (hue whiteness blackness) color
# cmyk(0,1,0,0) - CMYK color
# goldenrod - X11/SVG named color
# builtin-arrow - A simple built-in background with a blue arrow
# /foo/bar/baz.png - The path to an image file
#
# Other color components may be expressed either in the range 0 to 1, or
# as percentages (e.g. 60% is equivalent to 0.6).
background = defines.get("background", "builtin-arrow")
show_status_bar = False
show_tab_view = False
show_toolbar = False
show_pathbar = False
show_sidebar = False
sidebar_width = 0
# Select the default view; must be one of
#
# 'icon-view'
# 'list-view'
# 'column-view'
# 'coverflow'
#
default_view = "icon-view"
# General view configuration
show_icon_preview = False
# Set these to True to force inclusion of icon/list view settings (otherwise
# we only include settings for the default view)
include_icon_view_settings = "auto"
include_list_view_settings = "auto"
# .. Icon view configuration ...................................................
arrange_by = None
grid_offset = (0, 0)
grid_spacing = 50
scroll_position = (0, 0)
label_pos = "bottom" # or 'right'
text_size = 16
icon_size = 64
# .. List view configuration ...................................................
# Column names are as follows:
#
# name
# date-modified
# date-created
# date-added
# date-last-opened
# size
# kind
# label
# version
# comments
#
list_icon_size = 16
list_text_size = 12
list_scroll_position = (0, 0)
list_sort_by = "name"
list_use_relative_dates = True
list_calculate_all_sizes = (False,)
list_columns = ("name", "date-modified", "size", "kind", "date-added")
list_column_widths = {
"name": 300,
"date-modified": 181,
"date-created": 181,
"date-added": 181,
"date-last-opened": 181,
"size": 97,
"kind": 115,
"label": 100,
"version": 75,
"comments": 300,
}
list_column_sort_directions = {
"name": "ascending",
"date-modified": "descending",
"date-created": "descending",
"date-added": "descending",
"date-last-opened": "descending",
"size": "descending",
"kind": "ascending",
"label": "ascending",
"version": "ascending",
"comments": "ascending",
}
+368 -333
View File
@@ -1,5 +1,5 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2017 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2008-2026 by The SABnzbd-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
@@ -16,50 +16,45 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import glob
import platform
import importlib.util
import re
import sys
import os
import tempfile
import time
import shutil
import subprocess
import tarfile
import pkginfo
import github
from distutils.dir_util import copy_tree
import urllib.request
import urllib.error
import configobj
import markdown
import packaging.version
import xml.etree.ElementTree as ET
VERSION_FILE = "sabnzbd/version.py"
SPEC_FILE = "SABnzbd.spec"
# Also modify these in "SABnzbd.spec"!
extra_files = [
"README.mkd",
"INSTALL.txt",
"LICENSE.txt",
"GPL2.txt",
"GPL3.txt",
"COPYRIGHT.txt",
"ISSUES.txt",
"PKG-INFO",
]
extra_folders = [
"scripts/",
"licenses/",
"locale/",
"email/",
"interfaces/Glitter/",
"interfaces/wizard/",
"interfaces/Config/",
"scripts/",
"icons/",
]
from common import (
RELEASE_VERSION,
RELEASE_VERSION_TUPLE,
VERSION_FILE,
RELEASE_README,
RELEASE_NAME,
RELEASE_MACOS,
RELEASE_WIN_BIN,
RELEASE_WIN_INSTALLER,
ON_GITHUB_ACTIONS,
RELEASE_THIS,
RELEASE_SRC,
EXTRA_FILES,
EXTRA_FOLDERS,
APPDATA_FILE,
RELEASE_VERSION_BASE,
pe_has_authenticode_signature,
)
# Support functions
def safe_remove(path):
"""Remove file without erros if the file doesn't exist
"""Remove file without errors if the file doesn't exist
Can also handle folders
"""
if os.path.exists(path):
@@ -69,19 +64,24 @@ def safe_remove(path):
os.remove(path)
def delete_files_glob(name):
"""Delete one file or set of files from wild-card spec"""
for f in glob.glob(name):
if os.path.exists(f):
os.remove(f)
def delete_files_glob(glob_pattern: str, allow_no_matches: bool = False):
"""Delete one file or set of files from wild-card spec.
We expect to match at least 1 file, to force expected behavior"""
if files_to_remove := glob.glob(glob_pattern):
for path in files_to_remove:
if os.path.exists(path):
os.remove(path)
else:
if not allow_no_matches:
raise FileNotFoundError(f"No files found that match '{glob_pattern}'")
def run_external_command(command):
def run_external_command(command: list[str], print_output: bool = True, **kwargs):
"""Wrapper to ease the use of calling external programs"""
process = subprocess.Popen(command, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
process = subprocess.Popen(command, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs)
output, _ = process.communicate()
ret = process.wait()
if output:
if (output and print_output) or ret != 0:
print(output)
if ret != 0:
raise RuntimeError("Command returned non-zero exit code %s!" % ret)
@@ -90,7 +90,7 @@ def run_external_command(command):
def run_git_command(parms):
"""Run git command, raise error if it failed"""
return run_external_command(["git"] + parms)
return run_external_command(["git", *parms])
def patch_version_file(release_name):
@@ -115,6 +115,151 @@ def patch_version_file(release_name):
ver.write(version_file)
def verify_appdata():
"""Verify that appdata file is updated"""
if not isinstance(
ET.parse(APPDATA_FILE).find(f"./releases/release[@version='{RELEASE_VERSION_BASE}']"),
ET.Element,
):
release_missing = f"Could not find {RELEASE_VERSION_BASE} in {APPDATA_FILE}"
if RELEASE_THIS:
raise RuntimeError(release_missing)
elif ON_GITHUB_ACTIONS:
print(f"::warning file={APPDATA_FILE},title=Missing release::{release_missing}")
else:
print(release_missing)
def build_readme_html(output_path: str):
"""Convert the release notes Markdown to a styled HTML file."""
with open(RELEASE_README, "r", encoding="utf-8") as f:
readme_html = markdown.markdown(f.read(), extensions=["nl2br"])
# Linkify bare URLs not already inside an HTML attribute
readme_html = re.sub(
r'(?<![="\'(])https?://[^\s<>"\']+',
lambda m: f'<a href="{m.group()}" target="_blank">{m.group()}</a>',
readme_html,
)
with open(output_path, "w", encoding="utf-8") as f:
f.write(
f'<!DOCTYPE html><html><head><meta charset="utf-8">'
f"<title>SABnzbd {RELEASE_VERSION} Release Notes</title>"
f'<link rel="icon" href="icons/logo-arrow.svg">'
f"<style>body{{font-family:system-ui,sans-serif;max-width:800px;margin:40px auto;padding:0 20px}}</style>"
f"</head><body>{readme_html}</body></html>"
)
def test_macos_min_version(binary_path: str):
# Skip check if nothing was set
if macos_min_version := os.environ.get("MACOSX_DEPLOYMENT_TARGET"):
# Skip any arm64 specific files
if "arm64" in binary_path:
print(f"Skipping arm64 binary {binary_path}")
return
# Check minimum macOS version is at least mac OS10.13
# We only check the x86_64 since for arm64 it's always macOS 11+
print(f"Checking if binary supports macOS {macos_min_version} and above: {binary_path}")
otool_output = run_external_command(
[
"otool",
"-arch",
"x86_64",
"-l",
binary_path,
],
print_output=False,
)
# Parse the output for LC_BUILD_VERSION minos
# The output is very large, so that's why we enumerate over it
req_version = packaging.version.parse(macos_min_version)
bin_version = None
lines = otool_output.split("\n")
for line_nr, line in enumerate(lines):
if "LC_VERSION_MIN_MACOSX" in line:
# Display the version in the next lines
bin_version = packaging.version.parse(lines[line_nr + 2].split()[1])
elif "minos" in line:
bin_version = packaging.version.parse(line.split()[1])
if bin_version and bin_version > req_version:
raise ValueError(f"{binary_path} requires {bin_version}, we want {req_version}")
else:
# We got the information we need
break
else:
print(lines)
raise RuntimeError(f"Could not determine minimum macOS version for {binary_path}")
else:
print("Skipping macOS version check, MACOSX_DEPLOYMENT_TARGET not set")
def test_sab_binary(binary_path: str):
"""Wrapper to have a simple start-up test for the binary"""
with tempfile.TemporaryDirectory() as config_dir:
sabnzbd_process = subprocess.Popen(
[binary_path, "--browser", "0", "--logging", "2", "--config", config_dir],
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
# Wait for SAB to respond
base_url = "http://127.0.0.1:8080/"
for _ in range(30):
try:
urllib.request.urlopen(base_url, timeout=1).read()
break
except Exception:
time.sleep(1)
else:
# Print console output and give some time to print
print(sabnzbd_process.stdout.read())
time.sleep(1)
raise urllib.error.URLError("Could not connect to SABnzbd")
# Open a number of API calls and pages, to see if we are really up
pages_to_test = [
"",
"wizard",
"config",
"config/server",
"config/categories",
"config/scheduling",
"config/rss",
"config/general",
"config/folders",
"config/switches",
"config/sorting",
"config/notify",
"config/special",
"api?mode=version",
]
for url in pages_to_test:
print("Testing: %s%s" % (base_url, url))
if b"500 Internal Server Error" in urllib.request.urlopen(base_url + url, timeout=1).read():
raise RuntimeError("Crash in %s" % url)
# Parse API-key so we can do a graceful shutdown
sab_config = configobj.ConfigObj(os.path.join(config_dir, "sabnzbd.ini"))
urllib.request.urlopen(base_url + "api?mode=shutdown&apikey=" + sab_config["misc"]["api_key"], timeout=10)
sabnzbd_process.wait()
# Print logs for verification
with open(os.path.join(config_dir, "logs", "sabnzbd.log"), "r") as log_file:
# Wait after printing so the output is nicely displayed in case of problems
print(log_text := log_file.read())
time.sleep(5)
# Make sure no extra errors/warnings were reported
if "ERROR" in log_text or "WARNING" in log_text:
raise RuntimeError("Warning or error reported during execution")
if __name__ == "__main__":
# Was any option supplied?
if len(sys.argv) < 2:
@@ -124,34 +269,19 @@ if __name__ == "__main__":
if not os.path.exists("builder"):
raise FileNotFoundError("Run from the main SABnzbd source folder: python builder/package.py")
# Extract version info
RELEASE_VERSION = pkginfo.Develop(".").version
# Check if we have the needed certificates
try:
import certifi
except ImportError:
if importlib.util.find_spec("certifi") is None:
raise FileNotFoundError("Need certifi module")
# Define release name
RELEASE_NAME = "SABnzbd-%s" % RELEASE_VERSION
RELEASE_TITLE = "SABnzbd %s" % RELEASE_VERSION
RELEASE_SRC = RELEASE_NAME + "-src.tar.gz"
RELEASE_BINARY_32 = RELEASE_NAME + "-win32-bin.zip"
RELEASE_BINARY_64 = RELEASE_NAME + "-win64-bin.zip"
RELEASE_INSTALLER = RELEASE_NAME + "-win-setup.exe"
RELEASE_MACOS = RELEASE_NAME + "-osx.dmg"
RELEASE_README = "README.mkd"
# Check if we have correct appdata file
verify_appdata()
# Patch release file
patch_version_file(RELEASE_VERSION)
# To draft a release or not to draft a release?
RELEASE_THIS = "refs/tags/" in os.environ.get("GITHUB_REF", "")
# Rename release notes file
safe_remove("README.txt")
shutil.copyfile(RELEASE_README, "README.txt")
# Convert release notes to HTML for the installer finish page
safe_remove("README.html")
build_readme_html("README.html")
# Compile translations
if not os.path.exists("locale"):
@@ -161,76 +291,75 @@ if __name__ == "__main__":
if not os.path.exists("locale"):
raise FileNotFoundError("Failed to compile language files")
# Make sure we remove any existing build-folders
safe_remove("build")
safe_remove("dist")
safe_remove(RELEASE_NAME)
# Copy the specification
shutil.copyfile("builder/%s" % SPEC_FILE, SPEC_FILE)
if "binary" in sys.argv or "installer" in sys.argv:
if "binary" in sys.argv:
# Must be run on Windows
if sys.platform != "win32":
raise RuntimeError("Binary should be created on Windows")
# Check what architecture we are on
RELEASE_BINARY = RELEASE_BINARY_32
if platform.architecture()[0] == "64bit":
RELEASE_BINARY = RELEASE_BINARY_64
# Make sure we remove any existing build-folders
safe_remove("build")
safe_remove("dist")
# Remove any leftovers
safe_remove(RELEASE_BINARY)
safe_remove(RELEASE_NAME)
safe_remove(RELEASE_WIN_BIN)
# Run PyInstaller and check output
shutil.copyfile("builder/SABnzbd.spec", "SABnzbd.spec")
run_external_command([sys.executable, "-O", "-m", "PyInstaller", "SABnzbd.spec"])
# Use special distutils function to merge the main and console directories
copy_tree("dist/SABnzbd-console", "dist/SABnzbd")
shutil.copytree("dist/SABnzbd-console", "dist/SABnzbd", dirs_exist_ok=True)
safe_remove("dist/SABnzbd-console")
# Remove unwanted DLL's
delete_files_glob("dist/SABnzbd/api-ms-win*.dll")
delete_files_glob("dist/SABnzbd/mfc140u.dll")
delete_files_glob("dist/SABnzbd/ucrtbase.dll")
shutil.rmtree("dist/SABnzbd/Pythonwin")
delete_files_glob("dist/SABnzbd/api-ms-win*.dll", allow_no_matches=True)
delete_files_glob("dist/SABnzbd/ucrtbase.dll", allow_no_matches=True)
# Remove other files we don't need
delete_files_glob("dist/SABnzbd/PKG-INFO")
delete_files_glob("dist/SABnzbd/win32ui.pyd")
delete_files_glob("dist/SABnzbd/winxpgui.pyd")
if "installer" in sys.argv:
# Needs to be run on 64 bit
if RELEASE_BINARY != RELEASE_BINARY_64:
raise RuntimeError("Installer should be created on 64bit Python")
# Compile NSIS translations
safe_remove("NSIS_Installer.nsi")
safe_remove("NSIS_Installer.nsi.tmp")
shutil.copyfile("builder/win/NSIS_Installer.nsi", "NSIS_Installer.nsi")
run_external_command([sys.executable, "tools/make_mo.py", "nsis"])
# Remove 32bit external executables
delete_files_glob("dist/SABnzbd/win/par2/multipar/par2j.exe")
delete_files_glob("dist/SABnzbd/win/unrar/UnRAR.exe")
# Run NSIS to build installer
run_external_command(
[
"makensis.exe",
"/V3",
"/DSAB_PRODUCT=%s" % RELEASE_NAME,
"/DSAB_VERSION=%s" % RELEASE_VERSION,
"/DSAB_FILE=%s" % RELEASE_INSTALLER,
"NSIS_Installer.nsi.tmp",
]
)
# Rename the folder
os.rename("dist/SABnzbd", RELEASE_NAME)
# Test the release
test_sab_binary("dist/SABnzbd/SABnzbd.exe")
# Create the archive
run_external_command(["win/7zip/7za.exe", "a", RELEASE_BINARY, RELEASE_NAME])
run_external_command(["win/7zip/7za.exe", "a", RELEASE_WIN_BIN, "SABnzbd"], cwd="dist")
shutil.move(f"dist/{RELEASE_WIN_BIN}", RELEASE_WIN_BIN)
if "installer" in sys.argv:
# Check if we have the dist folder
if not os.path.exists("dist/SABnzbd/SABnzbd.exe"):
raise FileNotFoundError("SABnzbd executable not found, run binary creation first")
# Check if we have a signed version
if os.path.exists(f"signed/{RELEASE_WIN_BIN}"):
print("Using signed version of SABnzbd binaries")
safe_remove("dist/SABnzbd")
run_external_command(["win/7zip/7za.exe", "x", "-odist", f"signed/{RELEASE_WIN_BIN}"])
# Make sure it exists
if not os.path.exists("dist/SABnzbd/SABnzbd.exe"):
raise FileNotFoundError("SABnzbd executable not found, signed zip extraction failed")
# Make sure the executables are actually signed
for exe_to_check in ("dist/SABnzbd/SABnzbd.exe", "dist/SABnzbd/SABnzbd-console.exe"):
if not pe_has_authenticode_signature(exe_to_check):
raise RuntimeError("%s is not signed!" % exe_to_check)
print("%s has an Authenticode signature" % exe_to_check)
elif RELEASE_THIS:
raise FileNotFoundError("Signed SABnzbd executable not found, required for release!")
else:
print("Using unsigned version of SABnzbd binaries")
# Run NSIS to build installer
run_external_command(
[
"makensis.exe",
"/V3",
"/NOCD", # No not change working directory
"/DSAB_VERSION=%s" % RELEASE_VERSION,
"/DSAB_VERSIONKEY=%s" % ".".join(map(str, RELEASE_VERSION_TUPLE)),
"/DSAB_FILE=%s" % RELEASE_WIN_INSTALLER,
"builder/win/NSIS_Installer.nsi",
]
)
if "app" in sys.argv:
# Must be run on macOS
@@ -242,21 +371,21 @@ if __name__ == "__main__":
notarization_user = os.environ.get("NOTARIZATION_USER")
notarization_pass = os.environ.get("NOTARIZATION_PASS")
# Run PyInstaller and check output
run_external_command([sys.executable, "-O", "-m", "PyInstaller", "SABnzbd.spec"])
# Only continue if we can sign
# We need to sign all the included binaries before packaging them
# Otherwise the signature of the main application becomes invalid
if authority:
files_to_sign = [
"dist/SABnzbd.app/Contents/MacOS/osx/par2/par2-sl64",
"dist/SABnzbd.app/Contents/MacOS/osx/7zip/7za",
"dist/SABnzbd.app/Contents/MacOS/osx/unrar/unrar",
"dist/SABnzbd.app/Contents/MacOS/SABnzbd",
"dist/SABnzbd.app",
"macos/par2/par2",
"macos/unrar/unrar",
"macos/unrar/arm64/unrar",
"macos/7zip/7zz",
]
for file_to_sign in files_to_sign:
print("Signing %s with hardended runtime" % file_to_sign)
# Make sure it supports the macOS versions we want first
test_macos_min_version(file_to_sign)
# Then sign in
print("Signing %s with hardened runtime" % file_to_sign)
run_external_command(
[
"codesign",
@@ -266,18 +395,63 @@ if __name__ == "__main__":
"--options",
"runtime",
"--entitlements",
"builder/osx/entitlements.plist",
"-i",
"org.sabnzbd.sabnzbd",
"builder/macos/entitlements.plist",
"-s",
authority,
file_to_sign,
],
print_output=False,
)
print("Signed %s!" % file_to_sign)
# Only notarize for real builds that we want to deploy
if notarization_user and notarization_pass and RELEASE_THIS:
# Run PyInstaller and check output
shutil.copyfile("builder/SABnzbd.spec", "SABnzbd.spec")
run_external_command([sys.executable, "-O", "-m", "PyInstaller", "SABnzbd.spec"])
# Make sure we created a fully universal2 release when releasing or during CI
# PyInstaller also includes a builtin check for this, but we double-check every executable
if RELEASE_THIS or ON_GITHUB_ACTIONS:
for bin_to_check in glob.glob("dist/SABnzbd.app/**/*.so", recursive=True):
print("Checking if binary is universal2: %s" % bin_to_check)
file_output = run_external_command(["file", bin_to_check], print_output=False)
# Make sure we have both arm64 and x86
if not ("x86_64" in file_output and "arm64" in file_output):
raise RuntimeError("Non-universal2 binary found!")
# Make sure it supports the macOS versions we want
test_macos_min_version(bin_to_check)
# Only continue if we can sign
if authority:
# We use PyInstaller to sign the main SABnzbd executable and the SABnzbd.app
files_already_signed = [
"dist/SABnzbd.app/Contents/MacOS/SABnzbd",
"dist/SABnzbd.app",
]
for file_to_check in files_already_signed:
print("Checking signature of %s" % file_to_check)
sign_result = run_external_command(
[
"codesign",
"-dv",
"-r-",
file_to_check,
],
print_output=False,
) + run_external_command(
[
"codesign",
"--verify",
"--deep",
file_to_check,
],
print_output=False,
)
if authority not in sign_result or "adhoc" in sign_result or "invalid" in sign_result:
raise RuntimeError("Signature of %s seems invalid!" % file_to_check)
# Always notarize, as newer macOS versions don't allow any code without it
if notarization_user and notarization_pass:
# Prepare zip to upload to notarization service
print("Creating zip to send to Apple notarization service")
# We need to use ditto, otherwise the signature gets lost!
@@ -288,62 +462,77 @@ if __name__ == "__main__":
# Upload to Apple
print("Sending zip to Apple notarization service")
upload_process = run_external_command(
upload_result = run_external_command(
[
"xcrun",
"altool",
"--notarize-app",
"-t",
"osx",
"-f",
"notarytool",
"submit",
notarization_zip,
"--primary-bundle-id",
"org.sabnzbd.sabnzbd",
"-u",
"--apple-id",
notarization_user,
"-p",
"--team-id",
authority,
"--password",
notarization_pass,
"--wait",
],
)
# Extract the notarization ID
m = re.match(".*RequestUUID = (.*?)\n", upload_process, re.S)
if not m:
raise RuntimeError("No UUID created")
uuid = m.group(1)
print("Checking notarization of UUID: %s (every 30 seconds)" % uuid)
notarization_in_progress = True
while notarization_in_progress:
time.sleep(30)
check_status = run_external_command(
[
"xcrun",
"altool",
"--notarization-info",
uuid,
"-u",
notarization_user,
"-p",
notarization_pass,
],
)
notarization_in_progress = "Status: in progress" in check_status
# Check if success
if "Status: success" not in check_status:
if "status: accepted" not in upload_result.lower():
raise RuntimeError("Failed to notarize..")
# Staple the notarization!
print("Approved! Stapling the result to the app")
run_external_command(["xcrun", "stapler", "staple", "dist/SABnzbd.app"])
elif notarization_user and notarization_pass:
print("Notarization skipped, tag commit to trigger notarization!")
else:
print("Notarization skipped, NOTARIZATION_USER or NOTARIZATION_PASS missing.")
else:
print("Signing skipped, missing SIGNING_AUTH.")
# Test the release, as the very last step to not mess with any release code
test_sab_binary("dist/SABnzbd.app/Contents/MacOS/SABnzbd")
if "dmg" in sys.argv:
# Must be run on macOS
if sys.platform != "darwin":
raise RuntimeError("DMG should be created on macOS")
# Only available for macOS
import dmgbuild
apppath = "dist/SABnzbd.app"
readmepath = os.path.join(apppath, "Contents/Resources/README.html")
print("Building DMG")
dmgbuild.build_dmg(
filename=RELEASE_MACOS,
volume_name=RELEASE_NAME,
settings={
"files": [apppath, readmepath],
"symlinks": {"Applications": "/Applications"},
"icon": "builder/macos/image/sabnzbdplus.icns",
"background": "builder/macos/image/sabnzbd_new_bg.png",
"icon_locations": {
os.path.basename(readmepath): (70, 160),
os.path.basename(apppath): (295, 220),
"Applications": (510, 220),
},
"window_rect": ((100, 100), (660, 360)),
"sidebar_width": 0,
"grid_spacing": 50,
"icon_size": 64,
},
callback=lambda info: print("dmgbuild", info),
)
if authority := os.environ.get("SIGNING_AUTH"):
print("Signing DMG")
run_external_command(["codesign", "-f", "-i", "org.sabnzbd.sabnzbd", "-s", authority, RELEASE_MACOS])
print("Signed!")
else:
print("Signing skipped, missing SIGNING_AUTH.")
if "source" in sys.argv:
# Prepare Source distribution package.
# We assume the sources are freshly cloned from the repo
@@ -356,19 +545,22 @@ if __name__ == "__main__":
safe_remove(RELEASE_SRC)
# Add extra files and folders need for source dist
extra_folders.extend(["sabnzbd/", "po/", "linux/", "tools/", "tests/"])
extra_files.extend(["SABnzbd.py", "requirements.txt"])
EXTRA_FOLDERS.extend(["sabnzbd/", "po/", "linux/", "tools/", "tests/"])
EXTRA_FILES.extend(["SABnzbd.py", "requirements.txt"])
# Copy all folders and files to the new folder
for source_folder in extra_folders:
copy_tree(source_folder, os.path.join(src_folder, source_folder))
for source_folder in EXTRA_FOLDERS:
shutil.copytree(source_folder, os.path.join(src_folder, source_folder), dirs_exist_ok=True)
# Copy all files
for source_file in extra_files:
for source_file in EXTRA_FILES:
shutil.copyfile(source_file, os.path.join(src_folder, source_file))
# Make sure all line-endings are correct
# Skip test data directories which contain binary files with misleading extensions
for input_filename in glob.glob("%s/**/*.*" % src_folder, recursive=True):
if os.path.join("tests", "data", "") in input_filename:
continue
base, ext = os.path.splitext(input_filename)
if ext.lower() not in (".py", ".txt", ".css", ".js", ".tmpl", ".sh", ".cmd"):
continue
@@ -393,7 +585,7 @@ if __name__ == "__main__":
tarinfo.uid = 0
tarinfo.gid = 0
if _file in ("SABnzbd.py", "Sample-PostProc.sh", "make_mo.py", "msgfmt.py"):
# Force Linux/OSX scripts as executable
# Force Linux/macOS scripts as executable
tarinfo.mode = 0o755
else:
tarinfo.mode = 0o644
@@ -404,163 +596,6 @@ if __name__ == "__main__":
# Remove source folder
safe_remove(src_folder)
# Release to github
if "release" in sys.argv:
# Check if tagged as release and check for token
gh_token = os.environ.get("AUTOMATION_GITHUB_TOKEN", "")
if RELEASE_THIS and gh_token:
gh_obj = github.Github(gh_token)
gh_repo = gh_obj.get_repo("sabnzbd/sabnzbd")
# Read the release notes
with open(RELEASE_README, "r") as readme_file:
readme_data = readme_file.read()
# Pre-releases are longer than 6 characters (e.g. 3.1.0Beta1 vs 3.1.0, but also 3.0.11)
prerelease = len(RELEASE_VERSION) > 5
# We have to manually check if we already created this release
for release in gh_repo.get_releases():
if release.tag_name == RELEASE_VERSION:
gh_release = release
print("Found existing release %s" % gh_release.title)
break
else:
# Did not find it, so create the release, use the GitHub tag we got as input
print("Creating GitHub release SABnzbd %s" % RELEASE_VERSION)
gh_release = gh_repo.create_git_release(
tag=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=True,
prerelease=prerelease,
)
# Fetch existing assets, as overwriting is not allowed by GitHub
gh_assets = gh_release.get_assets()
# Upload the assets
files_to_check = (
RELEASE_SRC,
RELEASE_BINARY_32,
RELEASE_BINARY_64,
RELEASE_INSTALLER,
RELEASE_MACOS,
RELEASE_README,
)
for file_to_check in files_to_check:
if os.path.exists(file_to_check):
# Check if this file was previously uploaded
if gh_assets.totalCount:
for gh_asset in gh_assets:
if gh_asset.name == file_to_check:
print("Removing existing asset %s " % gh_asset.name)
gh_asset.delete_asset()
# Upload the new one
print("Uploading %s to release %s" % (file_to_check, gh_release.title))
gh_release.upload_asset(file_to_check)
# Check if we now have all files
gh_new_assets = gh_release.get_assets()
if gh_new_assets.totalCount:
all_assets = [gh_asset.name for gh_asset in gh_new_assets]
# Check if we have all files, using set-comparison
if set(files_to_check) == set(all_assets):
print("All assets present, releasing %s" % RELEASE_VERSION)
# Publish release
gh_release.update_release(
tag_name=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=False,
prerelease=prerelease,
)
# Update the website
gh_repo_web = gh_obj.get_repo("sabnzbd/sabnzbd.github.io")
# Check if the branch already exists, only create one if it doesn't
skip_website_update = False
try:
gh_repo_web.get_branch(RELEASE_VERSION)
print("Branch %s on sabnzbd/sabnzbd.github.io already exists, skipping update" % RELEASE_VERSION)
skip_website_update = True
except github.GithubException:
# Create a new branch to have the changes
sb = gh_repo_web.get_branch("master")
print("Creating branch %s on sabnzbd/sabnzbd.github.io" % RELEASE_VERSION)
new_branch = gh_repo_web.create_git_ref(ref="refs/heads/" + RELEASE_VERSION, sha=sb.commit.sha)
# Update the files
if not skip_website_update:
# We need bytes version to interact with GitHub
RELEASE_VERSION_BYTES = RELEASE_VERSION.encode()
# Get all the version files
latest_txt = gh_repo_web.get_contents("latest.txt")
latest_txt_items = latest_txt.decoded_content.split()
new_latest_txt_items = latest_txt_items[:2]
config_yml = gh_repo_web.get_contents("_config.yml")
if prerelease:
# If it's a pre-release, we append to current version in latest.txt
new_latest_txt_items.extend([RELEASE_VERSION_BYTES, latest_txt_items[1]])
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: '%s'" % RELEASE_VERSION_BYTES,
config_yml.decoded_content,
)
else:
# New stable release, replace the version
new_latest_txt_items[0] = RELEASE_VERSION_BYTES
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: ''",
config_yml.decoded_content,
)
new_config_yml = re.sub(
b"latest_stable: '[^']*'",
b"latest_stable: '%s'" % RELEASE_VERSION_BYTES,
new_config_yml,
)
# Also update the wiki-settings, these only use x.x notation
new_config_yml = re.sub(
b"wiki_version: '[^']*'",
b"wiki_version: '%s'" % RELEASE_VERSION_BYTES[:3],
new_config_yml,
)
# Update the files
print("Updating latest.txt")
gh_repo_web.update_file(
"latest.txt",
"Release %s: latest.txt" % RELEASE_VERSION,
b"\n".join(new_latest_txt_items),
latest_txt.sha,
RELEASE_VERSION,
)
print("Updating _config.yml")
gh_repo_web.update_file(
"_config.yml",
"Release %s: _config.yml" % RELEASE_VERSION,
new_config_yml,
config_yml.sha,
RELEASE_VERSION,
)
# Create pull-request
print("Creating pull request in sabnzbd/sabnzbd.github.io for the update")
gh_repo_web.create_pull(
title=RELEASE_VERSION,
base="master",
body="Automated update of release files",
head=RELEASE_VERSION,
)
else:
print("To push release to GitHub, first tag the commit.")
print("Or missing the AUTOMATION_GITHUB_TOKEN, cannot push to GitHub without it.")
# Reset!
run_git_command(["reset", "--hard"])
run_git_command(["clean", "-f"])
+27
View File
@@ -0,0 +1,27 @@
# All sub-dependencies are listed below and installed with --no-dependencies for security
PyGithub==2.10.0
praw==8.0.3
pefile==2024.8.26
# PyGithub dependencies
pynacl==1.6.2
requests==2.34.2
pyjwt==2.13.0
typing-extensions==4.16.0
urllib3==2.7.0
# praw dependencies
prawcore==4.0.0
defusedxml==0.7.1
update-checker==1.0.0
websocket-client==1.9.0
# requests dependencies
charset_normalizer==3.5.1
idna==3.19
certifi==2026.7.22
# cryptography (via pyjwt[crypto]) dependencies
cryptography==49.0.0
cffi==2.1.1
pycparser==3.0
+281
View File
@@ -0,0 +1,281 @@
#!/usr/bin/python3 -OO
# Copyright 2008-2026 by The SABnzbd-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
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import json
import os
import re
import github
import praw
import requests
from common import (
RELEASE_VERSION,
PRERELEASE,
RELEASE_SRC,
RELEASE_WIN_BIN_X64,
RELEASE_WIN_BIN_ARM64,
RELEASE_WIN_INSTALLER,
RELEASE_MACOS,
RELEASE_README,
RELEASE_THIS,
RELEASE_TITLE,
pe_has_authenticode_signature,
)
# Verify we have all assets
files_to_check = (
RELEASE_SRC,
RELEASE_WIN_BIN_X64,
RELEASE_WIN_BIN_ARM64,
RELEASE_WIN_INSTALLER,
RELEASE_MACOS,
RELEASE_README,
)
for file_to_check in files_to_check:
if not os.path.exists(file_to_check):
raise RuntimeError("Release file %s is missing!" % file_to_check)
print("All release files are present")
# When releasing, the Windows installer must be signed
if RELEASE_THIS:
if not pe_has_authenticode_signature(RELEASE_WIN_INSTALLER):
raise RuntimeError("%s is not signed!" % RELEASE_WIN_INSTALLER)
print("%s has an Authenticode signature" % RELEASE_WIN_INSTALLER)
# Check if tagged as release and check for token
gh_token = os.environ.get("AUTOMATION_GITHUB_TOKEN", "")
if RELEASE_THIS and gh_token:
gh_obj = github.Github(auth=github.Auth.Token(gh_token))
gh_repo = gh_obj.get_repo("sabnzbd/sabnzbd")
# Read the release notes (reused for the Reddit post below)
with open(RELEASE_README, "r") as readme_file:
readme_data = readme_file.read()
# Find the existing release for this tag, or create a fresh draft
try:
gh_release = gh_repo.get_release(RELEASE_VERSION)
print("Found existing release %s" % gh_release.name)
except github.UnknownObjectException:
print("Creating GitHub release SABnzbd %s" % RELEASE_VERSION)
gh_release = gh_repo.create_git_release(
tag=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=True,
prerelease=PRERELEASE,
)
# Overwriting an asset isn't allowed by GitHub, so delete any that already exist
existing_assets = {asset.name: asset for asset in gh_release.get_assets()}
for file_to_upload in files_to_check:
if file_to_upload in existing_assets:
print("Removing existing asset %s" % file_to_upload)
existing_assets[file_to_upload].delete_asset()
print("Uploading %s to release %s" % (file_to_upload, gh_release.name))
gh_release.upload_asset(file_to_upload)
# Publish the release once all assets are attached
uploaded_assets = {asset.name for asset in gh_release.get_assets()}
if set(files_to_check).issubset(uploaded_assets):
print("All assets present, releasing %s" % RELEASE_VERSION)
gh_release.update_release(
tag_name=RELEASE_VERSION,
name=RELEASE_TITLE,
message=readme_data,
draft=False,
prerelease=PRERELEASE,
)
# Update the website
gh_repo_web = gh_obj.get_repo("sabnzbd/sabnzbd.github.io")
# Check if the branch already exists, only create one if it doesn't
skip_website_update = False
try:
gh_repo_web.get_branch(RELEASE_VERSION)
print("Branch %s on sabnzbd/sabnzbd.github.io already exists, skipping update" % RELEASE_VERSION)
skip_website_update = True
except github.GithubException:
# Create a new branch to have the changes
sb = gh_repo_web.get_branch("master")
print("Creating branch %s on sabnzbd/sabnzbd.github.io" % RELEASE_VERSION)
new_branch = gh_repo_web.create_git_ref(ref="refs/heads/" + RELEASE_VERSION, sha=sb.commit.sha)
# Update the files
if not skip_website_update:
# We need bytes version to interact with GitHub
RELEASE_VERSION_BYTES = RELEASE_VERSION.encode()
# Get all the version files
latest_txt = gh_repo_web.get_contents("latest.txt")
latest_txt_items = latest_txt.decoded_content.split()
new_latest_txt_items = latest_txt_items[:2]
config_yml = gh_repo_web.get_contents("_config.yml")
if PRERELEASE:
# If it's a pre-release, we append to current version in latest.txt
new_latest_txt_items.extend([RELEASE_VERSION_BYTES, latest_txt_items[1]])
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: '%s'" % RELEASE_VERSION_BYTES,
config_yml.decoded_content,
)
else:
# New stable release, replace the version
new_latest_txt_items[0] = RELEASE_VERSION_BYTES
# And replace in _config.yml
new_config_yml = re.sub(
b"latest_testing: '[^']*'",
b"latest_testing: ''",
config_yml.decoded_content,
)
new_config_yml = re.sub(
b"latest_stable: '[^']*'",
b"latest_stable: '%s'" % RELEASE_VERSION_BYTES,
new_config_yml,
)
# Also update the wiki-settings, these only use x.x notation
new_config_yml = re.sub(
b"wiki_version: '[^']*'",
b"wiki_version: '%s'" % RELEASE_VERSION_BYTES[:3],
new_config_yml,
)
# Update the files
print("Updating latest.txt")
gh_repo_web.update_file(
"latest.txt",
"Release %s: latest.txt" % RELEASE_VERSION,
b"\n".join(new_latest_txt_items),
latest_txt.sha,
RELEASE_VERSION,
)
print("Updating _config.yml")
gh_repo_web.update_file(
"_config.yml",
"Release %s: _config.yml" % RELEASE_VERSION,
new_config_yml,
config_yml.sha,
RELEASE_VERSION,
)
# Create pull-request
print("Creating pull request in sabnzbd/sabnzbd.github.io for the update")
update_pr = gh_repo_web.create_pull(
title="Release %s" % RELEASE_VERSION,
base="master",
body="Automated update of release files",
head=RELEASE_VERSION,
)
# Merge pull-request
print("Merging pull request in sabnzbd/sabnzbd.github.io for the update")
update_pr.merge(merge_method="squash")
# Trigger the Docker image build at linuxserver.io
# Branch "develop" builds the pre-releases, "master" the stable releases
if linuxserver_token := os.environ.get("LINUXSERVER_WEBHOOK_TOKEN", ""):
linuxserver_branch = "develop" if PRERELEASE else "master"
print("Triggering linuxserver.io Docker build for branch %s" % linuxserver_branch)
requests.post(
"https://ci.linuxserver.io/generic-webhook-trigger/invoke?sabnzbd",
headers={"Authorization": "Bearer %s" % linuxserver_token},
json={"branch": linuxserver_branch},
timeout=30,
).raise_for_status()
else:
print("Missing LINUXSERVER_WEBHOOK_TOKEN")
# Only with GitHub success we proceed to Reddit
if reddit_token := os.environ.get("REDDIT_TOKEN", ""):
# Token format (without whitespace):
# {
# "client_id":"XXX",
# "client_secret":"XXX",
# "user_agent":"SABnzbd release script",
# "username":"Safihre",
# "password":"XXX"
# }
credentials = json.loads(reddit_token)
reddit = praw.Reddit(**credentials)
subreddit_sabnzbd = reddit.subreddit("sabnzbd")
subreddit_usenet = reddit.subreddit("usenet")
# Reuse the release notes read earlier, split into lines
readme_lines = readme_data.splitlines(keepends=True)
# Put the download link after the title
readme_lines[2] = "## https://sabnzbd.org/downloads\n\n"
# Use the header in the readme as title
title = readme_lines[0]
release_notes_text = "".join(readme_lines[2:])
print("Posting release notes to Reddit")
# Only stable releases to r/usenet
if not PRERELEASE:
# Get correct flair-id (required by r/usenet)
for flair in subreddit_usenet.flair.link_templates.user_selectable():
if flair["flair_text"] == "News":
print("Posting to r/usenet")
submission = subreddit_usenet.submit(
title, selftext=release_notes_text, flair_id=flair["flair_template_id"]
)
break
else:
raise ValueError("Could not locate flair_text for posting to r/usenet")
# Post always to r/SABnzbd
print("Posting to r/sabnzbd")
subreddit_sabnzbd.submit(title, selftext=release_notes_text)
else:
print("Missing REDDIT_TOKEN")
# Push release notes to Discord via an incoming webhook
# Separate channels for testing (pre-release) and stable, both are required
discord_webhook_testing = os.environ.get("DISCORD_WEBHOOK_TESTING", "")
discord_webhook_stable = os.environ.get("DISCORD_WEBHOOK_STABLE", "")
if discord_webhook_testing and discord_webhook_stable:
discord_webhook = discord_webhook_testing if PRERELEASE else discord_webhook_stable
print("Posting release notes to Discord")
# Reuse the release notes read earlier: line 0 is the title header
discord_lines = readme_data.splitlines(keepends=True)
discord_title = discord_lines[0].lstrip("# ").strip()
discord_body = "".join(discord_lines[2:])[:4096]
requests.post(
discord_webhook,
json={
"embeds": [
{
"title": discord_title,
"url": gh_release.html_url,
"description": discord_body,
"color": 0xFFA500 if PRERELEASE else 0x00A550,
}
]
},
timeout=30,
).raise_for_status()
else:
print("Missing DISCORD_WEBHOOK_TESTING and/or DISCORD_WEBHOOK_STABLE")
else:
print("To push release to GitHub, first tag the commit.")
print("Or missing the AUTOMATION_GITHUB_TOKEN, cannot push to GitHub without it.")
+22 -8
View File
@@ -1,9 +1,23 @@
# Basic build requirements
pyinstaller==4.2
setuptools
pkginfo
certifi
pygithub
# All sub-dependencies are listed below and installed with --no-dependencies for security
pyinstaller==6.22.2
packaging==26.3
pyinstaller-hooks-contrib==2026.6
altgraph==0.17.5
wrapt==2.3.0
setuptools==84.0.0
markdown==3.10.3
pefile==2024.8.26
# For the OSX build specific
dmgbuild; sys_platform == 'darwin'
# For the Windows build
pywin32-ctypes==0.2.3; sys_platform == 'win32'
# For the macOS build
dmgbuild==1.6.7; sys_platform == 'darwin'
mac-alias==2.2.3; sys_platform == 'darwin'
macholib==1.16.4; sys_platform == 'darwin'
ds-store==1.3.3; sys_platform == 'darwin'
PyNaCl==1.6.2; sys_platform == 'darwin'
# 48.0.0 is the last cryptography version shipping a macOS universal2 wheel (49+ is arm64-only)
# See https://github.com/pyca/cryptography/issues/13520
cryptography<49.0.0; sys_platform == 'darwin'
+433 -106
View File
@@ -1,6 +1,6 @@
; -*- coding: utf-8 -*-
; -*- coding: utf-8 -*-
;
; Copyright 2008-2015 The SABnzbd-Team <team@sabnzbd.org>
; Copyright 2008-2015 The SABnzbd-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
@@ -18,6 +18,10 @@
Unicode true
; Must precede any data/header output. Solid LZMA dedups identical files (e.g. the
; two SABnzbd*.pkg archives) and shrinks the whole installer.
SetCompressor /SOLID lzma
!addplugindir builder\win\nsis\Plugins
!addincludedir builder\win\nsis\Include
@@ -29,10 +33,11 @@ Unicode true
!include "nsProcess.nsh"
!include "x64.nsh"
!include "servicelib.nsh"
!include "StdUtils.nsh"
;------------------------------------------------------------------
;
; Marco for removing existing and the current installation
; Macro for removing existing and the current installation
; It shared by the installer and the uninstaller.
;
!define RemovePrev "!insertmacro RemovePrev"
@@ -42,21 +47,54 @@ Unicode true
RMDir /r "${idir}"
!macroend
!define RemovePrevShortcuts "!insertmacro RemovePrevShortcuts"
!macro RemovePrevShortcuts
; Remove shortcuts, starting with current user ones (from old installs)
SetShellVarContext current
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - SafeMode.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - Documentation.url"
RMDir "$SMPROGRAMS\$MUI_TEMP"
Delete "$SMPROGRAMS\Startup\SABnzbd.lnk"
Delete "$DESKTOP\SABnzbd.lnk"
SetShellVarContext all
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - SafeMode.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - Documentation.url"
RMDir "$SMPROGRAMS\$MUI_TEMP"
Delete "$SMPROGRAMS\Startup\SABnzbd.lnk"
Delete "$DESKTOP\SABnzbd.lnk"
!macroend
;------------------------------------------------------------------
; Define names of the product
Name "${SAB_PRODUCT}"
Name "SABnzbd ${SAB_VERSION}"
VIProductVersion "${SAB_VERSIONKEY}"
VIFileVersion "${SAB_VERSIONKEY}"
VIAddVersionKey "Comments" "SABnzbd ${SAB_VERSION}"
VIAddVersionKey "CompanyName" "The SABnzbd-Team"
VIAddVersionKey "FileDescription" "SABnzbd ${SAB_VERSION}"
VIAddVersionKey "FileVersion" "${SAB_VERSION}"
VIAddVersionKey "LegalCopyright" "The SABnzbd-Team"
VIAddVersionKey "ProductName" "SABnzbd ${SAB_VERSION}"
VIAddVersionKey "ProductVersion" "${SAB_VERSION}"
OutFile "${SAB_FILE}"
InstallDir "$PROGRAMFILES\SABnzbd"
;------------------------------------------------------------------
; Some default compiler settings (uncomment and change at will):
SetCompress auto ; (can be off or force)
SetDatablockOptimize on ; (can be off)
CRCCheck on ; (can be off)
AutoCloseWindow false ; (can be true for the window go away automatically at end)
ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
SetDateSave off ; (can be on to have files restored to their orginal date)
SetDateSave off ; (can be on to have files restored to their original date)
WindowIcon on
SpaceTexts none
@@ -66,7 +104,6 @@ Unicode true
RequestExecutionLevel admin
FileErrorText "If you have no admin rights, try to install into a user directory."
;------------------------------------------------------------------
;Variables
Var MUI_TEMP
@@ -106,10 +143,10 @@ Unicode true
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
!insertmacro MUI_PAGE_INSTFILES
; !define MUI_FINISHPAGE_RUN
; !define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
; !define MUI_FINISHPAGE_RUN_TEXT $(MsgRunSAB)
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
!define MUI_FINISHPAGE_RUN_TEXT $(MsgRunSAB)
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.html"
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(MsgShowRelNote)
!define MUI_FINISHPAGE_LINK $(MsgSupportUs)
!define MUI_FINISHPAGE_LINK_LOCATION "https://sabnzbd.org/donate"
@@ -117,16 +154,25 @@ Unicode true
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!define MUI_UNPAGE_COMPONENTSPAGE_NODESC
!insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_INSTFILES
;------------------------------------------------------------------
; Run as user-level at end of install
; DOES NOT WORK
; Function PageFinishRun
; !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\SABnzbd.exe" "" "" ""
; FunctionEnd
Function PageFinishRun
; Check if SABnzbd service is installed
!insertmacro SERVICE "installed" "SABnzbd" ""
Pop $0 ;response
${If} $0 == true
; Service is installed, start the service
!insertmacro SERVICE "start" "SABnzbd" ""
Pop $0
${Else}
; Service not installed, run executable as user
${StdUtils.ExecShellAsUser} $0 "$INSTDIR\SABnzbd.exe" "" ""
${EndIf}
FunctionEnd
;------------------------------------------------------------------
@@ -142,18 +188,19 @@ Unicode true
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "SimpChinese"
;------------------------------------------------------------------
;Reserve Files
;If you are using solid compression, files that are required before
@@ -169,37 +216,77 @@ Unicode true
Section "SABnzbd" SecDummy
SetOutPath "$INSTDIR"
SetShellVarContext all
DetailPrint $(MsgShutting)
;------------------------------------------------------------------
; Shutdown any running service
!insertmacro SERVICE "stop" "SABnzbd" ""
Pop $0
;------------------------------------------------------------------
; Terminate SABnzbd.exe
; Ask nicely first, but kill forcefully if it does not exit in time
StrCpy $R1 0
loop:
${nsProcess::FindProcess} "SABnzbd.exe" $R0
StrCmp $R0 0 0 endcheck
IntCmp $R1 20 forcekill 0 forcekill
${nsProcess::CloseProcess} "SABnzbd.exe" $R0
IntOp $R1 $R1 + 1
Sleep 500
Goto loop
forcekill:
${nsProcess::KillProcess} "SABnzbd.exe" $R0
Sleep 500
endcheck:
${nsProcess::Unload}
;------------------------------------------------------------------
; Make sure old versions are gone (reg-key already read in onInt)
StrCmp $PREV_INST_DIR "" noPrevInstallRemove
; Only remove the directory if it actually contains a SABnzbd installation,
; the registry value could point anywhere
IfFileExists "$PREV_INST_DIR\SABnzbd.exe" 0 noPrevInstallRemove
${RemovePrev} "$PREV_INST_DIR"
Goto continueSetupAfterRemove
;------------------------------------------------------------------
; Add firewall rules for new installs
noPrevInstallRemove:
liteFirewallW::AddRule "$INSTDIR\SABnzbd.exe" "SABnzbd"
liteFirewallW::AddRule "$INSTDIR\SABnzbd-console.exe" "SABnzbd-console"
continueSetupAfterRemove:
; add files / whatever that need to be installed here.
File /r "dist\SABnzbd\*"
;------------------------------------------------------------------
; Add firewall rules
liteFirewallW::AddRule "$INSTDIR\SABnzbd.exe" "SABnzbd"
liteFirewallW::AddRule "$INSTDIR\SABnzbd-console.exe" "SABnzbd-console"
;------------------------------------------------------------------
; Add to registery
; Add to registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" "Installer Language" "$(MsgLangCode)"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayName" "SABnzbd ${SAB_VERSION}"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayVersion" '${SAB_VERSION}'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Publisher" 'The SABnzbd Team'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Publisher" 'The SABnzbd-Team'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "HelpLink" 'https://forums.sabnzbd.org/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "URLInfoAbout" 'https://sabnzbd.org/wiki/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "URLUpdateInfo" 'https://sabnzbd.org/'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "Comments" 'The automated Usenet download tool'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "DisplayIcon" '$INSTDIR\icons\sabnzbd.ico'
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "EstimatedSize" 25674
; Calculate the actual installed size for Add/Remove Programs
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "EstimatedSize" "$0"
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoRepair" -1
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd" "NoModify" -1
WriteRegStr HKEY_CURRENT_USER "Software\Classes\AppUserModelId\SABnzbd" "DisplayName" "SABnzbd"
WriteRegStr HKEY_CURRENT_USER "Software\Classes\AppUserModelId\SABnzbd" "IconUri" '$INSTDIR\icons\sabnzbd16_32.ico'
; write out uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -232,23 +319,28 @@ Function .onInit
${If} ${RunningX64}
StrCpy $INSTDIR "$PROGRAMFILES64\SABnzbd"
${Else}
MessageBox MB_OK $(MsgOnly64bit)
ExecShell "open" "https://sabnzbd.org/downloads"
MessageBox MB_OK|MB_ICONSTOP $(MsgOnly64bit)
Abort
${EndIf}
; Python 3.9 no longer supports Windows 7
${If} ${AtMostWin8}
MessageBox MB_OK $(MsgNoWin7)
ExecShell "open" "https://sabnzbd.org/downloads"
MessageBox MB_OK|MB_ICONSTOP $(MsgNoWin7)
Abort
${EndIf}
; Inform ARM64 users that a native ARM64 build is available
${If} ${IsNativeARM64}
MessageBox MB_OKCANCEL|MB_ICONINFORMATION $(MsgARM64Notice) IDOK continueARM64
Abort
continueARM64:
${EndIf}
;------------------------------------------------------------------
; Change settings based on if SAB was already installed
ReadRegStr $PREV_INST_DIR HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" ""
StrCmp $PREV_INST_DIR "" noPrevInstall
; We want to use the user's costom dir if he used one
; We want to use the user's custom dir if he used one
StrCmp $PREV_INST_DIR "$PROGRAMFILES\SABnzbd" noSpecialDir
StrCmp $PREV_INST_DIR "$PROGRAMFILES64\SABnzbd" noSpecialDir
; Set what the user had before
@@ -257,15 +349,24 @@ Function .onInit
;------------------------------------------------------------------
; Check what the user has currently set for install options
SetShellVarContext current
IfFileExists "$SMPROGRAMS\Startup\SABnzbd.lnk" 0 endCheckStartupCurrent
SectionSetFlags ${startup} 1
endCheckStartupCurrent:
SetShellVarContext all
IfFileExists "$SMPROGRAMS\Startup\SABnzbd.lnk" 0 endCheckStartup
SectionSetFlags ${startup} 1
endCheckStartup:
SetShellVarContext current
IfFileExists "$DESKTOP\SABnzbd.lnk" endCheckDesktop 0
SectionSetFlags ${desktop} 0 ; SAB is installed but desktop-icon not, so uncheck it
; If not present for current user, first check all user folder
SetShellVarContext all
IfFileExists "$DESKTOP\SABnzbd.lnk" endCheckDesktop 0
SectionSetFlags ${desktop} 0 ; SAB is installed but desktop-icon not, so uncheck it
endCheckDesktop:
SetShellVarContext all
Push $1
ReadRegStr $1 HKCR ".nzb" "" ; read current file association
StrCmp "$1" "NZB File" noPrevInstall 0
SectionSetFlags ${assoc} 0 ; Uncheck it when it wasn't checked before
@@ -275,85 +376,59 @@ Function .onInit
; Display language chooser
!insertmacro MUI_LANGDLL_DISPLAY
;------------------------------------------------------------------
; make sure user terminates sabnzbd.exe or else abort
;
loop:
${nsProcess::FindProcess} "SABnzbd.exe" $R0
StrCmp $R0 0 0 endcheck
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgCloseSab) IDOK loop IDCANCEL exitinstall
exitinstall:
${nsProcess::Unload}
Abort
endcheck:
;------------------------------------------------------------------
; make sure both services aren't running
;
!insertmacro SERVICE "running" "SABnzbd" ""
Pop $0 ;response
!insertmacro SERVICE "running" "SABHelper" ""
Pop $1
${If} $0 == true
${OrIf} $1 == true
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgCloseSab) IDOK loop IDCANCEL exitinstall
; exitinstall already defined above
${EndIf}
;------------------------------------------------------------------
; Tell users about the service change
;
!insertmacro SERVICE "installed" "SABHelper" ""
Pop $0 ;response
${If} $0 == true
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgServChange) IDOK removeservices IDCANCEL exitinstall
; exitinstall already defined above
removeservices:
!insertmacro SERVICE "delete" "SABHelper" ""
!insertmacro SERVICE "delete" "SABnzbd" ""
${EndIf}
FunctionEnd
;------------------------------------------------------------------
; Show the shortcuts at end of install so user can start SABnzbd
; This is instead of us trying to run SAB from the installer
;
Function .onInstSuccess
ExecShell "open" "$SMPROGRAMS\$STARTMENU_FOLDER"
FunctionEnd
;--------------------------------
; begin uninstall settings/section
UninstallText $(MsgUninstall)
; Uninstaller variants of the servicelib functions, needed by the SERVICE macro.
; APITAG is undefined again at the end of servicelib.nsh, so redefine it here.
!define APITAG "W"
Function un.Service
!insertmacro FUNC_SERVICE "un."
FunctionEnd
Function un.GetParam
!insertmacro FUNC_GETPARAM
FunctionEnd
!undef APITAG
Section "un.$(MsgDelProgram)" Uninstall
;make sure sabnzbd.exe isnt running..if so shut it down
;make sure sabnzbd.exe isn't running..if so shut it down
DetailPrint $(MsgShutting)
; Stop and remove the SABnzbd service, if it is installed
!insertmacro SERVICE "installed" "SABnzbd" ""
Pop $0
${If} $0 == true
!insertmacro SERVICE "stop" "SABnzbd" ""
Pop $0
!insertmacro SERVICE "delete" "SABnzbd" ""
Pop $0
${EndIf}
${nsProcess::KillProcess} "SABnzbd.exe" $R0
${nsProcess::Unload}
DetailPrint "Process Killed"
; add delete commands to delete whatever files/registry keys/etc you installed here.
Delete "$INSTDIR\uninstall.exe"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SABnzbd"
DeleteRegKey HKEY_CURRENT_USER "Software\Classes\AppUserModelId\SABnzbd"
DeleteRegKey HKEY_CURRENT_USER "Software\SABnzbd"
${RemovePrev} "$INSTDIR"
; Only remove the directory if it actually contains a SABnzbd installation
IfFileExists "$INSTDIR\SABnzbd.exe" 0 skipRemoveDir
${RemovePrev} "$INSTDIR"
skipRemoveDir:
${RemovePrevShortcuts}
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - SafeMode.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\SABnzbd - Documentation.url"
RMDir "$SMPROGRAMS\$MUI_TEMP"
Delete "$SMPROGRAMS\Startup\SABnzbd.lnk"
Delete "$DESKTOP\SABnzbd.lnk"
DeleteRegKey HKEY_CURRENT_USER "Software\SABnzbd"
; Remove firewall entries
liteFirewallW::RemoveRule "$INSTDIR\SABnzbd.exe" "SABnzbd"
liteFirewallW::RemoveRule "$INSTDIR\SABnzbd-console.exe" "SABnzbd-console"
${unregisterExtension} ".nzb" "NZB File"
${RefreshShellIcons}
@@ -361,8 +436,10 @@ Section "un.$(MsgDelProgram)" Uninstall
SectionEnd ; end of uninstall section
Section /o "un.$(MsgDelSettings)" DelSettings
DetailPrint "Uninstall settings $LOCALAPPDATA"
Delete "$LOCALAPPDATA\sabnzbd\sabnzbd.ini"
; The main uninstall section leaves the context on "all", which would make
; $LOCALAPPDATA point to C:\ProgramData instead of the user's profile
SetShellVarContext current
DetailPrint "Uninstall settings $LOCALAPPDATA\sabnzbd"
RMDir /r "$LOCALAPPDATA\sabnzbd"
SectionEnd
@@ -371,34 +448,284 @@ SectionEnd
;--------------------------------
;Language strings
LangString MsgShowRelNote ${LANG_ENGLISH} "Show Release Notes"
LangString MsgShowRelNote ${LANG_CZECH} "Zobrazit poznámky k vydání"
LangString MsgShowRelNote ${LANG_DANISH} "Vis udgivelsesbemærkninger"
LangString MsgShowRelNote ${LANG_GERMAN} "Versionshinweise anzeigen"
LangString MsgShowRelNote ${LANG_SPANISH} "Mostrar notas de la versión"
LangString MsgShowRelNote ${LANG_FINNISH} "Näytä julkaisutiedot"
LangString MsgShowRelNote ${LANG_FRENCH} "Afficher les notes de version"
LangString MsgShowRelNote ${LANG_HEBREW} "הראה הערות שחרור"
LangString MsgShowRelNote ${LANG_ITALIAN} "Mostra note di rilascio"
LangString MsgShowRelNote ${LANG_NORWEGIAN} "Vis versjonsmerknader"
LangString MsgShowRelNote ${LANG_DUTCH} "Toon opmerkingen bij deze uitgave"
LangString MsgShowRelNote ${LANG_POLISH} "Pokaż informacje o wydaniu"
LangString MsgShowRelNote ${LANG_PORTUGUESEBR} "Mostrar Notas de Lançamento"
LangString MsgShowRelNote ${LANG_ROMANIAN} "Arată Notele de Publicare"
LangString MsgShowRelNote ${LANG_RUSSIAN} "Показать заметки о выпуске"
LangString MsgShowRelNote ${LANG_SERBIAN} "Прикажи белешке о издању"
LangString MsgShowRelNote ${LANG_SWEDISH} "Visa releasenoteringar"
LangString MsgShowRelNote ${LANG_TURKISH} "Yayın Notlarını Göster"
LangString MsgShowRelNote ${LANG_SIMPCHINESE} "显示版本说明"
LangString MsgRunSAB ${LANG_ENGLISH} "Run SABnzbd"
LangString MsgRunSAB ${LANG_CZECH} "Spustit SABnzbd"
LangString MsgRunSAB ${LANG_DANISH} "Kør SABnzbd"
LangString MsgRunSAB ${LANG_GERMAN} "SABnzbd starten"
LangString MsgRunSAB ${LANG_SPANISH} "Ejecutar SABnzbd"
LangString MsgRunSAB ${LANG_FINNISH} "Käynnistä SABnzbd"
LangString MsgRunSAB ${LANG_FRENCH} "Lancer SABnzbd"
LangString MsgRunSAB ${LANG_HEBREW} "הפעל את SABnzbd"
LangString MsgRunSAB ${LANG_ITALIAN} "Avvia SABnzbd"
LangString MsgRunSAB ${LANG_NORWEGIAN} "Kjør SABnzbd"
LangString MsgRunSAB ${LANG_DUTCH} "SABnzbd starten"
LangString MsgRunSAB ${LANG_POLISH} "Uruchom SABnzbd"
LangString MsgRunSAB ${LANG_PORTUGUESEBR} "Executar o SABnzbd"
LangString MsgRunSAB ${LANG_ROMANIAN} "Rulați SABnzbd"
LangString MsgRunSAB ${LANG_RUSSIAN} "Запустить SABnzbd"
LangString MsgRunSAB ${LANG_SERBIAN} "Покрени SABnzbd"
LangString MsgRunSAB ${LANG_SWEDISH} "Kör SABnzbd"
LangString MsgRunSAB ${LANG_TURKISH} "SABnzbd'yi çalıştır"
LangString MsgRunSAB ${LANG_SIMPCHINESE} "运行 SABnzbd"
LangString MsgSupportUs ${LANG_ENGLISH} "Support the project, Donate!"
LangString MsgSupportUs ${LANG_CZECH} "Podpořte projekt!"
LangString MsgSupportUs ${LANG_DANISH} "Støt projektet, donér!"
LangString MsgSupportUs ${LANG_GERMAN} "Bitte unterstützen Sie das Projekt durch eine Spende!"
LangString MsgSupportUs ${LANG_SPANISH} "¡Apoye el proyecto, haga una donación!"
LangString MsgSupportUs ${LANG_FINNISH} "Tue projektia, lahjoita!"
LangString MsgSupportUs ${LANG_FRENCH} "Soutenez le projet, faites un don !"
LangString MsgSupportUs ${LANG_HEBREW} "תמוך במיזם, תרום!"
LangString MsgSupportUs ${LANG_ITALIAN} "Sostieni il progetto, dona!"
LangString MsgSupportUs ${LANG_NORWEGIAN} "Støtt prosjektet, donèr!"
LangString MsgSupportUs ${LANG_DUTCH} "Steun het project, doneer!"
LangString MsgSupportUs ${LANG_POLISH} "Wspomóż projekt!"
LangString MsgSupportUs ${LANG_PORTUGUESEBR} "Apoie o projeto. Faça uma doação!"
LangString MsgSupportUs ${LANG_ROMANIAN} "Susţine proiectul, Donează!"
LangString MsgSupportUs ${LANG_RUSSIAN} "Поддержите проект. Сделайте пожертвование!"
LangString MsgSupportUs ${LANG_SERBIAN} "Подржите пројекат, дајте добровољан прилог!"
LangString MsgSupportUs ${LANG_SWEDISH} "Donera och stöd detta projekt!"
LangString MsgSupportUs ${LANG_TURKISH} "Projeye destek olun, Bağış Yapın!"
LangString MsgSupportUs ${LANG_SIMPCHINESE} "支持该项目,捐助!"
LangString MsgCloseSab ${LANG_ENGLISH} "Please close $\"SABnzbd.exe$\" first"
LangString MsgOnly64bit ${LANG_ENGLISH} "SABnzbd only supports 64-bit Windows."
LangString MsgOnly64bit ${LANG_CZECH} "SABnzbd podporuje pouze 64bitové Windows."
LangString MsgOnly64bit ${LANG_DANISH} "SABnzbd understøtter kun 64-bit Windows."
LangString MsgOnly64bit ${LANG_GERMAN} "SABnzbd unterstützt nur 64-Bit-Windows."
LangString MsgOnly64bit ${LANG_SPANISH} "SABnzbd solo es compatible con Windows de 64 bits."
LangString MsgOnly64bit ${LANG_FINNISH} "SABnzbd tukee vain 64-bittistä Windowsia."
LangString MsgOnly64bit ${LANG_FRENCH} "SABnzbd n'est compatible qu'avec Windows 64 bits."
LangString MsgOnly64bit ${LANG_HEBREW} "SABnzbd תומך רק במערכות Windows מסוג 64 סיביות."
LangString MsgOnly64bit ${LANG_ITALIAN} "SABnzbd supporta solo Windows a 64 bit."
LangString MsgOnly64bit ${LANG_NORWEGIAN} "SABnzbd støtter kun 64-bit Windows."
LangString MsgOnly64bit ${LANG_DUTCH} "SABnzbd ondersteund alleen 64bit Windows."
LangString MsgOnly64bit ${LANG_POLISH} "SABnzbd obsługuje tylko system Windows 64-bit."
LangString MsgOnly64bit ${LANG_PORTUGUESEBR} "O SABnzbd oferece suporte apenas ao Windows de 64 bits."
LangString MsgOnly64bit ${LANG_ROMANIAN} "SABnzbd acceptă doar Windows pe 64 de biți."
LangString MsgOnly64bit ${LANG_RUSSIAN} "SABnzbd поддерживает только 64-битные версии Windows."
LangString MsgOnly64bit ${LANG_SERBIAN} "SABnzbd подржава само 64‑битни Windows."
LangString MsgOnly64bit ${LANG_SWEDISH} "SABnzbd stöder endast 64-bitars Windows."
LangString MsgOnly64bit ${LANG_TURKISH} "SABnzbd sadece 64 bit Windows'u destekler."
LangString MsgOnly64bit ${LANG_SIMPCHINESE} "SABnzbd 仅支持 64 位 Windows。"
LangString MsgServChange ${LANG_ENGLISH} "The SABnzbd Windows Service changed in SABnzbd 3.0.0. $\nYou will need to reinstall the SABnzbd service. $\n$\nClick `OK` to remove the existing services or `Cancel` to cancel this upgrade."
LangString MsgNoWin7 ${LANG_ENGLISH} "SABnzbd only supports Windows 8.1 and above."
LangString MsgNoWin7 ${LANG_CZECH} "SABnzbd podporuje pouze Windows 8.1 a novější."
LangString MsgNoWin7 ${LANG_DANISH} "SABnzbd understøtter kun Windows 8.1 og nyere."
LangString MsgNoWin7 ${LANG_GERMAN} "SABnzbd unterstützt nur Windows 8.1 und höher."
LangString MsgNoWin7 ${LANG_SPANISH} "SABnzbd solo es compatible con Windows 8.1 y superiores."
LangString MsgNoWin7 ${LANG_FINNISH} "SABnzbd tukee vain Windows 8.1:tä ja uudempia."
LangString MsgNoWin7 ${LANG_FRENCH} "SABnzbd n'est compatible qu'avec Windows 8.1 et plus."
LangString MsgNoWin7 ${LANG_HEBREW} "SABnzbd תומך רק במערכות Windows 8.1 ומעלה."
LangString MsgNoWin7 ${LANG_ITALIAN} "SABnzbd supporta solo Windows 8.1 e versioni successive."
LangString MsgNoWin7 ${LANG_NORWEGIAN} "SABnzbd støtter kun Windows 8.1 og nyere."
LangString MsgNoWin7 ${LANG_DUTCH} "SABnzbd ondersteund alleen Windows 8.1 en hoger."
LangString MsgNoWin7 ${LANG_POLISH} "SABnzbd obsługuje tylko Windows 8.1 i nowsze."
LangString MsgNoWin7 ${LANG_PORTUGUESEBR} "O SABnzbd oferece suporte apenas ao Windows 8.1 e superior."
LangString MsgNoWin7 ${LANG_ROMANIAN} "SABnzbd acceptă doar Windows 8.1 și versiunile ulterioare."
LangString MsgNoWin7 ${LANG_RUSSIAN} "SABnzbd поддерживает только Windows 8.1 и более новые."
LangString MsgNoWin7 ${LANG_SERBIAN} "SABnzbd подржава само Windows 8.1 и новије."
LangString MsgNoWin7 ${LANG_SWEDISH} "SABnzbd stöder endast Windows 8.1 och senare."
LangString MsgNoWin7 ${LANG_TURKISH} "SABnzbd sadece Windows 8.1 ve üzerini destekler."
LangString MsgNoWin7 ${LANG_SIMPCHINESE} "SABnzbd 仅支持 Windows 8.1 及更高版本。"
LangString MsgOnly64bit ${LANG_ENGLISH} "The installer only supports 64-bit Windows, use the standalone version to run on 32-bit Windows."
LangString MsgARM64Notice ${LANG_ENGLISH} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_CZECH} "Na naší stránce „Ke stažení“ je k dispozici verze SABnzbd pro architekturu ARM. Tento instalační program obsahuje pouze standardní verzi.$\nStiskněte tlačítko OK pro pokračování nebo Zrušit pro ukončení."
LangString MsgARM64Notice ${LANG_DANISH} "En ARM-version af SABnzbd er tilgængelig på vores downloadside. Dette installationsprogram indeholder kun den almindelige version.$\nTryk på OK for at fortsætte eller Annuller for at afslutte."
LangString MsgARM64Notice ${LANG_GERMAN} "Eine ARM-Version von SABnzbd ist auf unserer Downloads-Seite verfügbar. Dieses Installationsprogramm enthält nur die reguläre Version.$\nKlicken Sie auf OK, um fortzufahren, oder auf Abbrechen, um zu beenden."
LangString MsgARM64Notice ${LANG_SPANISH} "Hay una versión ARM de SABnzbd disponible en nuestra página de descargas. Este instalador solo contiene la versión normal.$\nPulsa Aceptar para continuar o Cancelar para salir."
LangString MsgARM64Notice ${LANG_FINNISH} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_FRENCH} "Une version ARM de SABnzbd est disponible sur notre page de téléchargement. Ce programme d'installation ne contient que la version standard.$\nCliquez sur OK pour continuer ou sur Annuler pour quitter."
LangString MsgARM64Notice ${LANG_HEBREW} "גרסת ARM של SABnzbd זמינה בעמוד ההורדות שלנו. תוכנת התקנה זו מכילה רק את הגרסה הרגילה.$\nלחץ על אישור כדי להמשיך או על ביטול כדי לצאת."
LangString MsgARM64Notice ${LANG_ITALIAN} "Una versione ARM di SABnzbd è disponibile nella nostra pagina dei download. Questo programma di installazione contiene solo la versione normale.$\nPremi OK per continuare o Annulla per uscire."
LangString MsgARM64Notice ${LANG_NORWEGIAN} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_DUTCH} "Er is een ARM versie van SABnzbd beschikbaar op onze Downloads pagina. Deze installatie bevat alleen de normale (niet-ARM) versie.$\nKlik OK om door te gaan of Annuleren om af te breken."
LangString MsgARM64Notice ${LANG_POLISH} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_PORTUGUESEBR} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_ROMANIAN} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_RUSSIAN} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_SERBIAN} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_SWEDISH} "An ARM version of SABnzbd is available on our Downloads page. This installer only contains the regular version.$\nPress OK to continue or Cancel to exit."
LangString MsgARM64Notice ${LANG_TURKISH} "SABnzbd'nin ARM sürümü İndirmeler sayfamızda mevcuttur. Bu kurulum programı sadece normal sürümü içermektedir.$\nDevam etmek için Tamam'a veya çıkmak için İptal'e tıklayın."
LangString MsgARM64Notice ${LANG_SIMPCHINESE} "我们的下载页面提供 SABnzbd 的 ARM 版本。此安装程序仅包含常规版本。$\n按“确定”继续,或按“取消”退出。"
LangString MsgNoWin7 ${LANG_ENGLISH} "The installer only supports Windows 8.1 and above, use the standalone legacy version to run on older Windows version."
LangString MsgShutting ${LANG_ENGLISH} "Shutting down SABnzbd"
LangString MsgShutting ${LANG_CZECH} "Vypínání SABnzbd"
LangString MsgShutting ${LANG_DANISH} "Lukker SABnzbd"
LangString MsgShutting ${LANG_GERMAN} "Beende SABnzbd"
LangString MsgShutting ${LANG_SPANISH} "Apagando SABnzbd"
LangString MsgShutting ${LANG_FINNISH} "Sammutetaan SABnzbd"
LangString MsgShutting ${LANG_FRENCH} "Arrêt de SABnzbd"
LangString MsgShutting ${LANG_HEBREW} "מכבה את SABnzbd"
LangString MsgShutting ${LANG_ITALIAN} "Arresto di SABnzbd in corso"
LangString MsgShutting ${LANG_NORWEGIAN} "Slår av SABnzbd"
LangString MsgShutting ${LANG_DUTCH} "SABnzbd wordt afgesloten"
LangString MsgShutting ${LANG_POLISH} "Zamykanie SABnzbd"
LangString MsgShutting ${LANG_PORTUGUESEBR} "Encerrando o SABnzbd"
LangString MsgShutting ${LANG_ROMANIAN} "Se oprește SABnzbd"
LangString MsgShutting ${LANG_RUSSIAN} "Завершение работы SABnzbd"
LangString MsgShutting ${LANG_SERBIAN} "Искључивање SABnzbd"
LangString MsgShutting ${LANG_SWEDISH} "Stänger av SABnzbd."
LangString MsgShutting ${LANG_TURKISH} "SABnzbd kapatılıyor"
LangString MsgShutting ${LANG_SIMPCHINESE} "正在关闭 SABnzbd"
LangString MsgUninstall ${LANG_ENGLISH} "This will uninstall SABnzbd from your system"
LangString MsgUninstall ${LANG_CZECH} "Tímto odinstalujete SABnzbd z vašeho systému"
LangString MsgUninstall ${LANG_DANISH} "Dette vil afinstallere SABnzbd fra dit system"
LangString MsgUninstall ${LANG_GERMAN} "Dies entfernt SABnzbd von Ihrem System"
LangString MsgUninstall ${LANG_SPANISH} "Esto desinstalará SABnzbd de su sistema"
LangString MsgUninstall ${LANG_FINNISH} "Tämä poistaa SABnzbd:n tietokoneestasi"
LangString MsgUninstall ${LANG_FRENCH} "Ceci désinstallera SABnzbd de votre système"
LangString MsgUninstall ${LANG_HEBREW} "זה יסיר את SABnzbd מהמערכת שלך"
LangString MsgUninstall ${LANG_ITALIAN} "Questo disinstallerà SABnzbd dal tuo sistema"
LangString MsgUninstall ${LANG_NORWEGIAN} "Dette vil avinstallere SABnzbd fra ditt system"
LangString MsgUninstall ${LANG_DUTCH} "Dit verwijdert SABnzbd van je systeem"
LangString MsgUninstall ${LANG_POLISH} "To odinstaluje SABnzbd z systemu"
LangString MsgUninstall ${LANG_PORTUGUESEBR} "Isso irá desinstalar SABnzbd de seu sistema"
LangString MsgUninstall ${LANG_ROMANIAN} "Acest lucru va dezinstala SABnzbd din sistem"
LangString MsgUninstall ${LANG_RUSSIAN} "Приложение SABnzbd будет удалено из вашей системы"
LangString MsgUninstall ${LANG_SERBIAN} "Ово ће уклонити САБнзбд са вашег система"
LangString MsgUninstall ${LANG_SWEDISH} "Detta kommer att avinstallera SABnzbd från systemet"
LangString MsgUninstall ${LANG_TURKISH} "Bu, SABnzbd'yi sisteminizden kaldıracaktır"
LangString MsgUninstall ${LANG_SIMPCHINESE} "这将从您的系统中卸载 SABnzbd"
LangString MsgRunAtStart ${LANG_ENGLISH} "Run at startup"
LangString MsgRunAtStart ${LANG_CZECH} "Spouštět při startu systému"
LangString MsgRunAtStart ${LANG_DANISH} "Kør ved opstart"
LangString MsgRunAtStart ${LANG_GERMAN} "Beim Systemstart ausführen"
LangString MsgRunAtStart ${LANG_SPANISH} "Ejecutar al inicio"
LangString MsgRunAtStart ${LANG_FINNISH} "Suorita käynnistyksen yhteydessä"
LangString MsgRunAtStart ${LANG_FRENCH} "Lancer au démarrage"
LangString MsgRunAtStart ${LANG_HEBREW} "הרץ בהזנק"
LangString MsgRunAtStart ${LANG_ITALIAN} "Esegui all'avvio"
LangString MsgRunAtStart ${LANG_NORWEGIAN} "Kjør ved oppstart"
LangString MsgRunAtStart ${LANG_DUTCH} "Starten met Windows"
LangString MsgRunAtStart ${LANG_POLISH} "Uruchom wraz z systemem"
LangString MsgRunAtStart ${LANG_PORTUGUESEBR} "Executar na inicialização"
LangString MsgRunAtStart ${LANG_ROMANIAN} "Executare la pornire"
LangString MsgRunAtStart ${LANG_RUSSIAN} "Запускать вместе с системой"
LangString MsgRunAtStart ${LANG_SERBIAN} "Покрени са системом"
LangString MsgRunAtStart ${LANG_SWEDISH} "Kör vid uppstart"
LangString MsgRunAtStart ${LANG_TURKISH} "Başlangıçta Çalıştır"
LangString MsgRunAtStart ${LANG_SIMPCHINESE} "启动时运行"
LangString MsgIcon ${LANG_ENGLISH} "Desktop Icon"
LangString MsgIcon ${LANG_CZECH} "Ikona na ploše"
LangString MsgIcon ${LANG_DANISH} "Skrivebordsikon"
LangString MsgIcon ${LANG_GERMAN} "Desktop-Symbol"
LangString MsgIcon ${LANG_SPANISH} "Icono del escritorio"
LangString MsgIcon ${LANG_FINNISH} "Työpöydän kuvake"
LangString MsgIcon ${LANG_FRENCH} "Icône sur le Bureau"
LangString MsgIcon ${LANG_HEBREW} "צור קיצור דרך בשולחן העבודה"
LangString MsgIcon ${LANG_ITALIAN} "Icona sul desktop"
LangString MsgIcon ${LANG_NORWEGIAN} "Skrivebordsikon"
LangString MsgIcon ${LANG_DUTCH} "Bureaubladpictogram"
LangString MsgIcon ${LANG_POLISH} "Ikona pulpitu"
LangString MsgIcon ${LANG_PORTUGUESEBR} "Ícone na Área de Trabalho"
LangString MsgIcon ${LANG_ROMANIAN} "Icoană Desktop"
LangString MsgIcon ${LANG_RUSSIAN} "Значок на рабочем столе"
LangString MsgIcon ${LANG_SERBIAN} "Иконица радне површи"
LangString MsgIcon ${LANG_SWEDISH} "Skrivbordsikon"
LangString MsgIcon ${LANG_TURKISH} "Masaüstü İkonu"
LangString MsgIcon ${LANG_SIMPCHINESE} "桌面图标"
LangString MsgAssoc ${LANG_ENGLISH} "NZB File association"
LangString MsgAssoc ${LANG_CZECH} "Přiřazení souborů NZB"
LangString MsgAssoc ${LANG_DANISH} "NZB-filtilknytning"
LangString MsgAssoc ${LANG_GERMAN} "Mit NZB-Dateien verknüpfen"
LangString MsgAssoc ${LANG_SPANISH} "Asociación de archivos NZB"
LangString MsgAssoc ${LANG_FINNISH} "NZB tiedostosidos"
LangString MsgAssoc ${LANG_FRENCH} "Association des fichiers NZB"
LangString MsgAssoc ${LANG_HEBREW} "NZB שייך קבצי"
LangString MsgAssoc ${LANG_ITALIAN} "Associazione file NZB"
LangString MsgAssoc ${LANG_NORWEGIAN} "NZB-filassosiering"
LangString MsgAssoc ${LANG_DUTCH} "NZB-bestanden openen met SABnzbd"
LangString MsgAssoc ${LANG_POLISH} "powiązanie pliku NZB"
LangString MsgAssoc ${LANG_PORTUGUESEBR} "Associação com Arquivos NZB"
LangString MsgAssoc ${LANG_ROMANIAN} "Asociere cu Fişierele NZB"
LangString MsgAssoc ${LANG_RUSSIAN} "Ассоциировать с файлами NZB"
LangString MsgAssoc ${LANG_SERBIAN} "Придруживање НЗБ датотеке"
LangString MsgAssoc ${LANG_SWEDISH} "NZB Filassosication"
LangString MsgAssoc ${LANG_TURKISH} "NZB Dosya ilişkilendirmesi"
LangString MsgAssoc ${LANG_SIMPCHINESE} "NZB 文件关联"
LangString MsgDelProgram ${LANG_ENGLISH} "Delete Program"
LangString MsgDelProgram ${LANG_CZECH} "Odstranit program"
LangString MsgDelProgram ${LANG_DANISH} "Slet program"
LangString MsgDelProgram ${LANG_GERMAN} "Programm löschen"
LangString MsgDelProgram ${LANG_SPANISH} "Eliminar programa"
LangString MsgDelProgram ${LANG_FINNISH} "Poista sovellus"
LangString MsgDelProgram ${LANG_FRENCH} "Supprimer le programme"
LangString MsgDelProgram ${LANG_HEBREW} "מחק תוכנית"
LangString MsgDelProgram ${LANG_ITALIAN} "Elimina programma"
LangString MsgDelProgram ${LANG_NORWEGIAN} "Fjern program"
LangString MsgDelProgram ${LANG_DUTCH} "Programma verwijderen"
LangString MsgDelProgram ${LANG_POLISH} "Usuń program"
LangString MsgDelProgram ${LANG_PORTUGUESEBR} "Excluir o Programa"
LangString MsgDelProgram ${LANG_ROMANIAN} "Şterge Program"
LangString MsgDelProgram ${LANG_RUSSIAN} "Удалить программу"
LangString MsgDelProgram ${LANG_SERBIAN} "Обриши програм"
LangString MsgDelProgram ${LANG_SWEDISH} "Radera programmet"
LangString MsgDelProgram ${LANG_TURKISH} "Programı Sil"
LangString MsgDelProgram ${LANG_SIMPCHINESE} "删除程序"
LangString MsgDelSettings ${LANG_ENGLISH} "Delete Settings"
LangString MsgRemoveOld ${LANG_ENGLISH} "You cannot overwrite an existing installation. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
LangString MsgRemoveOld2 ${LANG_ENGLISH} "Your settings and data will be preserved."
LangString MsgDelSettings ${LANG_CZECH} "Smazat nastavení"
LangString MsgDelSettings ${LANG_DANISH} "Slet indstillinger"
LangString MsgDelSettings ${LANG_GERMAN} "Einstellungen löschen"
LangString MsgDelSettings ${LANG_SPANISH} "Eliminar Ajustes"
LangString MsgDelSettings ${LANG_FINNISH} "Poista asetukset"
LangString MsgDelSettings ${LANG_FRENCH} "Supprimer les paramètres"
LangString MsgDelSettings ${LANG_HEBREW} "מחק הגדרות"
LangString MsgDelSettings ${LANG_ITALIAN} "Elimina impostazioni"
LangString MsgDelSettings ${LANG_NORWEGIAN} "Slett innstillinger"
LangString MsgDelSettings ${LANG_DUTCH} "Verwijder alle instellingen"
LangString MsgDelSettings ${LANG_POLISH} "Skasuj obecne ustawienia"
LangString MsgDelSettings ${LANG_PORTUGUESEBR} "Apagar Configurações"
LangString MsgDelSettings ${LANG_ROMANIAN} "Ştergeţi Setări"
LangString MsgDelSettings ${LANG_RUSSIAN} "Удалить параметры"
LangString MsgDelSettings ${LANG_SERBIAN} "Обриши подешавања"
LangString MsgDelSettings ${LANG_SWEDISH} "Radera inställningar"
LangString MsgDelSettings ${LANG_TURKISH} "Ayarları Sil"
LangString MsgDelSettings ${LANG_SIMPCHINESE} "删除设置"
LangString MsgLangCode ${LANG_ENGLISH} "en"
LangString MsgLangCode ${LANG_CZECH} "cs"
LangString MsgLangCode ${LANG_DANISH} "da"
LangString MsgLangCode ${LANG_GERMAN} "de"
LangString MsgLangCode ${LANG_SPANISH} "es"
LangString MsgLangCode ${LANG_FINNISH} "fi"
LangString MsgLangCode ${LANG_FRENCH} "fr"
LangString MsgLangCode ${LANG_HEBREW} "he"
LangString MsgLangCode ${LANG_ITALIAN} "it"
LangString MsgLangCode ${LANG_NORWEGIAN} "nb"
LangString MsgLangCode ${LANG_DUTCH} "nl"
LangString MsgLangCode ${LANG_POLISH} "pl"
LangString MsgLangCode ${LANG_PORTUGUESEBR} "pt_BR"
LangString MsgLangCode ${LANG_ROMANIAN} "ro"
LangString MsgLangCode ${LANG_RUSSIAN} "ru"
LangString MsgLangCode ${LANG_SERBIAN} "sr"
LangString MsgLangCode ${LANG_SWEDISH} "sv"
LangString MsgLangCode ${LANG_TURKISH} "tr"
LangString MsgLangCode ${LANG_SIMPCHINESE} "zh_CN"
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
+501
View File
@@ -0,0 +1,501 @@
#################################################################################
# StdUtils plug-in for NSIS
# Copyright (C) 2004-2018 LoRd_MuldeR <MuldeR2@GMX.de>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# http://www.gnu.org/licenses/lgpl-2.1.txt
#################################################################################
# DEVELOPER NOTES:
# - Please see "https://github.com/lordmulder/stdutils/" for news and updates!
# - Please see "Docs\StdUtils\StdUtils.html" for detailed function descriptions!
# - Please see "Examples\StdUtils\StdUtilsTest.nsi" for usage examples!
#################################################################################
# FUNCTION DECLARTIONS
#################################################################################
!ifndef ___STDUTILS__NSH___
!define ___STDUTILS__NSH___
!define StdUtils.Time '!insertmacro _StdU_Time' #time(), as in C standard library
!define StdUtils.GetMinutes '!insertmacro _StdU_GetMinutes' #GetSystemTimeAsFileTime(), returns the number of minutes
!define StdUtils.GetHours '!insertmacro _StdU_GetHours' #GetSystemTimeAsFileTime(), returns the number of hours
!define StdUtils.GetDays '!insertmacro _StdU_GetDays' #GetSystemTimeAsFileTime(), returns the number of days
!define StdUtils.Rand '!insertmacro _StdU_Rand' #rand(), as in C standard library
!define StdUtils.RandMax '!insertmacro _StdU_RandMax' #rand(), as in C standard library, with maximum value
!define StdUtils.RandMinMax '!insertmacro _StdU_RandMinMax' #rand(), as in C standard library, with minimum/maximum value
!define StdUtils.RandList '!insertmacro _StdU_RandList' #rand(), as in C standard library, with list support
!define StdUtils.RandBytes '!insertmacro _StdU_RandBytes' #Generates random bytes, returned as Base64-encoded string
!define StdUtils.FormatStr '!insertmacro _StdU_FormatStr' #sprintf(), as in C standard library, one '%d' placeholder
!define StdUtils.FormatStr2 '!insertmacro _StdU_FormatStr2' #sprintf(), as in C standard library, two '%d' placeholders
!define StdUtils.FormatStr3 '!insertmacro _StdU_FormatStr3' #sprintf(), as in C standard library, three '%d' placeholders
!define StdUtils.ScanStr '!insertmacro _StdU_ScanStr' #sscanf(), as in C standard library, one '%d' placeholder
!define StdUtils.ScanStr2 '!insertmacro _StdU_ScanStr2' #sscanf(), as in C standard library, two '%d' placeholders
!define StdUtils.ScanStr3 '!insertmacro _StdU_ScanStr3' #sscanf(), as in C standard library, three '%d' placeholders
!define StdUtils.TrimStr '!insertmacro _StdU_TrimStr' #Remove whitspaces from string, left and right
!define StdUtils.TrimStrLeft '!insertmacro _StdU_TrimStrLeft' #Remove whitspaces from string, left side only
!define StdUtils.TrimStrRight '!insertmacro _StdU_TrimStrRight' #Remove whitspaces from string, right side only
!define StdUtils.RevStr '!insertmacro _StdU_RevStr' #Reverse a string, e.g. "reverse me" <-> "em esrever"
!define StdUtils.ValidFileName '!insertmacro _StdU_ValidFileName' #Test whether string is a valid file name - no paths allowed
!define StdUtils.ValidPathSpec '!insertmacro _StdU_ValidPathSpec' #Test whether string is a valid full(!) path specification
!define StdUtils.ValidDomainName '!insertmacro _StdU_ValidDomain' #Test whether string is a valid host name or domain name
!define StdUtils.StrToUtf8 '!insertmacro _StdU_StrToUtf8' #Convert string from Unicode (UTF-16) or ANSI to UTF-8 bytes
!define StdUtils.StrFromUtf8 '!insertmacro _StdU_StrFromUtf8' #Convert string from UTF-8 bytes to Unicode (UTF-16) or ANSI
!define StdUtils.SHFileMove '!insertmacro _StdU_SHFileMove' #SHFileOperation(), using the FO_MOVE operation
!define StdUtils.SHFileCopy '!insertmacro _StdU_SHFileCopy' #SHFileOperation(), using the FO_COPY operation
!define StdUtils.AppendToFile '!insertmacro _StdU_AppendToFile' #Append contents of an existing file to another file
!define StdUtils.ExecShellAsUser '!insertmacro _StdU_ExecShlUser' #ShellExecute() as NON-elevated user from elevated installer
!define StdUtils.InvokeShellVerb '!insertmacro _StdU_InvkeShlVrb' #Invokes a "shell verb", e.g. for pinning items to the taskbar
!define StdUtils.ExecShellWaitEx '!insertmacro _StdU_ExecShlWaitEx' #ShellExecuteEx(), returns the handle of the new process
!define StdUtils.WaitForProcEx '!insertmacro _StdU_WaitForProcEx' #WaitForSingleObject(), e.g. to wait for a running process
!define StdUtils.GetParameter '!insertmacro _StdU_GetParameter' #Get the value of a specific command-line option
!define StdUtils.TestParameter '!insertmacro _StdU_TestParameter' #Test whether a specific command-line option has been set
!define StdUtils.ParameterCnt '!insertmacro _StdU_ParameterCnt' #Get number of command-line tokens, similar to argc in main()
!define StdUtils.ParameterStr '!insertmacro _StdU_ParameterStr' #Get the n-th command-line token, similar to argv[i] in main()
!define StdUtils.GetAllParameters '!insertmacro _StdU_GetAllParams' #Get complete command-line, but without executable name
!define StdUtils.GetRealOSVersion '!insertmacro _StdU_GetRealOSVer' #Get the *real* Windows version number, even on Windows 8.1+
!define StdUtils.GetRealOSBuildNo '!insertmacro _StdU_GetRealOSBld' #Get the *real* Windows build number, even on Windows 8.1+
!define StdUtils.GetRealOSName '!insertmacro _StdU_GetRealOSStr' #Get the *real* Windows version, as a "friendly" name
!define StdUtils.GetOSEdition '!insertmacro _StdU_GetOSEdition' #Get the Windows edition, i.e. "workstation" or "server"
!define StdUtils.GetOSReleaseId '!insertmacro _StdU_GetOSRelIdNo' #Get the Windows release identifier (on Windows 10)
!define StdUtils.GetOSReleaseName '!insertmacro _StdU_GetOSRelIdStr' #Get the Windows release (on Windows 10), as a "friendly" name
!define StdUtils.VerifyOSVersion '!insertmacro _StdU_VrfyRealOSVer' #Compare *real* operating system to an expected version number
!define StdUtils.VerifyOSBuildNo '!insertmacro _StdU_VrfyRealOSBld' #Compare *real* operating system to an expected build number
!define StdUtils.HashText '!insertmacro _StdU_HashText' #Compute hash from text string (CRC32, MD5, SHA1/2/3, BLAKE2)
!define StdUtils.HashFile '!insertmacro _StdU_HashFile' #Compute hash from file (CRC32, MD5, SHA1/2/3, BLAKE2)
!define StdUtils.NormalizePath '!insertmacro _StdU_NormalizePath' #Simplifies the path to produce a direct, well-formed path
!define StdUtils.GetParentPath '!insertmacro _StdU_GetParentPath' #Get parent path by removing the last component from the path
!define StdUtils.SplitPath '!insertmacro _StdU_SplitPath' #Split the components of the given path
!define StdUtils.GetDrivePart '!insertmacro _StdU_GetDrivePart' #Get drive component of path
!define StdUtils.GetDirectoryPart '!insertmacro _StdU_GetDirPart' #Get directory component of path
!define StdUtils.GetFileNamePart '!insertmacro _StdU_GetFNamePart' #Get file name component of path
!define StdUtils.GetExtensionPart '!insertmacro _StdU_GetExtnPart' #Get file extension component of path
!define StdUtils.TimerCreate '!insertmacro _StdU_TimerCreate' #Create a new event-timer that will be triggered periodically
!define StdUtils.TimerDestroy '!insertmacro _StdU_TimerDestroy' #Destroy a running timer created with TimerCreate()
!define StdUtils.ProtectStr '!insertmacro _StdU_PrtctStr' #Protect a given String using Windows' DPAPI
!define StdUtils.UnprotectStr '!insertmacro _StdU_UnprtctStr' #Unprotect a string that was protected via ProtectStr()
!define StdUtils.GetLibVersion '!insertmacro _StdU_GetLibVersion' #Get the current StdUtils library version (for debugging)
!define StdUtils.SetVerbose '!insertmacro _StdU_SetVerbose' #Enable or disable "verbose" mode (for debugging)
#################################################################################
# MACRO DEFINITIONS
#################################################################################
!macro _StdU_Time out
StdUtils::Time /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetMinutes out
StdUtils::GetMinutes /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetHours out
StdUtils::GetHours /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetDays out
StdUtils::GetDays /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_Rand out
StdUtils::Rand /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_RandMax out max
push ${max}
StdUtils::RandMax /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_RandMinMax out min max
push ${min}
push ${max}
StdUtils::RandMinMax /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_RandList count max
push ${max}
push ${count}
StdUtils::RandList /NOUNLOAD
!macroend
!macro _StdU_RandBytes out count
push ${count}
StdUtils::RandBytes /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_FormatStr out format val
push `${format}`
push ${val}
StdUtils::FormatStr /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_FormatStr2 out format val1 val2
push `${format}`
push ${val1}
push ${val2}
StdUtils::FormatStr2 /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_FormatStr3 out format val1 val2 val3
push `${format}`
push ${val1}
push ${val2}
push ${val3}
StdUtils::FormatStr3 /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ScanStr out format input default
push `${format}`
push `${input}`
push ${default}
StdUtils::ScanStr /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ScanStr2 out1 out2 format input default1 default2
push `${format}`
push `${input}`
push ${default1}
push ${default2}
StdUtils::ScanStr2 /NOUNLOAD
pop ${out1}
pop ${out2}
!macroend
!macro _StdU_ScanStr3 out1 out2 out3 format input default1 default2 default3
push `${format}`
push `${input}`
push ${default1}
push ${default2}
push ${default3}
StdUtils::ScanStr3 /NOUNLOAD
pop ${out1}
pop ${out2}
pop ${out3}
!macroend
!macro _StdU_TrimStr var
push ${var}
StdUtils::TrimStr /NOUNLOAD
pop ${var}
!macroend
!macro _StdU_TrimStrLeft var
push ${var}
StdUtils::TrimStrLeft /NOUNLOAD
pop ${var}
!macroend
!macro _StdU_TrimStrRight var
push ${var}
StdUtils::TrimStrRight /NOUNLOAD
pop ${var}
!macroend
!macro _StdU_RevStr var
push ${var}
StdUtils::RevStr /NOUNLOAD
pop ${var}
!macroend
!macro _StdU_ValidFileName out test
push `${test}`
StdUtils::ValidFileName /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ValidPathSpec out test
push `${test}`
StdUtils::ValidPathSpec /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ValidDomain out test
push `${test}`
StdUtils::ValidDomainName /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_StrToUtf8 out str
push `${str}`
StdUtils::StrToUtf8 /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_StrFromUtf8 out trnc str
push ${trnc}
push `${str}`
StdUtils::StrFromUtf8 /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_SHFileMove out from to hwnd
push `${from}`
push `${to}`
push ${hwnd}
StdUtils::SHFileMove /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_SHFileCopy out from to hwnd
push `${from}`
push `${to}`
push ${hwnd}
StdUtils::SHFileCopy /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_AppendToFile out from dest offset maxlen
push `${from}`
push `${dest}`
push ${offset}
push ${maxlen}
StdUtils::AppendToFile /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ExecShlUser out file verb args
push `${file}`
push `${verb}`
push `${args}`
StdUtils::ExecShellAsUser /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_InvkeShlVrb out path file verb_id
push "${path}"
push "${file}"
push ${verb_id}
StdUtils::InvokeShellVerb /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ExecShlWaitEx out_res out_val file verb args
push `${file}`
push `${verb}`
push `${args}`
StdUtils::ExecShellWaitEx /NOUNLOAD
pop ${out_res}
pop ${out_val}
!macroend
!macro _StdU_WaitForProcEx out handle
push `${handle}`
StdUtils::WaitForProcEx /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetParameter out name default
push `${name}`
push `${default}`
StdUtils::GetParameter /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_TestParameter out name
push `${name}`
StdUtils::TestParameter /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ParameterCnt out
StdUtils::ParameterCnt /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_ParameterStr out index
push ${index}
StdUtils::ParameterStr /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetAllParams out truncate
push `${truncate}`
StdUtils::GetAllParameters /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetRealOSVer out_major out_minor out_spack
StdUtils::GetRealOsVersion /NOUNLOAD
pop ${out_major}
pop ${out_minor}
pop ${out_spack}
!macroend
!macro _StdU_GetRealOSBld out
StdUtils::GetRealOsBuildNo /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetRealOSStr out
StdUtils::GetRealOsName /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_VrfyRealOSVer out major minor spack
push `${major}`
push `${minor}`
push `${spack}`
StdUtils::VerifyRealOsVersion /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_VrfyRealOSBld out build
push `${build}`
StdUtils::VerifyRealOsBuildNo /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetOSEdition out
StdUtils::GetOsEdition /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetOSRelIdNo out
StdUtils::GetOsReleaseId /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetOSRelIdStr out
StdUtils::GetOsReleaseName /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_HashText out type text
push `${type}`
push `${text}`
StdUtils::HashText /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_HashFile out type file
push `${type}`
push `${file}`
StdUtils::HashFile /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_NormalizePath out path
push `${path}`
StdUtils::NormalizePath /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetParentPath out path
push `${path}`
StdUtils::GetParentPath /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_SplitPath out_drive out_dir out_fname out_ext path
push `${path}`
StdUtils::SplitPath /NOUNLOAD
pop ${out_drive}
pop ${out_dir}
pop ${out_fname}
pop ${out_ext}
!macroend
!macro _StdU_GetDrivePart out path
push `${path}`
StdUtils::GetDrivePart /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetDirPart out path
push `${path}`
StdUtils::GetDirectoryPart /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetFNamePart out path
push `${path}`
StdUtils::GetFileNamePart /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetExtnPart out path
push `${path}`
StdUtils::GetExtensionPart /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_TimerCreate out callback interval
GetFunctionAddress ${out} ${callback}
push ${out}
push ${interval}
StdUtils::TimerCreate /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_TimerDestroy out timer_id
push ${timer_id}
StdUtils::TimerDestroy /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_PrtctStr out dpsc salt text
push `${dpsc}`
push `${salt}`
push `${text}`
StdUtils::ProtectStr /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_UnprtctStr out trnc salt data
push `${trnc}`
push `${salt}`
push `${data}`
StdUtils::UnprotectStr /NOUNLOAD
pop ${out}
!macroend
!macro _StdU_GetLibVersion out_ver out_tst
StdUtils::GetLibVersion /NOUNLOAD
pop ${out_ver}
pop ${out_tst}
!macroend
!macro _StdU_SetVerbose enable
Push ${enable}
StdUtils::SetVerboseMode /NOUNLOAD
!macroend
#################################################################################
# MAGIC NUMBERS
#################################################################################
!define StdUtils.Const.ShellVerb.PinToTaskbar 0
!define StdUtils.Const.ShellVerb.UnpinFromTaskbar 1
!define StdUtils.Const.ShellVerb.PinToStart 2
!define StdUtils.Const.ShellVerb.UnpinFromStart 3
!endif # !___STDUTILS__NSH___
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
## Download flow (Downloader + NewsWrapper)
1. **Job ingestion**
- NZBs arrive via UI/API/URL; `urlgrabber.py` fetches remote NZBs, `nzbparser.py` turns them into `NzbObject`s, and `nzbqueue.NzbQueue` stores ordered jobs with priorities and categories.
2. **Queue to articles**
- When servers need work, `NzbQueue.get_articles` (called from `Server.get_article` in `downloader.py`) hands out batches of `Article`s per server, respecting retention, priority, and forced/paused items.
3. **Downloader setup**
- `Downloader` thread loads server configs (`config.get_servers`), instantiates `Server` objects (per host/port/SSL/threads), and spawns `NewsWrapper` instances per configured connection.
- A `selectors.DefaultSelector` watches all sockets; `BPSMeter` tracks throughput and speed limits; timers manage server penalties/restarts.
4. **Connection establishment (NewsWrapper.init_connect → NNTP.connect)**
- `Server.request_addrinfo` resolves fastest address; `NewsWrapper` builds an `NNTP` socket, wraps SSL if needed, sets non-blocking, and registers with the selector.
- First server greeting (200/201) is queued; `finish_connect` drives the login handshake (`AUTHINFO USER/PASS`) and handles temporary (480) or permanent (400/502) errors.
5. **Request scheduling & pipelining**
- `write()` chooses the next article command (`STAT/HEAD` for precheck, `BODY` or `ARTICLE` otherwise).
- Concurrency is limited by `server.pipelining_requests`; commands are queued and sent with `sock.sendall`, so there is no local send buffer.
- Sockets stay registered for `EVENT_WRITE`: without write readiness events, a temporarily full kernel send buffer could stall queued commands when there is nothing to read, so WRITE interest is needed to resume sending promptly.
6. **Receiving data**
- Selector events route to `process_nw_read`; `NewsWrapper.read` pulls bytes (SSL optimized via sabctools), parses NNTP responses, and calls `on_response`.
- Successful BODY/ARTICLE (220/222) updates per-server stats; missing/500 variants toggle capability flags (BODY/STAT support).
7. **Decoding and caching**
- `Downloader.decode` hands responses to `decoder.decode`, which yEnc/UU decodes, CRC-checks, and stores payloads in `ArticleCache` (memory or disk spill).
- Articles with DMCA/bad data trigger retry on other servers until `max_art_tries` is exceeded.
8. **Assembly to files**
- `Assembler` worker consumes decoded pieces, writes to the target file, updates CRC, and cleans admin markers. It guards disk space (`diskspace_check`) and schedules direct unpack or PAR2 handling when files finish.
9. **Queue bookkeeping**
- `NzbQueue.register_article` records success/failure; completed files advance NZF/NZO state. If all files done, the job moves to post-processing (`PostProcessor.process`), which runs `newsunpack`, scripts, sorting, etc.
10. **Control & resilience**
- Pausing/resuming (`Downloader.pause/resume`), bandwidth limiting, and sleep tuning happen in the main loop.
- Errors/timeouts lead to `reset_nw` (close socket, return article, maybe penalize server). Optional servers can be temporarily disabled; required ones schedule resumes.
- Forced disconnect/shutdown drains sockets, refreshes DNS, and exits cleanly.
+32
View File
@@ -0,0 +1,32 @@
## Repo layout
- Entry points & metadata
- `SABnzbd.py`: starts the app.
- `README.md` / `README.mkd`: release notes and overview.
- `requirements.txt`: runtime deps.
- Core application package `sabnzbd/`
- Download engine: `downloader.py` (main loop), `newswrapper.py` (NNTP connections), `urlgrabber.py`, `nzbqueue.py` (queue), `nzbparser.py` (parse NZB), `assembler.py` (writes decoded parts), `decoder.py` (yEnc/UU decode), `articlecache.py` (in-memory/on-disk cache).
- Post-processing: `newsunpack.py`, `postproc.py`, `directunpacker.py`, `sorting.py`, `deobfuscate_filenames.py`.
- Config/constants/utilities: `cfg.py`, `config.py`, `constants.py`, `misc.py`, `filesystem.py`, `encoding.py`, `lang.py`, `scheduler.py`, `notifier.py`, `emailer.py`, `rss.py`.
- UI plumbing: `interface.py`, `skintext.py`, `version.py`, platform helpers (`macosmenu.py`, `sabtray*.py`).
- Subpackages: `sabnzbd/nzb/` (NZB model objects), `sabnzbd/utils/` (helpers).
- Web interfaces & assets
- `interfaces/Glitter`, `interfaces/Config`, `interfaces/wizard`: HTML/JS/CSS skins.
- `icons/`: tray/web icons.
- `locale/`, `po/`, `tools/`: translation sources and helper scripts (`make_mo.py`, etc.).
- Testing & samples
- `tests/`: pytest suite plus `data/` fixtures and `test_utils/`.
- `scripts/`: sample post-processing hooks (`Sample-PostProc.*`).
- Packaging/build
- `builder/`: platform build scripts (DMG/EXE specs, `package.py`, `release.py`).
- Platform folders `win/`, `macos/`, `linux/`, `snap/`: installer or platform-specific assets.
- `admin/`, `builder/common.py`, `licenses/`: release and licensing support files.
- Documentation
- Documentation website source is stored in the `sabnzbd.github.io` repo.
- This repo is most likely located 1 level up from the root folder of this repo.
- Documentation is split per SABnzbd version, in the `wiki` folder.
+1 -1
View File
@@ -1,7 +1,7 @@
##
## Bad URL Fetch Email template for SABnzbd
## This a Cheetah template
## Documentation: http://sabnzbd.wikidot.com/email-templates
## Documentation: https://sabnzbd.org/wiki/extra/email-templates
##
## Newlines and whitespace are significant!
##
+1 -1
View File
@@ -1,7 +1,7 @@
##
## Default Email template for SABnzbd
## This a Cheetah template
## Documentation: http://sabnzbd.wikidot.com/email-templates
## Documentation: https://sabnzbd.org/wiki/extra/email-templates
##
## Newlines and whitespace are significant!
##
+1 -1
View File
@@ -1,7 +1,7 @@
##
## RSS Email template for SABnzbd
## This a Cheetah template
## Documentation: http://sabnzbd.wikidot.com/email-templates
## Documentation: https://sabnzbd.org/wiki/extra/email-templates
##
## Newlines and whitespace are significant!
##
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,23 +2,23 @@
<div class="clearfix"></div>
<!-- Filebrowser modal -->
<div class="modal fade" id="filebrowser_modal">
<div class="modal fade" id="filebrowser_modal" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="filebrowser-modal-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="filebrowser-modal-title"></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<!--#if not $nt#-->
<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#-->
<button type="button" class="btn btn-danger" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> $T('cancel')</button>
<button type="button" class="btn btn-default" id="filebrowser_modal_accept"><span class="glyphicon glyphicon-ok"></span> $T('rss-accept')</button>
</div>
@@ -33,4 +33,4 @@
</div>
</div>
</body>
</html>
</html>
+32 -57
View File
@@ -1,10 +1,5 @@
#if $pane == "Config"#
#set global $root = '../'#
#else#
#set global $root = '../../'#
#end if#
<!DOCTYPE HTML>
<html lang="$active_lang" #if $rtl#dir="rtl"#end if#>
<html lang="$active_lang" #if $rtl#dir="rtl"#end if# data-color-scheme="$color_scheme">
<head>
<title>
SABnzbd $T('menu-config')
@@ -14,7 +9,7 @@
#if $pane == "Switches" then $T('cmenu-switches') else ""#
#if $pane == "Servers" then $T('cmenu-servers') else ""#
#if $pane == "Scheduling" then $T('cmenu-scheduling') else ""#
#if $pane == "Email" then $T('cmenu-notif') else ""#
#if $pane == "Notify" then $T('cmenu-notif') else ""#
#if $pane == "Categories" then $T('cmenu-cat') else ""#
#if $pane == "Sorting" then $T('cmenu-sorting') else ""#
#if $pane == "Special" then $T('cmenu-special') else ""#
@@ -25,17 +20,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1" />
<meta name="apple-mobile-web-app-title" content="SABnzbd" />
<link rel="apple-touch-icon" sizes="76x76" href="${root}staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="${root}staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="${root}staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="${root}staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="${root}staticcfg/ico/android-192x192.png" />
<link rel="apple-touch-icon" sizes="76x76" href="$url('staticcfg/ico/apple-touch-icon-76x76-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="120x120" href="$url('staticcfg/ico/apple-touch-icon-120x120-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="152x152" href="$url('staticcfg/ico/apple-touch-icon-152x152-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="180x180" href="$url('staticcfg/ico/apple-touch-icon-180x180-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="192x192" href="$url('staticcfg/ico/android-192x192.png', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="${root}staticcfg/bootstrap/css/bootstrap.min.css?v=$version" />
<link rel="stylesheet" type="text/css" href="${root}staticcfg/css/chartist.min.css" />
<link rel="stylesheet" type="text/css" href="${root}staticcfg/css/style.css?v=$version" />
<link rel="stylesheet" type="text/css" href="$url('staticcfg/bootstrap/css/bootstrap.min.css', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="$url('staticcfg/css/chartist.min.css', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="$url('staticcfg/css/style.css', v=$cache_buster)" />
<link rel="shortcut icon" href="${root}staticcfg/ico/favicon.ico?v=$version" />
<link rel="shortcut icon" href="$url('staticcfg/ico/favicon.ico', v=$cache_buster)" />
<script type="text/javascript">
// Keeping track of the form state
@@ -43,10 +38,10 @@
var formWasSubmitted = false;
// Information we need
var sabSession = '$apikey';
var rootURL = '${root}'
var csrfToken = '$csrf_token';
var rootURL = '$url()'
var urlBase = '${url_base}'
var folderBrowseUrl = '${root}api?mode=browse&output=json&apikey=$apikey';
var folderBrowseUrl = "$url('api', mode='browse', output='json')";
var folderSeperator = '#if $os.sep == '\\' then '\\\\' else '/'#'
// Translations
@@ -62,32 +57,12 @@
configTranslate.confirmLeave = "$T('confirmWithoutSavingPrompt')";
configTranslate.searchPages = ['$T('cmenu-general')', '$T('cmenu-folders')', '$T('cmenu-switches')', '$T('cmenu-sorting')', '$T('cmenu-notif')', '$T('cmenu-special')']
</script>
<script type="text/javascript" src="${root}staticcfg/js/jquery-3.5.1.min.js?v=$version"></script>
<script type="text/javascript" src="${root}staticcfg/bootstrap/js/bootstrap.min.js?v=$version"></script>
<script type="text/javascript" src="${root}staticcfg/js/script.js?v=$version"></script>
<script type="text/javascript" src="$url('staticcfg/js/jquery-3.7.1.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/bootstrap/js/bootstrap.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/js/script.js', v=$cache_buster)"></script>
<script type="text/javascript">
// Set default functions for the autocomplete everywhere
\$.extend(\$.fn.typeahead.defaults, {
source: function (query, process) {
// If there's no seperator, it must be a relative path
if(query.split(folderSeperator).length < 2 && this.\$element.data('initialdir')) {
query = this.\$element.data('initialdir') + folderSeperator + query;
}
// Get info from the API
return \$.get(folderBrowseUrl + '&compact=1&term=' + query, function (data) {
return process(data);
});
},
updater: function(item) {
// Is it a relative path?
if(item.indexOf(this.\$element.data('initialdir')) === 0) {
// Remove start
return item.replace(this.\$element.data('initialdir')+folderSeperator, '');
}
// Full path
return item
}
})
// to top right away
if(window.location.hash) {
@@ -109,62 +84,62 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-logo navbar-logo-small" href="${root}" title="$T('Home')">
<a class="navbar-logo navbar-logo-small" href="$url()" title="$T('Home')" data-placement="bottom">
#include $webdir + "/staticcfg/images/logo-small.svg"#
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="${root}config/general/" #if $pane == "General" then 'class="active"' else ""#>
<a href="$url('config/general')" #if $pane == "General" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-cog"></span>
<strong>$T('cmenu-general')</strong>
</a>
</li>
<li>
<a href="${root}config/folders/" #if $pane == "Folders" then 'class="active"' else ""#>
<a href="$url('config/folders')" #if $pane == "Folders" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-folder-open"></span>
<strong>$T('cmenu-folders')</strong>
</a>
</li>
<li>
<a href="${root}config/server/" #if $pane == "Servers" then 'class="active"' else ""#>
<a href="$url('config/server')" #if $pane == "Servers" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-sort"></span>
<strong>$T('cmenu-servers')</strong>
</a>
</li>
<li>
<a href="${root}config/categories/" #if $pane == "Categories" then 'class="active"' else ""#>
<a href="$url('config/categories')" #if $pane == "Categories" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-tag"></span>
<strong>$T('cmenu-cat')</strong>
</a>
</li>
<li>
<a href="${root}config/switches/" #if $pane == "Switches" then 'class="active"' else ""#>
<a href="$url('config/switches')" #if $pane == "Switches" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-check"></span>
<strong>$T('cmenu-switches')</strong>
</a>
</li>
<li>
<a href="${root}config/sorting/" #if $pane == "Sorting" then 'class="active"' else ""#>
<a href="$url('config/sorting')" #if $pane == "Sorting" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-sort-by-alphabet"></span>
<strong>$T('cmenu-sorting')</strong>
</a>
</li>
<li>
<a href="${root}config/notify/" #if $pane == "Email" then 'class="active"' else ""#>
<a href="$url('config/notify')" #if $pane == "Notify" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-comment"></span>
<strong>$T('cmenu-notif')</strong>
</a>
</li>
<li>
<a href="${root}config/scheduling/" #if $pane == "Scheduling" then 'class="active"' else ""#>
<a href="$url('config/scheduling')" #if $pane == "Scheduling" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-time"></span>
<strong>$T('cmenu-scheduling')</strong>
</a>
</li>
<li>
<a href="${root}config/rss/" #if $pane == "RSS" then 'class="active"' else ""#>
<a href="$url('config/rss')" #if $pane == "RSS" then 'class="active"' else ""#>
<svg class="rss-icon-svg" viewBox="0 0 8 8">
<rect class="rss-button" width="8" height="8" />
<circle class="rss-symbol" cx="2" cy="6" r="1" />
@@ -175,26 +150,26 @@
</a>
</li>
<li>
<a href="${root}config/special/" #if $pane == "Special" then 'class="active"' else ""#>
<a href="$url('config/special')" #if $pane == "Special" then 'class="active"' else ""#>
<span class="glyphicon glyphicon-education"></span>
<strong>$T('cmenu-special')</strong>
</a>
</li>
<li>
<a href="$helpuri$help_uri" target="_blank">
<a href="$help_uri" target="_blank">
<span class="glyphicon glyphicon-question-sign"></span>
<strong>$T('menu-help')</strong>
</a>
</li>
<li class="dropdown" id="search-menu">
<a data-toggle="dropdown" href="#">
<a data-toggle="dropdown" href="#" aria-label="$T('cmenu-search')" aria-controls="search-dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-search"></span>
<strong><span class="glyphicon glyphicon-search"></span></strong>
</a>
<ul class="dropdown-menu" id="search-dropdown">
<li>
<form onsubmit="return false">
<input type="text" name="config-search" id="search-box" placeholder="$T('cmenu-search')" onkeyup="doConfigSearch(this)">
<input type="text" name="config-search" id="search-box" placeholder="$T('cmenu-search')" aria-label="$T('cmenu-search')" aria-controls="search-dropdown" onkeyup="doConfigSearch(this)">
</form>
</li>
</ul>
+13 -41
View File
@@ -1,5 +1,5 @@
<!--#set global $pane="Config"#-->
<!--#set global $help_uri="configuration/3.4/configure"#-->
<!--#set global $help_uri = $confighelpuri + "configure"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#from sabnzbd.encoding import CODEPAGE#-->
@@ -25,59 +25,31 @@
</tr>
<tr>
<th scope="row">$T('pythonVersion'): </th>
<td>$sys.version[:120] [$CODEPAGE]</td>
<td>$sys.version [$CODEPAGE]</td>
</tr>
<tr>
<th scope="row">OpenSSL:</th>
<td>
$ssl_version
</td>
<td>$ssl_version</td>
</tr>
<!--#if not $certificate_validation#-->
<!--#if not $windows and not $macos#-->
<tr>
<th scope="row"></th>
<th scope="row">Par2cmdline-turbo:</th>
<td>
<span class="label label-danger">$T('warning')</span> $T('explain-nosslcontext')
</td>
</tr>
<!--#end if#-->
<!--#if not $nt and not $darwin#-->
<tr>
<th scope="row">$T('opt-multicore-par2')</th>
<td>
<!--#if $have_mt_par2#-->
<!--#if $have_par2_turbo#-->
<span class="glyphicon glyphicon-ok"></span>
<!--#else#-->
<span class="label label-warning">$T('notAvailable')</span> $T('explain-getpar2mt')
<a href="${helpuri}installation/multicore-par2" target="_blank">${helpuri}installation/multicore-par2</a>
<span class="label label-warning">$T('notAvailable')</span> $T('explain-getpar2turbo')<br>
<a href="https://sabnzbd.org/wiki/installation/par2cmdline-turbo" target="_blank">https://sabnzbd.org/wiki/installation/par2cmdline-turbo</a>
<!--#end if#-->
</td>
</tr>
<!--#end if#-->
<!--#if not $have_sabyenc#-->
<tr>
<th scope="row">SABYenc:</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>
</td>
</tr>
<!--#end if#-->
<!--#if not $have_unzip and not $have_7zip #-->
<tr>
<th scope="row">$T('opt-enable_unzip'):</th>
<td>
<span class="label label-warning">$T('notAvailable')</span>
<a href="${helpuri}installation/install-off-modules#toc8" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
</td>
</tr>
<!--#end if#-->
<!--#if not $have_7zip #-->
<tr>
<th scope="row">$T('opt-enable_7zip'):</th>
<td>
<span class="label label-warning">$T('notAvailable')</span>
<a href="${helpuri}installation/install-off-modules#toc8" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<a href="https://sabnzbd.org/wiki/installation/install-off-modules#toc8" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
</td>
</tr>
<!--#end if#-->
@@ -106,8 +78,8 @@
<td><a href="https://github.com/sabnzbd/sabnzbd" target="_blank">https://github.com/sabnzbd/sabnzbd</a></td>
</tr>
<tr>
<th scope="row">$T('menu-irc') </th>
<td><a href="irc://irc.synirc.net/#sabnzbd"><i>#sabnzbd</i> on <i>irc.synirc.net</i></a> $T('or') (<a href="http://sabnzbd.org/live-chat/" target="_blank">webchat</a>)</td>
<th scope="row">$T('menu-live-chat') </th>
<td><a href="https://sabnzbd.org/live-chat/" target="_blank">https://sabnzbd.org/live-chat/</a> (IRC &amp; Discord)</td>
</tr>
<tr>
<th scope="row">$T('menu-issues') </th>
@@ -123,8 +95,8 @@
</div>
<div class="colmask">
<div class="padding alt">
<h5 class="copyright">Copyright &copy; 2007-2021 The SABnzbd Team &lt;<a href="mailto:team@sabnzbd.org">team@sabnzbd.org</a>&gt;</h5>
<div class="section padding">
<h5 class="copyright">Copyright &copy; 2007-2026 by The SABnzbd-Team (<a href="https://sabnzbd.org/" target="_blank">sabnzbd.org</a>)</h5>
<p class="copyright"><small>$T('yourRights')</small></p>
</div>
+17 -17
View File
@@ -1,15 +1,16 @@
<!--#set global $pane="Categories"#-->
<!--#set global $help_uri="configuration/3.4/categories"#-->
<!--#set global $help_uri = $confighelpuri + "categories"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
<div class="section">
<div class="padTable"> <a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<div class="padTable">
<a class="main-helplink" href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<p>$T('explain-catTags2')<br/>$T('explain-catTags')</p>
<hr>
<h5 class="darkred"><strong>$T('explain-relFolder'):</strong> <span class="path">$defdir</span></h5>
<!--#for $cur, $slot in enumerate($slotinfo)#-->
<!--#set $cansort = $slot.name != '*' and $slot.name != ''#-->
<form action="save" method="get" <!--#if $cansort#-->class="sorting-row"<!--#end if#-->>
<form action="$url('config/categories/save')" method="post" class="fullform <!--#if $cansort then 'sorting-row' else ''#-->">
<table class="catTable">
<!--#if $cur == 0#-->
<tr>
@@ -27,7 +28,6 @@
<span class="glyphicon glyphicon-option-vertical"></span>
</td>
<td>
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="order" value="$slot.order" />
<input type="hidden" value="$slot.name" name="name" />
<!--#if $slot.name != '*'#-->
@@ -102,33 +102,33 @@
</div>
</div>
</div>
<script type="text/javascript" src="${root}staticcfg/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="$url('staticcfg/js/jquery-ui.min.js', v=$cache_buster)"></script>
<script type="text/javascript">
\$(document).ready(function() {
\$('.delCat').click(function() {
var theForm = \$(this).closest("form");
theForm.attr("action", "delete").submit();
jQuery(document).ready(function() {
jQuery('.delCat').click(function() {
var theForm = jQuery(this).closest("form");
theForm.attr("action", "$url('config/categories/delete')").submit();
});
// Add autocomplete and file-browser
\$('.fileBrowserSmall').typeahead().fileBrowser();
jQuery('.fileBrowserSmall').typeahead({appendTo: 'body'}).fileBrowser();
// Make categories sortable
\$('.padTable').sortable({
jQuery('.padTable').sortable({
items: '.sorting-row',
containment: '.colmask',
axis: 'y',
update: function(event, ui) {
\$('.Categories form.sorting-row').each(function(index, elm) {
jQuery('.Categories form.sorting-row').each(function(index, elm) {
// Update order of all elements
if(index != elm.order.value) {
if(index !== elm.order.value) {
elm.order.value = index
// Submit changed order
var data = {}
\$(elm).extractFormDataTo(data);
\$.ajax({
type: "GET",
url: window.location.pathname + 'save',
jQuery(elm).extractFormDataTo(data);
jQuery.ajax({
type: "POST",
url: "$url('config/categories/save')",
data: data,
async: false // To prevent race-conditions when updating categories
})
+28 -11
View File
@@ -1,5 +1,5 @@
<!--#set global $pane="Folders"#-->
<!--#set global $help_uri="configuration/3.4/folders"#-->
<!--#set global $help_uri = $confighelpuri + "folders"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -8,13 +8,11 @@
<input type="checkbox" id="advanced-settings-button" name="advanced-settings-button"> $T('button-advanced')
</label>
</div>
<form action="saveDirectories" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<form action="$url('config/folders/save')" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="output" value="json" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<div class="section">
<div class="col2">
<h3>$T('userFolders') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('userFolders') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p>$T('explain-folderConfig')</p>
</div><!-- /col2 -->
<div class="col1">
@@ -35,7 +33,8 @@
<div class="field-pair">
<label class="config" for="complete_dir">$T('opt-complete_dir')</label>
<input type="text" name="complete_dir" id="complete_dir" value="$complete_dir" data-initialdir="$my_home" />
<span class="desc">$T('explain-complete_dir')</span>
<a class="btn btn-default" href="$url('config/sorting')"><span class="glyphicon glyphicon-sort-by-alphabet"></span> $T('cmenu-sorting')</a>
<span class="desc">$T('explain-complete_dir') <br/> $T('explain-complete_dir-sorting')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="complete_free">$T('opt-complete_free')</label>
@@ -47,7 +46,7 @@
<input type="checkbox" name="fulldisk_autoresume" id="fulldisk_autoresume" value="1" <!--#if int($fulldisk_autoresume) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-fulldisk_autoresume')</span>
</div>
<!--#if not $nt#-->
<!--#if not $windows#-->
<div class="field-pair advanced-settings">
<label class="config" for="permissions">$T('opt-permissions')</label>
<input type="text" name="permissions" id="permissions" value="$permissions" class="smaller_input" />
@@ -57,7 +56,7 @@
<div class="field-pair">
<label class="config" for="dirscan_dir">$T('opt-dirscan_dir')</label>
<input type="text" name="dirscan_dir" id="dirscan_dir" value="$dirscan_dir" data-initialdir="$my_home" />
<span class="desc">$T('explain-dirscan_dir')</span>
<span class="desc">$T('explain-dirscan_dir').replace(".nzb", $file_exts)</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="dirscan_speed">$T('opt-dirscan_speed')</label>
@@ -76,7 +75,7 @@
</div>
<div class="field-pair advanced-settings">
<label class="config" for="password_file">$T('opt-password_file')</label>
<input type="text" name="password_file" id="password_file" value="$password_file" />
<input type="text" name="password_file" id="password_file" value="$password_file" class="fileBrowserField" data-initialdir="$my_home" data-files="1" />
<span class="desc">$T('explain-password_file')</span>
</div>
<div class="field-pair">
@@ -90,7 +89,7 @@
</div><!-- /section -->
<div class="section advanced-settings">
<div class="col2">
<h3>$T('systemFolders') <a href="$helpuri$help_uri#toc1" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('systemFolders') <a href="$help_uri#toc1" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p>$T('explain-folderConfig')</p>
</div><!-- /col2 -->
<div class="col1">
@@ -104,9 +103,15 @@
<span class="desc">$T('explain-admin_dir1')</span>
<span class="desc">$T('explain-admin_dir2')</span>
</div>
<div class="field-pair">
<label class="config" for="backup_dir">$T('opt-backup_dir')</label>
<input type="text" name="backup_dir" id="backup_dir" value="$backup_dir" data-initialdir="$my_home" />
<span class="desc">$T('explain-backup_dir')</span>
</div>
<div class="field-pair">
<label class="config" for="log_dir">$T('opt-log_dir')</label>
<input type="text" name="log_dir" id="log_dir" value="$log_dir" data-initialdir="$my_lcldata" />
<a class="btn btn-default" id="purge_log_files" href="$url()"><span class="glyphicon glyphicon-trash"></span> $T('purge_log_files')</a>
<span class="desc">$T('explain-log_dir')</span>
</div>
<div class="field-pair">
@@ -126,7 +131,19 @@
<script type="text/javascript">
jQuery(document).ready(function() {
// Add autocomplete and file-browser
\$('.col1 input[name$="_dir"]').typeahead().fileBrowser();
jQuery('.col1 input[name$="_dir"], #password_file').typeahead().fileBrowser();
jQuery('#purge_log_files').click(function () {
if ( confirm("$T('confirm')") ) {
$.ajax({
type: "POST",
url: "$url('api')",
data: {mode: 'config', name: 'purge_log_files', output: 'json'}
})
} else {
return false;
}
})
})
</script>
<!--#include $webdir + "/_inc_footer_uc.tmpl"#-->
+292 -253
View File
@@ -1,5 +1,5 @@
<!--#set global $pane="General"#-->
<!--#set global $help_uri="configuration/3.4/general"#-->
<!--#set global $help_uri = $confighelpuri + "general"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -8,220 +8,246 @@
<input type="checkbox" id="advanced-settings-button" name="advanced-settings-button"> $T('button-advanced')
</label>
</div>
<form action="saveGeneral" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<input type="hidden" name="output" value="json" />
<div class="section">
<div class="col2">
<h3>$T('webServer') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p><b>$T('restartRequired')</b></p>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="host">$T('opt-host')</label>
<input type="text" name="host" id="host" value="$host" />
<span class="desc">$T('explain-host')</span>
</div>
<div class="field-pair">
<label class="config" for="port">$T('opt-port')</label>
<input type="number" name="port" id="port" value="$port" size="8" data-original="$port" />
<span class="desc">$T('explain-port')</span>
</div>
<div class="field-pair">
<label class="config" for="enable_https">$T('opt-enable_https')</label>
<input type="checkbox" name="enable_https" id="enable_https" value="1" <!--#if int($enable_https) > 0 then 'checked="checked" data-original="1"' else ""#-->/>
<span class="desc">$T('explain-enable_https')</span>
<span class="desc"><span class="label label-warning">$T('warning').upper()</span> $T('explain-enable_https_warning')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="web_dir">$T('opt-web_dir')</label>
<select name="web_dir" id="web_dir">
<!--#for $webline in $web_list#-->
<!--#if $webline.lower() == $web_dir.lower()#-->
<option value="$webline" selected="selected">$webline</option>
<!--#else#-->
<option value="$webline">$webline</option>
<!--#end if#-->
<!--#end for#-->
</select>
<span class="desc">$T('explain-web_dir')&nbsp;&nbsp;<a href="$caller_url">$caller_url</a></span>
</div>
<div class="field-pair">
<label class="config" for="language">$T('opt-language')</label>
<select name="language" id="language" class="select">
<!--#for $webline in $lang_list#-->
<!--#if $webline[0].lower() == $language.lower()#-->
<option value="$webline[0]" selected="selected">$webline[1]</option>
<!--#else#-->
<option value="$webline[0]">$webline[1]</option>
<!--#end if#-->
<!--#end for#-->
</select>
<span class="desc">$T('explain-language')</span>
<div class="alert alert-info alert-translate">
$T('explain-ask-language') <a href="https://sabnzbd.org/wiki/translate" target="_blank" class="alert-link">https://sabnzbd.org/wiki/translate</a>
<form action="$url('config/general/save')" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="output" value="json" />
<div class="section">
<div class="col2">
<h3>$T('webServer') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p><b>$T('restartRequired')</b></p>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="host">$T('opt-host')</label>
<input type="text" name="host" id="host" value="$host" />
<span class="desc">$T('explain-host')</span>
</div>
</div>
<div class="field-pair advanced-settings">
<h5 class="darkred nomargin">$T('base-folder'): <span class="path">$my_lcldata</span></h5>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_port">$T('opt-https_port')</label>
<input type="number" name="https_port" id="https_port" value="$https_port" size="8" data-original="$https_port" />
<span class="desc">$T('explain-https_port')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_cert">$T('opt-https_cert')</label>
<input type="text" name="https_cert" id="https_cert" value="$https_cert" />
<button class="btn btn-default generate_cert" title="$T('explain-new-cert')">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<span class="desc">$T('explain-https_cert')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_key">$T('opt-https_key')</label>
<input type="text" name="https_key" id="https_key" value="$https_key" />
<button class="btn btn-default generate_cert" title="$T('explain-new-cert')">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<span class="desc">$T('explain-https_key')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_chain">$T('opt-https_chain')</label>
<input type="text" name="https_chain" id="https_chain" value="$https_chain" />
<span class="desc">$T('explain-https_chain')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default sabnzbd_restart"><span class="glyphicon glyphicon-refresh"></span> $T('button-restart') SABnzbd</button>
</div>
</fieldset>
</div>
</div>
<div class="section">
<div class="col2">
<h3>$T('security') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p><b>$T('restartRequired')</b></p>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<!-- Tricks to avoid browser auto-fill, fixed on-submit with javascript -->
<div class="field-pair">
<label class="config" for="${pid}_wu">$T('opt-web_username')</label>
<input type="text" name="${pid}_wu" id="${pid}_wu" value="$username" data-hide="username" />
<span class="desc">$T('explain-web_username')</span>
</div>
<div class="field-pair">
<label class="config" for="${pid}_wp">$T('opt-web_password')</label>
<input type="text" name="${pid}_wp" id="${pid}_wp" value="$password" data-hide="password" />
<span class="desc">$T('explain-web_password')</span>
</div>
<div class="field-pair">
<label class="config" for="inet_exposure">$T('opt-inet_exposure')</label>
<select name="inet_exposure" id="inet_exposure" class="select">
<optgroup label="API">
<option value="0" <!--#if $inet_exposure == 0 then 'selected="selected"' else ""#-->>$T('inet-local')</option>
<option value="1" <!--#if $inet_exposure == 1 then 'selected="selected"' else ""#-->>$T('inet-nzb')</option>
<option value="2" <!--#if $inet_exposure == 2 then 'selected="selected"' else ""#-->>$T('inet-api')</option>
<option value="3" <!--#if $inet_exposure == 3 then 'selected="selected"' else ""#-->>$T('inet-fullapi')</option>
</optgroup>
<optgroup label="$T('inet-fullapi') &amp; $T('opt-web_dir')">
<option value="4" <!--#if $inet_exposure == 4 then 'selected="selected"' else ""#-->>$T('inet-ui')</option>
<option value="5" <!--#if $inet_exposure == 5 then 'selected="selected"' else ""#-->>$T('inet-ui') - $T('inet-external_login')</option>
</optgroup>
<div class="field-pair">
<label class="config" for="port">$T('opt-port')</label>
<input type="number" name="port" id="port" value="$port" size="8" data-original="$port" min="0" max="65535" />
<span class="desc">$T('explain-port')</span>
</div>
<div class="field-pair">
<label class="config" for="enable_https">$T('opt-enable_https')</label>
<input type="checkbox" name="enable_https" id="enable_https" value="1" <!--#if int($enable_https) > 0 then 'checked="checked" data-original="1"' else ""#-->/>
<span class="desc">$T('explain-enable_https')</span>
<span class="desc"><span class="label label-warning">$T('warning').upper()</span> $T('explain-enable_https_warning')</span>
</div>
<div class="field-pair">
<label class="config" for="web_dir">$T('opt-web_dir')</label>
<select name="web_dir" id="web_dir">
<!--#for $webline in $web_list#-->
<!--#if $webline.lower() == $web_dir.lower()#-->
<option value="$webline" selected="selected">$webline</option>
<!--#else#-->
<option value="$webline">$webline</option>
<!--#end if#-->
<!--#end for#-->
</select>
<span class="desc">$T('explain-inet_exposure')</span>
</div>
<div class="field-pair">
<label class="config" for="apikey_display">$T('opt-apikey')</label>
<input type="text" id="apikey_display" class="fileBrowserField" value="$apikey" readonly />
<button class="btn btn-default show_qrcode" title="$T('explain-qr-code')" rel="$apikey" ><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="btn btn-default generate_key" id="generate_new_apikey" title="$T('button-apikey')"><span class="glyphicon glyphicon-repeat"></span></button>
<span class="desc">$T('explain-apikey')</span>
</div>
<div class="field-pair">
<label class="config" for="nzbkey">$T('opt-nzbkey')</label>
<input type="text" id="nzbkey" class="fileBrowserField" value="$nzb_key" readonly />
<button class="btn btn-default show_qrcode" title="$T('explain-qr-code')" rel="$nzb_key" ><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="btn btn-default generate_key" id="generate_new_nzbkey" title="$T('button-apikey')"><span class="glyphicon glyphicon-repeat"></span></button>
<span class="desc">$T('explain-nzbkey')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('cmenu-switches') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="auto_browser">$T('opt-auto_browser')</label>
<input type="checkbox" name="auto_browser" id="auto_browser" value="1" <!--#if int($auto_browser) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-auto_browser')</span>
</div>
<div class="field-pair">
<label class="config" for="check_new_rel">$T('opt-check_new_rel')</label>
<select name="check_new_rel" id="check_new_rel">
<option value="0" <!--#if $check_new_rel == 0 then 'selected="selected"' else ""#--> >$T('off')</option>
<option value="1" <!--#if $check_new_rel == 1 then 'selected="selected"' else ""#--> >$T('on')</option>
<option value="2" <!--#if $check_new_rel == 2 then 'selected="selected"' else ""#--> >$T('also-test')</option>
</select>
<span class="desc">$T('explain-check_new_rel')</span>
</div>
<div class="field-pair advanced-settings <!--#if int($certificate_validation) == 0 then "disabled" else ""#-->">
<label class="config" for="enable_https_verification">$T('opt-enable_https_verification')</label>
<input type="checkbox" name="enable_https_verification" id="enable_https_verification" value="1" <!--#if int($enable_https_verification) > 0 then 'checked="checked"' else ""#--> <!--#if int($certificate_validation) == 0 then "disabled=\"disabled\"" else ""#--> />
<span class="desc">$T('explain-enable_https_verification')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('tuning') <a href="$helpuri$help_uri#toc2" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair value-and-select">
<label class="config" for="bandwidth_max_value">$T('opt-bandwidth_max')</label>
<input type="number" name="bandwidth_max_value" id="bandwidth_max_value" class="smaller_input" />
<select name="bandwidth_max_dropdown" id="bandwidth_max_dropdown">
<option value="">B/s</option>
<option value="K">KB/s</option>
<option value="M" selected>MB/s</option>
</select>
<input type="hidden" name="bandwidth_max" id="bandwidth_max" value="$bandwidth_max" />
</div>
<div class="field-pair advanced-settings">
<label class="config" for="bandwidth_perc">$T('opt-bandwidth_perc')</label>
<input type="number" name="bandwidth_perc" id="bandwidth_perc" value="$bandwidth_perc" step="10" min="0" max="100"/>
<span class="desc">$T('explain-bandwidth_perc')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="cache_limit">$T('opt-cache_limitstr')</label>
<input type="text" name="cache_limit" id="cache_limit" value="$cache_limit" class="smaller_input" />
<span class="desc">$T('explain-cache_limitstr').replace("64M", "256M").replace("128M", "512M")</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
</div>
<div class="field-pair">
<label class="config" for="language">$T('opt-language')</label>
<select name="language" id="language" class="select">
<!--#for $webline in $lang_list#-->
<!--#if $webline[0].lower() == $language.lower()#-->
<option value="$webline[0]" selected="selected">$webline[1]</option>
<!--#else#-->
<option value="$webline[0]">$webline[1]</option>
<!--#end if#-->
<!--#end for#-->
</select>
<span class="desc">$T('explain-language')</span>
<div class="alert alert-info alert-translate">
$T('explain-ask-language') <a href="https://sabnzbd.org/wiki/translate" target="_blank" class="alert-link">https://sabnzbd.org/wiki/translate</a>
</div>
</div>
<div class="field-pair advanced-settings">
<h5 class="darkred nomargin">$T('base-folder'): <span class="path">$my_lcldata</span></h5>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_port">$T('opt-https_port')</label>
<input type="number" name="https_port" id="https_port" value="$https_port" size="8" data-original="$https_port" min="0" max="65535" />
<span class="desc">$T('explain-https_port')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_cert">$T('opt-https_cert')</label>
<input type="text" name="https_cert" id="https_cert" value="$https_cert" class="fileBrowserField" data-initialdir="$my_lcldata" data-files="1" />
<button class="btn btn-default generate_cert" title="$T('explain-new-cert')">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<span class="desc">$T('explain-https_cert')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_key">$T('opt-https_key')</label>
<input type="text" name="https_key" id="https_key" value="$https_key" class="fileBrowserField" data-initialdir="$my_lcldata" data-files="1" />
<button class="btn btn-default generate_cert" title="$T('explain-new-cert')">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<span class="desc">$T('explain-https_key')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="https_chain">$T('opt-https_chain')</label>
<input type="text" name="https_chain" id="https_chain" value="$https_chain" class="fileBrowserField" data-initialdir="$my_lcldata" data-files="1" />
<span class="desc">$T('explain-https_chain')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default sabnzbd_restart"><span class="glyphicon glyphicon-refresh"></span> $T('button-restart') SABnzbd</button>
</div>
</fieldset>
</div>
</div>
<div class="section">
<div class="col2">
<h3>$T('security') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<p><b>$T('restartRequired')</b></p>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<!-- Tricks to avoid browser auto-fill, fixed on-submit with javascript -->
<div class="field-pair">
<label class="config" for="${pid}_wu">$T('opt-web_username')</label>
<input type="text" name="${pid}_wu" id="${pid}_wu" value="$username" data-hide="username" />
<span class="desc">$T('explain-web_username')</span>
</div>
<div class="field-pair">
<label class="config" for="${pid}_wp">$T('opt-web_password')</label>
<input type="text" name="${pid}_wp" id="${pid}_wp" value="$password" data-hide="password" />
<span class="desc">$T('explain-web_password')</span>
</div>
<div class="field-pair">
<label class="config" for="inet_exposure">$T('opt-inet_exposure')</label>
<select name="inet_exposure" id="inet_exposure" class="select">
<optgroup label="API">
<option value="0" <!--#if $inet_exposure == 0 then 'selected="selected"' else ""#-->>$T('inet-local')</option>
<option value="1" <!--#if $inet_exposure == 1 then 'selected="selected"' else ""#-->>$T('inet-nzb')</option>
<option value="2" <!--#if $inet_exposure == 2 then 'selected="selected"' else ""#-->>$T('inet-api')</option>
<option value="3" <!--#if $inet_exposure == 3 then 'selected="selected"' else ""#-->>$T('inet-fullapi')</option>
</optgroup>
<optgroup label="$T('inet-fullapi') &amp; $T('opt-web_dir')">
<option value="4" <!--#if $inet_exposure == 4 then 'selected="selected"' else ""#-->>$T('inet-ui')</option>
<option value="5" <!--#if $inet_exposure == 5 then 'selected="selected"' else ""#-->>$T('inet-ui') - $T('inet-external_login')</option>
</optgroup>
</select>
<span class="desc">$T('explain-inet_exposure')</span>
</div>
<div class="field-pair">
<label class="config" for="apikey_display">$T('opt-apikey')</label>
<input type="text" id="apikey_display" value="$apikey" readonly />
<button class="btn btn-default show_qrcode" title="$T('explain-qr-code')" rel="$apikey" ><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="btn btn-default generate_key" id="generate_new_apikey" title="$T('button-apikey')"><span class="glyphicon glyphicon-repeat"></span></button>
<span class="desc">$T('explain-apikey')</span>
</div>
<div class="field-pair">
<label class="config" for="nzbkey">$T('opt-nzbkey')</label>
<input type="text" id="nzbkey" value="$nzb_key" readonly />
<button class="btn btn-default show_qrcode" title="$T('explain-qr-code')" rel="$nzb_key" ><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="btn btn-default generate_key" id="generate_new_nzbkey" title="$T('button-apikey')"><span class="glyphicon glyphicon-repeat"></span></button>
<span class="desc">$T('explain-nzbkey')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('cmenu-switches') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="auto_browser">$T('opt-auto_browser')</label>
<input type="checkbox" name="auto_browser" id="auto_browser" value="1" <!--#if int($auto_browser) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-auto_browser')</span>
</div>
<div class="field-pair">
<label class="config" for="check_new_rel">$T('opt-check_new_rel')</label>
<select name="check_new_rel" id="check_new_rel">
<option value="0" <!--#if $check_new_rel == 0 then 'selected="selected"' else ""#--> >$T('off')</option>
<option value="1" <!--#if $check_new_rel == 1 then 'selected="selected"' else ""#--> >$T('on')</option>
<option value="2" <!--#if $check_new_rel == 2 then 'selected="selected"' else ""#--> >$T('also-test')</option>
</select>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="enable_https_verification">$T('opt-enable_https_verification')</label>
<input type="checkbox" name="enable_https_verification" id="enable_https_verification" value="1" <!--#if int($enable_https_verification) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-enable_https_verification')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="socks5_proxy_url">$T('opt-socks5_proxy_url')</label>
<input type="text" name="socks5_proxy_url" id="socks5_proxy_url" value="$socks5_proxy_url" autocomplete="off" placeholder="socks5://user:pass@hostname:port" />
<span class="desc">$T('explain-socks5_proxy_url') <br/>$T('readwiki')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('tuning') <a href="$help_uri#toc2" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair value-and-select">
<label class="config" for="bandwidth_max_value">$T('opt-bandwidth_max')</label>
<input type="number" name="bandwidth_max_value" id="bandwidth_max_value" class="smaller_input" />
<select name="bandwidth_max_dropdown" id="bandwidth_max_dropdown">
<option value="">B/s</option>
<option value="K">KB/s</option>
<option value="M" selected>MB/s</option>
</select>
<input type="hidden" name="bandwidth_max" id="bandwidth_max" value="$bandwidth_max" />
</div>
<div class="field-pair advanced-settings">
<label class="config" for="bandwidth_perc">$T('opt-bandwidth_perc')</label>
<input type="number" name="bandwidth_perc" id="bandwidth_perc" value="$bandwidth_perc" step="10" min="0" max="100"/>
<span class="desc">$T('explain-bandwidth_perc')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="cache_limit">$T('opt-cache_limitstr')</label>
<input type="text" name="cache_limit" id="cache_limit" value="$cache_limit" class="smaller_input" />
<span class="desc">$T('explain-cache_limitstr').replace("64M", "256M").replace("128M", "512M")</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
</form>
<form action="$url('config/general/upload_config')" method="post" class="fullform" autocomplete="off" enctype="multipart/form-data">
<input type="hidden" name="output" value="json" />
<div class="section">
<div class="col2">
<h3>$T('backup') <a href="$help_uri#toc3" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="create_backup">$T('create-backup')</label>
<span class="desc"><button class="btn btn-default createBackup" type="button" id="create_backup"><span class="glyphicon glyphicon glyphicon-import"></span> $T('create-backup')</button></span>
<span class="desc">$T('explain-create_backup')</span>
</div>
<div class="field-pair">
<label class="config" for="config_backup_file">$T('restore-backup')</label>
<input type="file" accept=".zip" name="config_backup_file" id="config_backup_file" />
<span class="desc">$T('restartRequired')</span>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-open"></span> $T('restore-backup')</button>
</div>
</fieldset>
</div>
</div>
</form>
</div><!-- /colmask -->
<div class="modal fade" id="modal_qr">
<div class="modal fade" id="modal_qr" tabindex="-1" role="dialog" aria-modal="true" aria-label="$T('explain-qr-code')">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
@@ -232,41 +258,39 @@
</div>
<script type="text/javascript">
\$(document).ready(function(){
jQuery(document).ready(function(){
// Show the message about translating when it's non-English
function hideOrShowTranslate() {
if(\$('#language').val() == 'en') {
\$('.alert-translate').hide()
if(jQuery('#language').val() === 'en') {
jQuery('.alert-translate').hide()
} else {
\$('.alert-translate').show()
jQuery('.alert-translate').show()
}
}
\$('#language').on('change', function() {
jQuery('#language').on('change', function() {
// Show message
hideOrShowTranslate()
// Re-load page on submit
\$('.fullform').submit(function() {
jQuery('.fullform').submit(function() {
// Skip the fancy stuff, just submit
this.submit()
})
// No JSON reponse
\$('#ajax').val('')
})
hideOrShowTranslate()
// Highlight in case user is not safe
// So when exposed to internet and no password, no external limit or no username/password
var safeCheck = \$('#host, #inet_exposure, #${pid}_wu, #${pid}_wp')
var safeCheck = jQuery('#host, #inet_exposure, #${pid}_wu, #${pid}_wp')
function checkSafety() {
if(\$('#host').val() != 'localhost' && \$('#host').val() != '127.0.0.1') {
if(jQuery('#host').val() !== 'localhost' && jQuery('#host').val() !== '127.0.0.1') {
// No limitation on local-network
if(\$('#inet_exposure').val() > 3) {
if(jQuery('#inet_exposure').val() > 3) {
// And no username and password?
if(!\$('#${pid}_wu').val() || !\$('#${pid}_wp').val()) {
if(!jQuery('#${pid}_wu').val() || !jQuery('#${pid}_wp').val()) {
// Add warning icon if not there already
if(!\$('.host-warning').length) {
if(!jQuery('.host-warning').length) {
safeCheck.after('<span class="glyphicon glyphicon-alert host-warning"></span>')
\$('.host-warning').tooltip({'title': '$T('checkSafety')'})
jQuery('.host-warning').tooltip({'title': '$T('checkSafety')'})
safeCheck.addClass('host-warning-highlight')
}
return
@@ -274,57 +298,58 @@
}
}
// Remove warnings
\$('.host-warning').remove()
jQuery('.host-warning').remove()
safeCheck.removeClass('host-warning-highlight')
}
checkSafety()
safeCheck.on('change', checkSafety)
// Click functions
\$('#apikey, #nzbkey').click(function () { \$(this).select() });
jQuery('#apikey_display, #nzbkey').click(function () { jQuery(this).select() });
\$('#generate_new_apikey').click(function () {
jQuery('#generate_new_apikey').click(function () {
if (confirm("$T('confirm')")) {
$.ajax({
type: "POST",
url: "../../api",
data: {mode:'config', name:'set_apikey', apikey: \$('#apikey').val()},
url: "$url('api')",
data: { mode: 'config', name: 'set_apikey' },
success: function(msg){
\$('#apikey').val(msg);
document.location = document.location;
jQuery('#apikey_display').val(msg.apikey);
}
});
}
});
\$('#generate_new_nzbkey').click(function () {
jQuery('#generate_new_nzbkey').click(function () {
if (confirm("$T('confirm')")) {
$.ajax({
type: "POST",
url: "../../api",
data: { mode:'config', name:'set_nzbkey', apikey: \$('#apikey').val() },
success: function(msg){
\$('#nzbkey').val(msg);
document.location = document.location;
url: "$url('api')",
data: { mode: 'config', name: 'set_nzbkey' },
success: function(msg) {
jQuery('#nzbkey').val(msg.nzbkey);
}
});
}
});
\$('.show_qrcode').click(function (e) {
// Add autocomplete and file-browser
jQuery('.fileBrowserField').typeahead().fileBrowser();
jQuery('.show_qrcode').click(function (e) {
// Show in modal
\$('#modal_qr .modal-dialog').width(330)
\$('#modal_qr .modal-body').html('').qrcode({
jQuery('#modal_qr .modal-dialog').width(330)
jQuery('#modal_qr .modal-body').html('').qrcode({
"size": 280,
"color": "#3a3",
"text": \$(this).attr('rel')
"text": jQuery(this).attr('rel')
});
\$('#modal_qr').modal('show');
jQuery('#modal_qr').modal('show');
// No save on this button click
e.preventDefault();
});
\$('.generate_cert').click(function(e) {
jQuery('.generate_cert').click(function(e) {
if(!confirm('$T('explain-new-cert')')) {
return;
}
@@ -332,8 +357,8 @@
// Submit request and then restart
$.ajax({
type: "POST",
url: "../../api",
data: { mode: 'config', name: 'regenerate_certs', apikey: \$('#apikey').val() },
url: "$url('api')",
data: { mode: 'config', name: 'regenerate_certs' },
success: function(msg) {
do_restart()
}
@@ -343,30 +368,44 @@
})
// Only allow re-generate if default certs
if(\$('#https_cert').val() != 'server.cert') {
\$('.generate_cert').attr('disabled', 'disabled')
if(jQuery('#https_cert').val() !== '$def_https_cert_file') {
jQuery('.generate_cert').attr('disabled', 'disabled')
}
// Parse the text
var bandwidthLimit = \$('#bandwidth_max').val()
var bandwidthLimit = jQuery('#bandwidth_max').val()
if(bandwidthLimit) {
var bandwithLimitNumber = parseFloat(bandwidthLimit)
var bandwithLimitText = bandwidthLimit.replace(/[^a-zA-Z]+/g, '');
if(bandwithLimitNumber) {
\$('#bandwidth_max_value').val(bandwithLimitNumber)
\$('#bandwidth_max_dropdown').val(bandwithLimitText)
jQuery('#bandwidth_max_value').val(bandwithLimitNumber)
jQuery('#bandwidth_max_dropdown').val(bandwithLimitText)
}
}
// Update the value
\$('#bandwidth_max_value, #bandwidth_max_dropdown').on('change', function() {
if(\$('#bandwidth_max_value').val()) {
\$('#bandwidth_max').val(\$('#bandwidth_max_value').val() + \$('#bandwidth_max_dropdown').val())
jQuery('#bandwidth_max_value, #bandwidth_max_dropdown').on('change', function() {
if(jQuery('#bandwidth_max_value').val()) {
jQuery('#bandwidth_max').val(jQuery('#bandwidth_max_value').val() + jQuery('#bandwidth_max_dropdown').val())
} else {
\$('#bandwidth_max').val('')
jQuery('#bandwidth_max').val('')
}
})
jQuery('#create_backup').click(function () {
$.ajax({
type: "POST",
url: "$url('api')",
data: { mode: 'config', name: 'create_backup', output: 'json' },
success: function(data) {
if(data.value.result) {
alert("$T('backup'):\n" + data.value.message)
} else {
alert("$T('button-failed')")
}
}
});
});
});
</script>
+158 -108
View File
@@ -1,45 +1,48 @@
<!--#set global $pane="Email"#-->
<!--#set global $help_uri="configuration/3.4/notifications"#-->
<!--#set global $pane="Notify"#-->
<!--#set global $help_uri = $confighelpuri + "notifications"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import apprise#-->
<!--#def show_notify_checkboxes($section_label)#-->
<!--#for $type in $notify_types#-->
<div class="field-pair">
<label class="config wide" for="${section_label}_prio_$type">
<input type="checkbox" class="notify-checkboxes" name="${section_label}_prio_$type" id="${section_label}_prio_$type" value="1" <!--#if $getVar($section_label + '_prio_' + $type) then 'checked="checked"' else ""#--> />
<label class="config" for="${section_label}_prio_$type">
$T($notify_types[$type]).replace('/', ' / ')
</label>
<input type="checkbox" name="${section_label}_prio_$type" id="${section_label}_prio_$type" value="1" <!--#if int($getVar($section_label + '_prio_' + $type)) > 0 then 'checked="checked"' else ""#--> />
</div>
<!--#end for#-->
<!--#end def#-->
<!--#def show_cat_box($section_label)#-->
<div class="col2-cats" <!--#if int($getVar($section_label + '_enable')) > 0 then '' else 'style="display:none"'#-->>
<div class="col2-cats" <!--#if $getVar($section_label + '_enable') then '' else 'style="display:none"'#-->>
<hr>
<b>$T('affectedCat')</b><br/>
<select name="${section_label}_cats" multiple="multiple" class="multiple_cats">
<select name="${section_label}_cats" multiple="multiple" class="multiple_cats" size="$len($categories)">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $getVar($section_label + '_cats') then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</select>
<p>$T('defaultNotifiesAll')</p>
</div>
<!--#end def#-->
<div class="colmask">
<form action="saveNotify" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<form action="$url('config/notify/save')" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="output" value="json" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<div class="section" id="email">
<div class="col2">
<h3>$T('cmenu-email') <a href="$helpuri$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('cmenu-email') <a href="$help_uri#toc0" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<div class="col2-cats" <!--#if int($email_endjob) > 0 then '' else 'style="display:none"'#-->>
<b>$T('affectedCat')</b><br/>
<select name="email_cats" multiple="multiple" class="multiple_cats">
<select name="email_cats" multiple="multiple" class="multiple_cats" size="$len($categories)">
<!--#for $ct in $categories#-->
<option value="$ct" <!--#if $ct in $email_cats then 'selected="selected"' else ""#-->>$Tspec($ct)</option>
<!--#end for#-->
</select>
<p>$T('defaultNotifiesAll')</p>
</div>
</div>
<div class="col1">
@@ -47,19 +50,19 @@
<div class="field-pair">
<label class="config" for="email_endjob">$T('opt-email_endjob')</label>
<select name="email_endjob" id="email_endjob">
<option value="0" <!--#if int($email_endjob) == "0" then 'selected="selected"' else ""#--> >$T('email-never')</option>
<option value="1" <!--#if int($email_endjob) == "1" then 'selected="selected"' else ""#--> >$T('email-always')</option>
<option value="2" <!--#if int($email_endjob) == "2" then 'selected="selected"' else ""#--> >$T('email-errorOnly')</option>
<option value="0" <!--#if int($email_endjob) == 0 then 'selected="selected"' else ""#--> >$T('email-never')</option>
<option value="1" <!--#if int($email_endjob) == 1 then 'selected="selected"' else ""#--> >$T('email-always')</option>
<option value="2" <!--#if int($email_endjob) == 2 then 'selected="selected"' else ""#--> >$T('email-errorOnly')</option>
</select>
</div>
<div class="field-pair">
<label class="config" for="email_full">$T('opt-email_full')</label>
<input type="checkbox" name="email_full" id="email_full" value="1" <!--#if int($email_full) > 0 then 'checked="checked"' else ""#--> />
<input type="checkbox" name="email_full" id="email_full" value="1" <!--#if $email_full then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-email_full')</span>
</div>
<div class="field-pair">
<label class="config" for="email_rss">$T('opt-email_rss')</label>
<input type="checkbox" name="email_rss" id="email_rss" value="1" <!--#if int($email_rss) > 0 then 'checked="checked"' else ""#--> />
<input type="checkbox" name="email_rss" id="email_rss" value="1" <!--#if $email_rss then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-email_rss')</span>
</div>
<div class="field-pair">
@@ -89,10 +92,10 @@
</div>
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_email" rel="$T('askTestEmail')"><span class="glyphicon glyphicon-envelope"></span> $T('link-testEmail')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_email" rel="$T('askTestEmail')" aria-busy="false"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> $T('link-testEmail')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -103,46 +106,46 @@
<h3>$T('section-NC')</h3>
<table>
<tr>
<td><input type="checkbox" name="ncenter_enable" id="ncenter_enable" value="1" <!--#if int($ncenter_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="ncenter_enable" id="ncenter_enable" value="1" <!--#if $ncenter_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="ncenter_enable"> $T('opt-ncenter_enable')</label></td>
</tr>
</table>
</div>
<div class="col1" <!--#if int($ncenter_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $ncenter_enable then '' else 'style="display:none"'#-->>
<fieldset>
$show_notify_checkboxes('ncenter')
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_notif"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_notif" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
</div>
<!--#end if#-->
<!--#if $nt#-->
<!--#if $windows#-->
<div class="section">
<div class="col2">
<h3>$T('section-AC')</h3>
<table>
<tr>
<td><input type="checkbox" name="acenter_enable" id="acenter_enable" value="1" <!--#if int($acenter_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="acenter_enable" id="acenter_enable" value="1" <!--#if $acenter_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="acenter_enable"> $T('opt-acenter_enable')</label></td>
</tr>
</table>
$show_cat_box('acenter')
</div>
<div class="col1" <!--#if int($acenter_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $acenter_enable then '' else 'style="display:none"'#-->>
<fieldset>
$show_notify_checkboxes('acenter')
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_windows"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_windows" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -151,42 +154,88 @@
<!--#if $have_ntfosd#-->
<div class="section">
<div class="col2">
<h3>$T('section-OSD') <a href="$helpuri$help_uri#toc4" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('section-OSD') <a href="$help_uri#toc4" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<table>
<tr>
<td><input type="checkbox" name="ntfosd_enable" id="ntfosd_enable" value="1" <!--#if int($ntfosd_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="ntfosd_enable" id="ntfosd_enable" value="1" <!--#if $ntfosd_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="ntfosd_enable"> $T('opt-ntfosd_enable')</label></td>
</tr>
</table>
$show_cat_box('ntfosd')
</div>
<div class="col1" <!--#if int($ntfosd_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $ntfosd_enable then '' else 'style="display:none"'#-->>
<fieldset>
$show_notify_checkboxes('ntfosd')
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_osd"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_osd" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
</div>
<!--#end if#-->
<div class="section" id="nscript">
<div class="section" id="apprise">
<div class="col2">
<h3>$T('section-NScript')</h3>
<h3>Apprise <a href="$help_uri#apprise" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<table>
<tr>
<td><input type="checkbox" name="nscript_enable" id="nscript_enable" value="1" <!--#if int($nscript_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="apprise_enable" id="apprise_enable" value="1" <!--#if $apprise_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="apprise_enable"> $T('opt-apprise_enable')</label></td>
</tr>
</table>
<p>$T('explain-apprise_enable')</p>
<p><a href="https://appriseit.com/" target="_blank">Apprise documentation</a></p>
<p>$T('version'): ${apprise.__version__}</p>
$show_cat_box('apprise')
</div>
<div class="col1" <!--#if $apprise_enable then '' else 'style="display:none"'#-->>
<fieldset>
<div class="field-pair">
<label class="config" for="apprise_urls">$T('opt-apprise_urls')</label>
<input type="text" name="apprise_urls" id="apprise_urls" value="$apprise_urls" />
<span class="desc">$T('explain-apprise_urls')</span>
</div>
<div class="field-pair">
<span class="desc">$T('explain-apprise_extra_urls')</span>
</div>
<!--#set $section_label = 'apprise'#-->
<!--#for $type in $notify_types#-->
<div class="field-pair">
<label class="config" for="${section_label}_target_${type}">
$T($notify_types[$type]).replace('/', ' / ')
</label>
<input type="checkbox" class="notify-checkboxes" name="${section_label}_target_${type}_enable" id="${section_label}_target_${type}_enable" value="1" <!--#if $getVar($section_label + '_target_' + $type + '_enable') then 'checked="checked"' else ""#--> />
<input type="text" name="${section_label}_target_${type}" id="${section_label}_target_${type}" value="$getVar($section_label + '_target_' + $type)" placeholder="$T('opt-apprise_urls')" />
</div>
<!--#end for#-->
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_apprise" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="section" id="nscript">
<div class="col2">
<h3>$T('section-NScript') <a href="$help_uri#nscript" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<table>
<tr>
<td><input type="checkbox" name="nscript_enable" id="nscript_enable" value="1" <!--#if $nscript_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="nscript_enable"> $T('opt-nscript_enable')</label></td>
</tr>
</table>
<em>$T('explain-nscript_enable')</em><br><a href="$helpuri$help_uri#nscript" target="_blank">$T('readwiki')</a>
<em>$T('explain-nscript_enable')</em><br><a href="$help_uri#nscript" target="_blank">$T('readwiki')</a>
$show_cat_box('nscript')
</div>
<div class="col1" <!--#if int($nscript_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $nscript_enable then '' else 'style="display:none"'#-->>
<fieldset>
<div class="field-pair">
<label class="config" for="nscript_script">$T('opt-nscript_script')</label>
@@ -200,15 +249,15 @@
<div class="field-pair">
<label class="config" for="nscript_parameters">$T('opt-nscript_parameters')</label>
<input type="text" name="nscript_parameters" id="nscript_parameters" value="$nscript_parameters" />
<span class="desc">$T('Optional') - $T('explain-nscript_parameters')</span>
<span class="desc">$T('Optional') - $T('readwiki')</span>
</div>
$show_notify_checkboxes('nscript')
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_nscript"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_nscript" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -218,14 +267,14 @@
<h3>$T('section-Prowl')</h3>
<table>
<tr>
<td><input type="checkbox" name="prowl_enable" id="prowl_enable" value="1" <!--#if int($prowl_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="prowl_enable" id="prowl_enable" value="1" <!--#if $prowl_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="prowl_enable"> $T('opt-prowl_enable')</label></td>
</tr>
</table>
<em>$T('explain-prowl_enable')</em>
$show_cat_box('prowl')
</div>
<div class="col1" <!--#if int($prowl_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $prowl_enable then '' else 'style="display:none"'#-->>
<fieldset>
<div class="field-pair">
<label class="config" for="prowl_apikey">$T('opt-prowl_apikey')</label>
@@ -239,21 +288,21 @@
$T($notify_types[$type]).replace('/', ' / ')
</label>
<select name="${section_label}_prio_$type" id="${section_label}_prio_$type">
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == "-3" then 'selected="selected"' else ""#--> >$T('prowl-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == "-2" then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == "-1" then 'selected="selected"' else ""#--> >$T('prowl-moderate')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == "0" then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == "1" then 'selected="selected"' else ""#--> >$T('prowl-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == "2" then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == -3 then 'selected="selected"' else ""#--> >$T('prowl-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == -2 then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == -1 then 'selected="selected"' else ""#--> >$T('prowl-moderate')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == 0 then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == 1 then 'selected="selected"' else ""#--> >$T('prowl-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == 2 then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
</select>
</div>
<!--#end for#-->
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_prowl"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_prowl" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -264,14 +313,14 @@
<h3>$T('section-Pushover')</h3>
<table>
<tr>
<td><input type="checkbox" name="pushover_enable" id="pushover_enable" value="1" <!--#if int($pushover_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="pushover_enable" id="pushover_enable" value="1" <!--#if $pushover_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="pushover_enable"> $T('opt-pushover_enable')</label></td>
</tr>
</table>
<em>$T('explain-pushover_enable')</em>
$show_cat_box('pushover')
</div>
<div class="col1" <!--#if int($pushover_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $pushover_enable then '' else 'style="display:none"'#-->>
<fieldset>
<div class="field-pair">
<label class="config" for="pushover_token">$T('opt-pushover_token')</label>
@@ -305,21 +354,21 @@
$T($notify_types[$type]).replace('/', ' / ')
</label>
<select name="${section_label}_prio_$type" id="${section_label}_prio_$type">
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == "-3" then 'selected="selected"' else ""#--> >$T('pushover-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == "-2" then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == "-1" then 'selected="selected"' else ""#--> >$T('pushover-low')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == "0" then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == "1" then 'selected="selected"' else ""#--> >$T('pushover-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == "2" then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
<option value="-3" <!--#if $getVar($section_label + '_prio_' + $type) == -3 then 'selected="selected"' else ""#--> >$T('pushover-off')</option>
<option value="-2" <!--#if $getVar($section_label + '_prio_' + $type) == -2 then 'selected="selected"' else ""#--> >$T('prowl-very-low')</option>
<option value="-1" <!--#if $getVar($section_label + '_prio_' + $type) == -1 then 'selected="selected"' else ""#--> >$T('pushover-low')</option>
<option value="0" <!--#if $getVar($section_label + '_prio_' + $type) == 0 then 'selected="selected"' else ""#--> >$T('prowl-normal')</option>
<option value="1" <!--#if $getVar($section_label + '_prio_' + $type) == 1 then 'selected="selected"' else ""#--> >$T('pushover-high')</option>
<option value="2" <!--#if $getVar($section_label + '_prio_' + $type) == 2 then 'selected="selected"' else ""#--> >$T('prowl-emergency')</option>
</select>
</div>
<!--#end for#-->
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_pushover"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default" type="button" id="test_pushover" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -329,14 +378,14 @@
<h3>$T('section-Pushbullet')</h3>
<table>
<tr>
<td><input type="checkbox" name="pushbullet_enable" id="pushbullet_enable" value="1" <!--#if int($pushbullet_enable) > 0 then 'checked="checked"' else ""#--> /></td>
<td><input type="checkbox" name="pushbullet_enable" id="pushbullet_enable" value="1" <!--#if $pushbullet_enable then 'checked="checked"' else ""#--> /></td>
<td><label for="pushbullet_enable"> $T('opt-pushbullet_enable')</label></td>
</tr>
</table>
<em>$T('explain-pushbullet_enable')</em>
$show_cat_box('pushbullet')
</div>
<div class="col1" <!--#if int($pushbullet_enable) > 0 then '' else 'style="display:none"'#-->>
<div class="col1" <!--#if $pushbullet_enable then '' else 'style="display:none"'#-->>
<fieldset>
<div class="field-pair">
<label class="config" for="pushbullet_apikey">$T('opt-pushbullet_apikey')</label>
@@ -352,11 +401,11 @@
<!--#end if#-->
$show_notify_checkboxes('pushbullet')
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_pushbullet"><span class="glyphicon glyphicon-comment"></span> $T('testNotify')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default" type="button" id="test_pushbullet" aria-busy="false"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> $T('testNotify')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
@@ -365,24 +414,23 @@
</div><!-- /colmask -->
<script type="text/javascript">
\$(document).ready(function(){
jQuery(document).ready(function(){
// Expand on enable
\$('.col2 input[name$="enable"]').change(function() {
jQuery('.col2 input[name$="enable"]').change(function() {
if(this.checked) {
\$(this).parents('.section').find('.col1').show()
\$(this).parents('.col2').find('.col2-cats').show()
jQuery(this).parents('.section').find('.col1').show()
jQuery(this).parents('.col2').find('.col2-cats').show()
} else {
\$(this).parents('.section').find('.col1').hide()
\$(this).parents('.col2').find('.col2-cats').hide()
jQuery(this).parents('.section').find('.col1').hide()
jQuery(this).parents('.col2').find('.col2-cats').hide()
}
\$('form').submit()
addRowColor()
jQuery('form').submit()
})
\$('#email_endjob').change(function() {
if(\$(this).val() > 0) {
\$(this).parents('.section').find('.col2-cats').show()
jQuery('#email_endjob').change(function() {
if(jQuery(this).val() > 0) {
jQuery(this).parents('.section').find('.col2-cats').show()
} else {
\$(this).parents('.section').find('.col2-cats').hide()
jQuery(this).parents('.section').find('.col2-cats').hide()
}
})
@@ -391,40 +439,42 @@
**/
function testNotification(buttonObj) {
// Confirm?
if(\$(buttonObj).attr('rel')) {
if(!confirm(\$(buttonObj).attr('rel'))) return false;
if(jQuery(buttonObj).attr('rel')) {
if(!confirm(jQuery(buttonObj).attr('rel'))) return false;
}
// Disable button and get the data
\$(buttonObj).attr("disabled", "disabled")
\$(buttonObj).find('span').toggleClass('glyphicon-comment glyphicon-refresh spin-glyphicon')
var data = { mode: buttonObj.id, apikey: '$apikey', output: 'json' };
\$(buttonObj).parents('.section').extractFormDataTo(data);
jQuery(buttonObj).attr("disabled", "disabled")
jQuery(buttonObj).attr("aria-busy", "true")
jQuery(buttonObj).find('span').toggleClass('glyphicon-comment glyphicon-refresh spin-glyphicon')
var data = { mode: buttonObj.id, output: 'json' };
jQuery(buttonObj).parents('.section').extractFormDataTo(data);
// Clear up the box
resultBox = \$(buttonObj).parents('.section').find('.result-box .alert');
resultBox = jQuery(buttonObj).parents('.section').find('.result-box .alert');
// Get the request
\$.ajax({
type: "GET",
url: "../../api",
jQuery.ajax({
type: "POST",
url: "$url('api')",
data: data
}).then(function(data) {
// Remove disabled and make the box
\$(buttonObj).removeAttr("disabled")
\$(buttonObj).find('span').toggleClass('glyphicon-comment glyphicon-refresh spin-glyphicon')
jQuery(buttonObj).removeAttr("disabled")
jQuery(buttonObj).attr("aria-busy", "false")
jQuery(buttonObj).find('span').toggleClass('glyphicon-comment glyphicon-refresh spin-glyphicon')
resultBox.removeClass('alert-success alert-danger').show()
if(data.status) {
resultBox.addClass('alert-success')
resultBox.text('$T('notifications-notesent')')
resultBox.prepend('<span class="glyphicon glyphicon-ok-sign"></span> ')
resultBox.prepend('<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> ')
} else {
resultBox.addClass('alert-danger')
resultBox.text(data.error)
resultBox.prepend('<span class="glyphicon glyphicon-exclamation-sign"></span> ')
resultBox.prepend('<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> ')
}
})
}
\$('#test_email, #test_notif, #test_windows, #test_pushbullet, #test_pushover, #test_prowl, #test_osd, #test_nscript').click(function () {
jQuery('#test_email, #test_notif, #test_windows, #test_apprise, #test_pushbullet, #test_pushover, #test_prowl, #test_osd, #test_nscript').click(function () {
testNotification(this)
})
});
+197 -204
View File
@@ -1,15 +1,14 @@
<!--#set global $pane="RSS"#-->
<!--#set global $help_uri="configuration/3.4/rss"#-->
<!--#set global $help_uri = $confighelpuri + "rss"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import html#-->
<div class="colmask">
<!--#if not $active_feed#-->
<div class="section">
<div class="padTable">
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<a class="main-helplink" href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<p>$T('explain-RSS')</p>
<form action="add_rss_feed" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form data-form="add-rss-feed" action="$url('config/rss/add_rss_feed')" method="post" autocomplete="off">
<table class="catTable addRssTable">
<tr>
<th>&nbsp;</th>
@@ -38,8 +37,7 @@
<!--#if $rss#-->
<div class="section">
<div class="padTable">
<form action="save_rss_feed" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form action="$url('config/rss/save_rss_feed')" method="post" autocomplete="off">
<table id="subscriptions">
<tbody>
<!--#set $feeds = sorted($rss.keys(), key=lambda x: x.lower())#-->
@@ -53,7 +51,7 @@
</td>
<td class="title">
<a href="?feed=$rss[$feed_item]['link']" class="subscription-title path feed <!--#if int($rss[$feed_item]['enable']) != 0 then 'feed_enabled' else 'feed_disabled'#-->">
$feed_item
$feed_item_html
</a>
</td>
<td class="controls">
@@ -75,8 +73,7 @@
</form>
<!--#if $feeds#-->
<br/>
<form action="rss_now" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form action="$url('config/rss/rss_now')" method="post" autocomplete="off">
<button type="submit" class="btn btn-default readAll"><span class="glyphicon glyphicon-sort"></span> $T('button-rssNow')</button>
</form>
<!--#end if#-->
@@ -84,8 +81,7 @@
</div>
<!--#end if#-->
<div class="section">
<form action="save_rss_rate" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form action="$url('config/rss/save_rss_rate')" method="post" autocomplete="off">
<div class="col1">
<fieldset>
<div class="field-pair">
@@ -102,23 +98,23 @@
</div>
<!--#end if#-->
<!--#if $active_feed#-->
<!--#set $feed = $active_feed#-->
<!--#set $feed = html.unescape($active_feed)#-->
<div class="section rss-section">
<div class="padTable">
<a class="main-helplink" href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<a class="main-helplink" href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a>
<h2 class="nomargin activeRSS">
<a href="${root}config/rss/">$T('cmenu-rss')</a> &raquo;
<a href="$url('config/rss')">$T('cmenu-rss')</a> &raquo;
$active_feed
</h2>
<!--#if $error#-->
<!--#if $errors#-->
<div class="alert alert-danger">
<span class="glyphicon glyphicon-exclamation-sign"></span>
<!--#echo html.escape($error)#-->
<!--#for $error in $errors#-->
<div><span class="glyphicon glyphicon-exclamation-sign"></span> $error</div>
<!--#end for#-->
</div>
<!--#end if#-->
<form action="upd_rss_feed" method="post">
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="feed" value="$feed" />
<form action="$url('config/rss/upd_rss_feed')" method="post">
<input type="hidden" name="feed" value="$active_feed" />
<input type="hidden" name="uri" value="$rss[$feed]['uris']" />
<table class="catTable">
<thead>
@@ -156,7 +152,8 @@
<option value=">"> $T('rss-atleast')</option>
<option value="<"> $T('rss-atmost')</option>
<option value="F"> $T('rss-from')</option>
<option value="F"> $T('rss-from-show') ($T('rss-accept'))</option>
<option value="S"> $T('rss-from-show') ($T('rss-accept'))</option>
<option value="G"> $T('rss-age')</option>
</select>
</td>
<td>
@@ -207,10 +204,9 @@
</table>
</form>
<!-- add new filter -->
<form action="upd_rss_filter" method="post">
<input type="hidden" name="apikey" value="$apikey" />
<form data-form="update-rss-filter" action="$url('config/rss/upd_rss_filter')" method="post">
<input type="hidden" name="index" value="$rss[$feed]['filtercount']" />
<input type="hidden" name="feed" value="$feed" />
<input type="hidden" name="feed" value="$active_feed" />
<table class="catTable">
<tbody>
<tr>
@@ -230,6 +226,7 @@
<option value="<"> $T('rss-atmost')</option>
<option value="F"> $T('rss-from')</option>
<option value="S"> $T('rss-from-show') ($T('rss-accept'))</option>
<option value="G"> $T('rss-age')</option>
</select>
</td>
<td>
@@ -283,10 +280,9 @@
<!--#set $fnum = 0#-->
<!--#for $filter in $rss[$feed].filters#-->
<!--#set $odd = not $odd#-->
<form action="upd_rss_filter" method="post" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form data-form="update-rss-filter" action="$url('config/rss/upd_rss_filter')" method="post" autocomplete="off">
<input type="hidden" name="index" value="$fnum" />
<input type="hidden" name="feed" value="$feed" />
<input type="hidden" name="feed" value="$active_feed" />
<table class="catTable">
<tbody>
<tr class="<!--#if $odd then " alt " else " "#--> <!--#if $filter[3]!="A" and $filter[3]!="S" then 'disabled_options_rule' else ""#-->">
@@ -302,10 +298,11 @@
<option value="M" <!--#if $filter[3]=="M" then 'selected="selected"' else ""#-->> $T('rss-must')</option>
<option value="R" <!--#if $filter[3]=="R" then 'selected="selected"' else ""#-->> $T('rss-reject')</option>
<option value="C" <!--#if $filter[3]=="C" then 'selected="selected"' else ""#-->> $T('rss-mustcat')</option>
<option value=">" <!--#if $filter[3]==">" then 'selected="selected"' else ""#-->> $T('rss-atleast')</option>
<option value="<" <!--#if $filter[3]=="<" then 'selected="selected"' else ""#-->> $T('rss-atmost')</option>
<option value=">" <!--#if $filter[3]=="&gt;" then 'selected="selected"' else ""#-->> $T('rss-atleast')</option>
<option value="<" <!--#if $filter[3]=="&lt;" then 'selected="selected"' else ""#-->> $T('rss-atmost')</option>
<option value="F" <!--#if $filter[3]=="F" then 'selected="selected"' else ""#-->> $T('rss-from')</option>
<option value="S" <!--#if $filter[3]=="S" then 'selected="selected"' else ""#-->> $T('rss-from-show') ($T('rss-accept'))</option>
<option value="G" <!--#if $filter[3]=="G" then 'selected="selected"' else ""#-->> $T('rss-age')</option>
</select>
</td>
<td>
@@ -361,138 +358,53 @@
</form>
<!--#set $fnum = $fnum+1#-->
<!--#end for#-->
<form action="download_rss_feed" method="post">
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="feed" value="$feed" />
<form action="$url('config/rss/download_rss_feed')" method="post">
<input type="hidden" name="feed" value="$active_feed" />
<div class="padding">
<button type="button" class="btn btn-default testFeed" rel="$feed"><span class="glyphicon glyphicon-sort"></span> $T('button-preFeed')</button>
<button type="button" class="btn btn-default testFeed" rel="$active_feed"><span class="glyphicon glyphicon-sort"></span> $T('button-preFeed')</button>
<button type="submit" class="btn btn-default Save"><span class="glyphicon glyphicon-forward"></span> $T('button-forceFeed')</button>
<button type="button" class="btn btn-default cleanFeed"><span class="glyphicon glyphicon-trash"></span> $T('button-clear') $T('rss-done')</button>
<!--#if $evalButton#-->
<button type="button" class="btn btn-default evalFeed" rel="$feed"><span class="glyphicon glyphicon-ok-circle"></span> $T('button-evalFeed')</button>
<!--#end if#-->
</div>
</form>
</div>
</div>
<br/>
<div style="padding-left: 10px; border-bottom: 1px solid #DFDEDE;">
<ul class="tabs">
<li class="active"><a href="#rss-tab-matched" data-toggle="tab">$T('rss-matched') <span class="count"><!--#echo len($matched)#--></span></a></li>
<li><a href="#rss-tab-not-matched">$T('rss-notMatched') <span class="count"><!--#echo len($unmatched)#--></span></a></li>
<li><a href="#rss-tab-done">$T('rss-done') <span class="count"><!--#echo len($downloaded)#--></span></a></li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane fade in active padTable" id="rss-tab-matched">
<!--#if $matched#-->
<table class="catTable">
<thead>
<tr>
<th class="no-sort">$T('link-download')</th>
<th>$T('rss-filter')</th>
<th>$T('size')</th>
<th width="60%">$T('sort-title')</th>
<th>$T('category')</th>
<th class="default-sort">$T('nzo-age')</th>
<th>$T('source')</th>
</tr>
</thead>
<!--#for $job in $matched#-->
<tr class="infoTableSeperator">
<td>
<form action="download" method="get">
<input type="hidden" value="$feed" name="feed" />
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="url" value="$job['url']" />
<input type="hidden" name="nzbname" value="$job['nzbname']" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span> $T('link-download')</button>
</form>
</td>
<td>$job['rule'] $job['skip']</td>
<td data-sort-value="$job['size']">$job['size_units']</td>
<td>$job['title']</td>
<td>$job['cat']</td>
<td data-sort-value="$job['age_ms']">$job['age']</td>
<td data-sort-value="$job['baselink']" title="$job['baselink']">
<!--#if not $job['infourl']#-->
<div class="favicon source-icon" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></div>
<!--#else#-->
<a class="favicon source-icon" href="$job['infourl']" target="_blank" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></a>
<!--#end if#-->
</td>
</tr>
<!--#end for#-->
</table>
<!--#else#-->
$T('none')
<!--#end if#-->
</div>
<div class="tab-pane padTable" id="rss-tab-not-matched">
<!--#if $unmatched#-->
<table class="catTable">
<thead>
<tr>
<th class="no-sort">$T('link-download')</th>
<th>$T('rss-filter')</th>
<th>$T('size')</th>
<th width="60%">$T('sort-title')</th>
<th>$T('category')</th>
<th class="default-sort">$T('nzo-age')</th>
<th>$T('source')</th>
</tr>
</thead>
<!--#for $job in $unmatched#-->
<tr class="infoTableSeperator">
<td>
<form action="download" method="get">
<input type="hidden" value="$feed" name="feed" />
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="url" value="$job['url']" />
<input type="hidden" name="nzbname" value="$job['nzbname']" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span> $T('link-download')</button>
</form>
</td>
<td>$job['rule'] $job['skip']</td>
<td data-sort-value="$job['size']">$job['size_units']</td>
<td>$job['title']</td>
<td>$job['cat']</td>
<td data-sort-value="$job['age_ms']">$job['age']</td>
<td data-sort-value="$job['baselink']" title="$job['baselink']">
<!--#if not $job['infourl']#-->
<div class="favicon source-icon" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></div>
<!--#else#-->
<a class="favicon source-icon" href="$job['infourl']" target="_blank" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></a>
<!--#end if#-->
</td>
</tr>
<!--#end for#-->
</table>
<!--#else#-->
$T('none')
<!--#end if#-->
</div>
<div class="tab-pane padTable" id="rss-tab-done">
<!--#if $downloaded#-->
<form action="clean_rss_jobs" method="post">
<input type="hidden" value="$feed" name="feed" />
<input type="hidden" name="apikey" value="$apikey" />
<ul class="nav nav-tabs">
<li class="active"><a href="#rss-tab-matched" data-toggle="tab">$T('rss-matched') <span class="count"><!--#echo len($matched)#--></span></a></li>
<li><a href="#rss-tab-not-matched">$T('rss-notMatched') <span class="count"><!--#echo len($unmatched)#--></span></a></li>
<li><a href="#rss-tab-done">$T('rss-done') <span class="count"><!--#echo len($downloaded)#--></span></a></li>
</ul>
<div class="section">
<div class="tab-content">
<div class="tab-pane fade in active padTable" id="rss-tab-matched">
<!--#if $matched#-->
<table class="catTable">
<thead>
<tr>
<th class="default-sort">$T('rss-added')</th>
<th class="no-sort">$T('link-download')</th>
<th>$T('rss-filter')</th>
<th>$T('size')</th>
<th width="60%">$T('sort-title')</th>
<th>$T('category')</th>
<th class="default-sort">$T('nzo-age')</th>
<th>$T('source')</th>
</tr>
</thead>
<!--#for $job in $downloaded#-->
<!--#for $job in $matched#-->
<tr class="infoTableSeperator">
<td data-sort-value="$job['time_downloaded_ms']">$job['time_downloaded']</td>
<td>
<form data-form="download-rss-job" action="$url('config/rss/download')" method="post">
<input type="hidden" value="$active_feed" name="feed" />
<input type="hidden" name="url" value="$job['url']" />
<input type="hidden" name="nzbname" value="$job['nzbname']" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span> $T('link-download')</button>
</form>
</td>
<td>$job['rule'] $job['skip']</td>
<td data-sort-value="$job['size']">$job['size_units']</td>
<td>$job['title']</td>
<td>$job['cat']</td>
<td data-sort-value="$job['age_ms']">$job['age']</td>
<td data-sort-value="$job['baselink']" title="$job['baselink']">
<!--#if not $job['infourl']#-->
<div class="favicon source-icon" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></div>
@@ -503,22 +415,104 @@
</tr>
<!--#end for#-->
</table>
</form>
<!--#else#-->
<!--#else#-->
$T('none')
<!--#end if#-->
</div>
<div class="tab-pane padTable" id="rss-tab-not-matched">
<!--#if $unmatched#-->
<table class="catTable">
<thead>
<tr>
<th class="no-sort">$T('link-download')</th>
<th>$T('rss-filter')</th>
<th>$T('size')</th>
<th width="60%">$T('sort-title')</th>
<th>$T('category')</th>
<th class="default-sort">$T('nzo-age')</th>
<th>$T('source')</th>
</tr>
</thead>
<!--#for $job in $unmatched#-->
<tr class="infoTableSeperator">
<td>
<form data-form="download-rss-job" action="$url('config/rss/download')" method="post">
<input type="hidden" value="$active_feed" name="feed" />
<input type="hidden" name="url" value="$job['url']" />
<input type="hidden" name="nzbname" value="$job['nzbname']" />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span> $T('link-download')</button>
</form>
</td>
<td>$job['rule'] $job['skip']</td>
<td data-sort-value="$job['size']">$job['size_units']</td>
<td>$job['title']</td>
<td>$job['cat']</td>
<td data-sort-value="$job['age_ms']">$job['age']</td>
<td data-sort-value="$job['baselink']" title="$job['baselink']">
<!--#if not $job['infourl']#-->
<div class="favicon source-icon" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></div>
<!--#else#-->
<a class="favicon source-icon" href="$job['infourl']" target="_blank" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></a>
<!--#end if#-->
</td>
</tr>
<!--#end for#-->
</table>
<!--#else#-->
$T('none')
<!--#end if#-->
</div>
<div class="tab-pane padTable" id="rss-tab-done">
<!--#if $downloaded#-->
<form action="$url('config/rss/clean_rss_jobs')" method="post">
<input type="hidden" value="$active_feed" name="feed" />
<table class="catTable">
<thead>
<tr>
<th class="default-sort">$T('rss-added')</th>
<th>$T('rss-filter')</th>
<th>$T('size')</th>
<th width="60%">$T('sort-title')</th>
<th>$T('category')</th>
<th>$T('nzo-age')</th>
<th>$T('source')</th>
</tr>
</thead>
<!--#for $job in $downloaded#-->
<tr class="infoTableSeperator">
<td data-sort-value="$job['time_downloaded_ms']">$job['time_downloaded']</td>
<td>$job['rule'] $job['skip']</td>
<td data-sort-value="$job['size']">$job['size_units']</td>
<td>$job['title']</td>
<td>$job['cat']</td>
<td data-sort-value="$job['age_ms']">$job['age']</td>
<td data-sort-value="$job['baselink']" title="$job['baselink']">
<!--#if not $job['infourl']#-->
<div class="favicon source-icon" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></div>
<!--#else#-->
<a class="favicon source-icon" href="$job['infourl']" target="_blank" style="background-image: url(//$job['baselink']/favicon.ico);" data-domain="$job['baselink']"></a>
<!--#end if#-->
</td>
</tr>
<!--#end for#-->
</table>
</form>
<!--#else#-->
$T('none')
<!--#end if#-->
</div>
<!--#end if#-->
</div>
<!--#end if#-->
</div>
</div>
<!-- /colmask -->
<form method="post" action="save_rss_feed" class="modal fade" id="rss_edit_modal">
<form method="post" action="$url('config/rss/save_rss_feed')" class="modal fade" id="rss_edit_modal" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="rss-edit-modal-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Edit') <span id="feed_edit_name_label"></span></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="rss-edit-modal-title">$T('Edit') <span id="feed_edit_name_label"></span></h4>
</div>
<div class="modal-body">
<div class="form-group">
@@ -531,7 +525,6 @@
<span class="help-block">$T('addMultipleFeeds')</span>
</div>
<input type="hidden" name="feed" id="feed_edit_old_name" />
<input type="hidden" name="apikey" value="$apikey" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> $T('cancel')</button>
@@ -541,52 +534,52 @@
</div><!-- /.modal-dialog -->
</form><!-- /.modal -->
<script type="text/javascript" src="${root}staticcfg/js/jquery.tablesort.min.js"></script>
<script type="text/javascript" src="$url('staticcfg/js/jquery.tablesort.min.js', v=$cache_buster)"></script>
<script type="text/javascript">
function urlencode(str) {
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
}
\$(document).ready(function(){
\$('.favicon').each(function(i, theContainer) {
jQuery(document).ready(function(){
jQuery('.favicon').each(function(i, theContainer) {
// Easy favicon grabber
var favUrl = '//' + \$(theContainer).data('domain') + '/favicon.ico'
var favUrl = '//' + jQuery(theContainer).data('domain') + '/favicon.ico'
// Does the image exist? Otherwise place a glyphicon
var testFavImg = new Image();
testFavImg.src = favUrl;
testFavImg.onerror = function (evt){
\$(theContainer).append('<span class="glyphicon glyphicon-list"></span>')
jQuery(theContainer).append('<span class="glyphicon glyphicon-list"></span>')
}
})
\$('.tabs a').click(function (e) {
jQuery('.nav-tabs a').click(function (e) {
e.preventDefault()
\$(this).tab('show')
jQuery(this).tab('show')
})
\$('.editFeed').click(function(){
var oldURI = \$(this).prev().val();
var whichFeed = \$(this).attr("rel");
jQuery('.editFeed').click(function(){
var oldURI = jQuery(this).prev().val();
var whichFeed = jQuery(this).attr("rel");
// Fill the values
\$('#feed_edit_name_label').text(whichFeed)
\$('#feed_edit_old_name').val(whichFeed)
\$('#feed_edit_new_name').val(whichFeed)
\$('#feed_edit_url').val(oldURI)
jQuery('#feed_edit_name_label').text(whichFeed)
jQuery('#feed_edit_old_name').val(whichFeed)
jQuery('#feed_edit_new_name').val(whichFeed)
jQuery('#feed_edit_url').val(oldURI)
// Show the modal
\$('#rss_edit_modal').modal('show');
jQuery('#rss_edit_modal').modal('show');
});
\$('.delFeed').click(function(e){
jQuery('.delFeed').click(function(e){
e.preventDefault();
if ( confirm("$T('confirm')") ) {
var whichFeed = \$(this).attr("rel");
\$.ajax({
var whichFeed = jQuery(this).attr("rel");
jQuery.ajax({
type: "POST",
url: "del_rss_feed",
data: {feed: whichFeed, apikey: "$apikey" }
url: "$url('config/rss/del_rss_feed')",
data: {feed: whichFeed }
}).done(function( msg ) {
// Let us leave!
formWasSubmitted = true;
@@ -596,12 +589,12 @@ function urlencode(str) {
}
});
\$('.toggleFeedCheckbox').click(function(){
var whichFeed = \$(this).attr("rel");
\$.ajax({
jQuery('.toggleFeedCheckbox').click(function(){
var whichFeed = jQuery(this).attr("rel");
jQuery.ajax({
type: "POST",
url: "toggle_rss_feed",
data: {feed: whichFeed, apikey: "$apikey" }
url: "$url('config/rss/toggle_rss_feed')",
data: {feed: whichFeed }
}).done(function() {
// Let us leave!
formWasSubmitted = true;
@@ -611,37 +604,37 @@ function urlencode(str) {
});
// Only the Accept filter needs all the options
\$('form[action="upd_rss_filter"]').find('select[name="filter_type"]').change(function() {
\$(this).parent().parent().find('select:not([name="filter_type"])').attr('disabled', \$(this).val() != "A" && \$(this).val() != "S")
jQuery('form[data-form="update-rss-filter"]').find('select[name="filter_type"]').change(function() {
jQuery(this).parent().parent().find('select:not([name="filter_type"])').attr('disabled', jQuery(this).val() !== "A" && jQuery(this).val() !== "S")
})
// Trigger on-load for all
\$('.disabled_options_rule').find('td select:not([name="filter_type"])').attr('disabled', true)
jQuery('.disabled_options_rule').find('td select:not([name="filter_type"])').attr('disabled', true)
function setActiveIcon(objButton) {
// Let's make it look like things are happening!
\$(objButton).attr('disabled', true)
\$(objButton).find('span').remove()
\$(objButton).prepend('<span class="glyphicon glyphicon-transfer"></span>')
jQuery(objButton).attr('disabled', true)
jQuery(objButton).find('span').remove()
jQuery(objButton).prepend('<span class="glyphicon glyphicon-transfer"></span>')
}
// Enable sorting and set default
if (\$('#rss-tab-matched table').length) {
\$('#rss-tab-matched table').tablesort().data('tablesort').sort(\$('#rss-tab-matched th.default-sort'), 'desc');
if (jQuery('#rss-tab-matched table').length) {
jQuery('#rss-tab-matched table').tablesort().data('tablesort').sort(jQuery('#rss-tab-matched th.default-sort'), 'desc');
}
if (\$('#rss-tab-not-matched table').length) {
\$('#rss-tab-not-matched table').tablesort().data('tablesort').sort(\$('#rss-tab-not-matched th.default-sort'), 'desc');
if (jQuery('#rss-tab-not-matched table').length) {
jQuery('#rss-tab-not-matched table').tablesort().data('tablesort').sort(jQuery('#rss-tab-not-matched th.default-sort'), 'desc');
}
if (\$('#rss-tab-done table').length) {
\$('#rss-tab-done table').tablesort().data('tablesort').sort(\$('#rss-tab-done th.default-sort'), 'desc');
if (jQuery('#rss-tab-done table').length) {
jQuery('#rss-tab-done table').tablesort().data('tablesort').sort(jQuery('#rss-tab-done th.default-sort'), 'desc');
}
\$('.testFeed').click(function(){
jQuery('.testFeed').click(function(){
setActiveIcon(this)
var whichFeed = \$(this).attr("rel");
\$.ajax({
var whichFeed = jQuery(this).attr("rel");
jQuery.ajax({
type: "POST",
url: "test_rss_feed",
data: {feed: whichFeed, apikey: "$apikey" }
url: "$url('config/rss/test_rss_feed')",
data: {feed: whichFeed }
}).done(function( msg ) {
// Let us leave!
formWasSubmitted = true;
@@ -650,34 +643,34 @@ function urlencode(str) {
});
});
\$('.cleanFeed').click(function(){
jQuery('.cleanFeed').click(function(){
setActiveIcon(this)
var theForm = \$(this).closest("form");
theForm.attr("action", "clean_rss_jobs").submit();
var theForm = jQuery(this).closest("form");
theForm.attr("action", "$url('config/rss/clean_rss_jobs')").submit();
});
\$('.evalFeed').click(function(){
jQuery('.evalFeed').click(function(){
setActiveIcon(this)
var theForm = \$(this).closest("form");
theForm.attr("action", "eval_rss_feed").submit();
var theForm = jQuery(this).closest("form");
theForm.attr("action", "$url('config/rss/eval_rss_feed')").submit();
});
\$('.delFilter').click(function(){
var theForm = \$(this).closest("form");
theForm.attr("action", "del_rss_filter").submit();
jQuery('.delFilter').click(function(){
var theForm = jQuery(this).closest("form");
theForm.attr("action", "$url('config/rss/del_rss_filter')").submit();
});
\$('form[action="download"]').ajaxForm({
jQuery('form[data-form="download-rss-job"]').ajaxForm({
datatype: 'json',
beforeSubmit: function (_, form) {
\$(form).find('button').attr("disabled", "disabled")
jQuery(form).find('button').attr("disabled", "disabled")
// Remove icon and add new one
\$(form).find('button span').remove()
\$(form).find('button').prepend('<span class="glyphicon glyphicon-transfer"></span>')
jQuery(form).find('button span').remove()
jQuery(form).find('button').prepend('<span class="glyphicon glyphicon-transfer"></span>')
},
success: function (_, _, _, form) {
// Set success
\$(form).find('button').html('<span class="glyphicon glyphicon-ok"></span> $T('rss-added')')
jQuery(form).find('button').html('<span class="glyphicon glyphicon-ok"></span> $T('rss-added')')
}
});
@@ -1,5 +1,5 @@
<!--#set global $pane="Scheduling"#-->
<!--#set global $help_uri="configuration/3.4s/scheduling"#-->
<!--#set global $help_uri = $confighelpuri + "scheduling"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<%
@@ -15,19 +15,18 @@ else:
<div class="colmask">
<div class="section">
<div class="col2">
<h3>$T('addSchedule') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('addSchedule') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<form action="addSchedule" method="post" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<form data-form="add-schedule" action="$url('config/scheduling/add_schedule')" method="post" autocomplete="off">
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="hour">$T('hour').capitalize() : $T('minute').capitalize()</label>
<select name="hour" id="hour">
<select name="hour" id="hour" aria-label="$T('hour').capitalize()">
<!--#for $i in range(24)#-->
<option value="$i" <!--#if hour == i then 'selected="selected"' else ""#--> > $str($i).zfill(2) </option>
<!--#end for#-->
</select>&nbsp;<b>:</b>&nbsp;<select name="minute" id="minute">
</select>&nbsp;<b>:</b>&nbsp;<select name="minute" id="minute" aria-label="$T('minute').capitalize()">
<!--#for $i in range(60)#-->
<option value="$i"> $str($i).zfill(2) </option>
<!--#end for#-->
@@ -90,13 +89,12 @@ else:
<!--#set $odd = True#-->
<!--#for $schednum, $line in enumerate($schedlines)#-->
<!--#set $odd = not $odd#-->
<form action="delSchedule" method="post">
<input type="hidden" name="apikey" value="$apikey"/>
<input type="hidden" name="line" id="line" value="$line"/>
<form data-form="del-schedule" action="$url('config/scheduling/del_schedule')" method="post">
<input type="hidden" name="line" value="$line"/>
<div class="field-pair infoTableSeperator <!--#if $odd then "" else " alt"#-->">
<input type="checkbox" name="schedenabled" value="$line" <!--#if int($taskinfo[$schednum][5]) > 0 then 'checked="checked"' else ""#-->>
<button class="btn btn-default float-left"><span class="glyphicon glyphicon-trash"></span></button>
<div class="scheduleEntry">
<input type="checkbox" name="schedenabled" value="$line" aria-label="$T('enabled')" aria-describedby="schedule-description-$schednum" <!--#if int($taskinfo[$schednum][5]) > 0 then 'checked="checked"' else ""#-->>
<button class="btn btn-default float-left" type="submit" aria-label="$T('nzo-delete')" aria-describedby="schedule-description-$schednum"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
<div class="scheduleEntry" id="schedule-description-$schednum">
<span class="time">$taskinfo[$schednum][1]:$taskinfo[$schednum][2]</span><span class="frequency">$taskinfo[$schednum][3]</span> <span class="darkred">$taskinfo[$schednum][4]</span>
</div>
</div>
@@ -112,32 +110,32 @@ else:
</div><!-- /section -->
</div><!-- /colmask -->
<script type="text/javascript">
\$('#action').on('change', function() {
jQuery('#action').on('change', function() {
// Set the action
\$('#arguments').val((\$(this).find('option:selected').data('action')))
jQuery('#arguments').val((jQuery(this).find('option:selected').data('action')))
// Is it speedlimit?
if(\$(this).find('option:selected').val() == 'speedlimit') {
\$('#hidden_arguments').show()
\$('#hidden_arguments input').attr('placeholder', 'Bytes/s, "1M" = 1 MB/s, "500K" = 500 KB/s')
if(jQuery(this).find('option:selected').val() === 'speedlimit') {
jQuery('#hidden_arguments').show()
jQuery('#hidden_arguments input').attr('placeholder', 'Bytes/s, "1M" = 1 MB/s, "500K" = 500 KB/s')
} else {
\$('#hidden_arguments').hide()
\$('#hidden_arguments input').attr('placeholder', '')
jQuery('#hidden_arguments').hide()
jQuery('#hidden_arguments input').attr('placeholder', '')
}
/* Arguments - since we only have speedlimit with arguments, disabled for now
if(\$(this).find('option:selected').data('noarg')) {
\$('#hidden_arguments').hide()
if(jQuery(this).find('option:selected').data('noarg')) {
jQuery('#hidden_arguments').hide()
} else {
\$('#hidden_arguments').show()
jQuery('#hidden_arguments').show()
}*/
})
\$('[name="schedenabled"]').click(function() {
\$.ajax({
jQuery('[name="schedenabled"]').click(function() {
jQuery.ajax({
type: "POST",
url: "toggleSchedule",
data: {line: \$(this).val(), apikey: "$apikey" }
url: "$url('config/scheduling/toggle_schedule')",
data: {line: jQuery(this).val() }
}).done(function() {
// Let us leave!
formWasSubmitted = true;
+234 -136
View File
@@ -1,17 +1,25 @@
<!--#set global $pane="Servers"#-->
<!--#set global $help_uri="configuration/3.4/servers"#-->
<!--#set global $help_uri = $confighelpuri + "servers"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<!--#import json#-->
<!--#import datetime#-->
<script type="text/javascript" xmlns="http://www.w3.org/1999/html">
<script type="text/javascript">
// Define variable needed for the server-statistics
var serverBandwithData = {}
var serverArticleTries = {}
var serverArticleFailed = {}
// Keep track of all used hostnames
var hostnames = ""
</script>
<div class="server-frame">
<a href="#">&times;</a>
<iframe></iframe>
</div>
<div class="colmask">
<div class="padding alt section">
<button type="button" class="btn btn-default" id="addServerButton"><span class="glyphicon glyphicon-plus"></span> $T('button-addServer')</button>
@@ -20,7 +28,7 @@
</label>
<div class="advanced-buttonSeperator"></div>
<div class="chart-selector-container" title="$T('selectedDates')">
<div class="chart-selector-container" title="$T('selectedDates')" data-placement="bottom">
<span class="glyphicon glyphicon-signal"></span>
<!--#set today = datetime.date.today()#-->
<input type="date" name="chart-start" id="chart-start" value="<!--#echo (today-datetime.timedelta(days=30)).strftime('%Y-%m-%d')#-->"> -
@@ -29,17 +37,15 @@
</div>
<div class="section" id="addServerContent" style="display: none;">
<div class="col2">
<h3>$T('addServer') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('addServer') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div>
<div class="col1">
<form action="addServer" method="post" autocomplete="off" onsubmit="removeObfuscation();">
<input type="hidden" name="apikey" value="$apikey" />
<form data-form="add-server" action="$url('config/server/add_server')" method="post" autocomplete="off">
<input type="hidden" name="output" value="json" />
<fieldset>
<div class="field-pair">
<label class="config" for="enable">$T('srv-enable')</label>
<input type="checkbox" name="enable" id="enable" value="1" checked="checked" />
<span class="desc">$T('srv-enable')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="displayname">$T('srv-displayname')</label>
@@ -49,27 +55,27 @@
<label class="config" for="host">$T('srv-host')</label>
<input type="text" name="host" id="host" required />
</div>
<div class="field-pair">
<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" max="65535" />
</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 -->
<div class="field-pair">
<label class="config" for="${pid}_00">$T('srv-username')</label>
<input type="text" name="${pid}_00" id="${pid}_00" data-hide="username" />
<label class="config" for="${pid}_000">$T('srv-username')</label>
<input type="text" name="${pid}_000" id="${pid}_000" data-hide="username" />
</div>
<div class="field-pair">
<label class="config" for="${pid}_01">$T('srv-password')</label>
<input type="text" name="${pid}_01" id="${pid}_01" data-hide="password" />
<label class="config" for="${pid}_001">$T('srv-password')</label>
<input type="text" name="${pid}_001" id="${pid}_001" data-hide="password" />
</div>
<div class="field-pair">
<label class="config" for="connections">$T('srv-connections')</label>
<input type="number" name="connections" id="connections" min="1" max="1000" value="8" required />
<input type="number" name="connections" id="connections" min="1" max="500" value="16" required />
</div>
<div class="field-pair">
<label class="config" for="priority">$T('srv-priority')</label>
@@ -83,31 +89,38 @@
<label class="config" for="timeout">$T('srv-timeout')</label>
<input type="number" name="timeout" id="timeout" min="20" max="240" /> <i>$T('seconds')</i>
</div>
<div class="field-pair <!--#if int($certificate_validation) == 0 then "disabled" else ""#--> advanced-settings">
<div class="field-pair advanced-settings">
<label class="config" for="ssl_verify">$T('opt-ssl_verify')</label>
<select name="ssl_verify" id="ssl_verify" <!--#if int($certificate_validation) == 0 then "disabled=\"disabled\"" else ""#-->>
<option value="2" selected>$T('ssl_verify-strict')</option>
<option value="1">$T('ssl_verify-normal')</option>
<select name="ssl_verify" id="ssl_verify">
<option value="3" selected>$T('ssl_verify-strict')</option>
<option value="2">$T('ssl_verify-medium')</option>
<option value="1">$T('ssl_verify-minimal')</option>
<option value="0">$T('ssl_verify-disabled')</option>
</select>
<span class="desc">$T('explain-ssl_verify').replace('. ', '.<br/>')</span>
<span class="desc">$T('explain-ssl_verify').replace('-', '<br/>-')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="ssl_ciphers">$T('opt-ssl_ciphers')</label>
<input type="text" name="ssl_ciphers" id="ssl_ciphers" />
<span class="desc">$T('explain-ssl_ciphers') <br>$T('readwiki')
<a href="${helpuri}advanced/ssl-ciphers" target="_blank">${helpuri}advanced/ssl-ciphers</a></span>
<a href="https://sabnzbd.org/wiki/advanced/ssl-ciphers" target="_blank">https://sabnzbd.org/wiki/advanced/ssl-ciphers</a></span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="send_group">$T('srv-send_group')</label>
<input type="checkbox" name="send_group" id="send_group" value="1" />
<span class="desc">$T('srv-explain-send_group')</span>
<label class="config" for="required">$T('srv-required')</label>
<input type="checkbox" name="required" id="required" value="1" />
<span class="desc">$T('explain-required')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="optional">$T('srv-optional')</label>
<input type="checkbox" name="optional" id="optional" value="1" />
<span class="desc">$T('explain-optional')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="pipelining_requests">$T('srv-pipelining_requests')</label>
<input type="number" name="pipelining_requests" id="pipelining_requests" min="1" max="20" value="2" />
<span class="desc">$T('explain-pipelining_requests')<br>$T('readwiki')
<a href="https://sabnzbd.org/wiki/advanced/nntp-pipelining" target="_blank">https://sabnzbd.org/wiki/advanced/nntp-pipelining</a></span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="expire_date">$T('srv-expire_date')</label>
<input type="date" name="expire_date" id="expire_date" />
@@ -123,30 +136,29 @@
<textarea name="notes" id="notes" rows="3" cols="50"></textarea>
</div>
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> $T('button-addServer')</button>
<button class="btn btn-default testServer" type="button"><span class="glyphicon glyphicon-sort"></span> $T('button-testServer')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<button class="btn btn-default addNewServer" disabled data-toggle="tooltip" data-placement="top" title="$T('wizard-test-server-required')"><span class="glyphicon glyphicon-plus"></span> $T('button-addServer')</button>
<button class="btn btn-default testServer" type="button" aria-busy="false"><span class="glyphicon glyphicon-sort" aria-hidden="true"></span> $T('button-testServer')</button>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</form>
</div>
</div>
<!--#set $prio_colors = ["#59cc33", "#3366cc","#7f33cc", "#cc33a6", "#cc3333"] #-->
<!--#set $prio_colors = ["#59cc33", "#26a69a", "#3366cc", "#7f33cc", "#cc33a6", "#f39c12", "#cc3333", "#8d6e63"] #-->
<!--#set $cur_prio_color = -1 #-->
<!--#set $last_prio = -1 #-->
<!--#for $cur, $server in enumerate($servers) #-->
<form action="saveServer" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="apikey" value="$apikey" />
<form action="$url('config/server/save_server')" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="output" value="json" />
<input type="hidden" name="server" value="$server['name']" />
<input type="hidden" id="ajax" name="ajax" value=1 />
<div class="section <!--#if int($server['enable']) == 0 then 'server-disabled' else ""#-->">
<div class="col2 <!--#if int($server['enable']) == 0 then 'server-disabled' else ""#-->">
<h3 title="$server['displayname']">$server['displayname'] <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3 title="$server['displayname']">$server['displayname'] <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<!--#if int($server['enable']) != 0 #-->
<!--#if $last_prio != $server['priority'] and $cur_prio_color+1 < len($prio_colors) #-->
<!--#set $cur_prio_color = $cur_prio_color+1 #-->
@@ -163,6 +175,9 @@
</table>
<button type="button" class="btn btn-default showserver"><span class="glyphicon glyphicon-pencil"></span> $T('showDetails')</button>
<button type="button" class="btn btn-default clrServer"><span class="glyphicon glyphicon-remove"></span> $T('button-clrServer')</button>
<!--#if $server['notes'] #-->
<p>$server['notes'].replace('\n', '<br>')</p>
<!--#end if#-->
</div>
<div class="col1" style="display:none;">
<input type="hidden" name="enable" id="enable$cur" value="$int($server['enable'])" />
@@ -175,9 +190,9 @@
<label class="config" for="host$cur">$T('srv-host')</label>
<input type="text" name="host" id="host$cur" value="$server['host']" required />
</div>
<div class="field-pair">
<div class="field-pair advanced-settings">
<label class="config" for="port$cur">$T('srv-port')</label>
<input type="number" name="port" id="port$cur" value="$server['port']" size="8" min="0" required />
<input type="number" name="port" id="port$cur" value="$server['port']" size="8" min="0" max="65535" required />
</div>
<div class="field-pair">
<label class="config" for="ssl$cur">$T('srv-ssl')</label>
@@ -195,7 +210,7 @@
</div>
<div class="field-pair">
<label class="config" for="connections$cur">$T('srv-connections')</label>
<input type="number" name="connections" id="connections$cur" value="$server['connections']" min="1" max="1000" required />
<input type="number" name="connections" id="connections$cur" value="$server['connections']" min="1" max="500" required />
</div>
<div class="field-pair">
<label class="config" for="priority$cur">$T('srv-priority')</label>
@@ -210,20 +225,26 @@
<input type="number" name="timeout" id="timeout$cur" value="$server['timeout']" min="20" max="240" required /> <i>$T('seconds')</i>
</div>
<div class="field-pair <!--#if int($certificate_validation) == 0 then "disabled" else ""#--> advanced-settings">
<div class="field-pair advanced-settings">
<label class="config" for="ssl_verify$cur">$T('opt-ssl_verify')</label>
<select name="ssl_verify" id="ssl_verify$cur" <!--#if int($certificate_validation) == 0 then "disabled=\"disabled\"" else ""#-->>
<option value="2" <!--#if $server['ssl_verify'] == 2 then 'selected="selected"' else ""#--> >$T('ssl_verify-strict')</option>
<option value="1" <!--#if $server['ssl_verify'] == 1 then 'selected="selected"' else ""#--> >$T('ssl_verify-normal')</option>
<select name="ssl_verify" id="ssl_verify$cur">
<option value="3" <!--#if $server['ssl_verify'] == 3 then 'selected="selected"' else ""#--> >$T('ssl_verify-strict')</option>
<option value="2" <!--#if $server['ssl_verify'] == 2 then 'selected="selected"' else ""#--> >$T('ssl_verify-medium')</option>
<option value="1" <!--#if $server['ssl_verify'] == 1 then 'selected="selected"' else ""#--> >$T('ssl_verify-minimal')</option>
<option value="0" <!--#if $server['ssl_verify'] == 0 then 'selected="selected"' else ""#--> >$T('ssl_verify-disabled')</option>
</select>
<span class="desc">$T('explain-ssl_verify').replace('. ', '.<br/>')</span>
<span class="desc">$T('explain-ssl_verify').replace('-', '<br/>-')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="ssl_ciphers">$T('opt-ssl_ciphers')</label>
<input type="text" name="ssl_ciphers" id="ssl_ciphers" value="$server['ssl_ciphers']" />
<label class="config" for="ssl_ciphers$cur">$T('opt-ssl_ciphers')</label>
<input type="text" name="ssl_ciphers" id="ssl_ciphers$cur" value="$server['ssl_ciphers']" />
<span class="desc">$T('explain-ssl_ciphers') <br>$T('readwiki')
<a href="${helpuri}advanced/ssl-ciphers" target="_blank">${helpuri}advanced/ssl-ciphers</a></span>
<a href="https://sabnzbd.org/wiki/advanced/ssl-ciphers" target="_blank">https://sabnzbd.org/wiki/advanced/ssl-ciphers</a></span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="required$cur">$T('srv-required')</label>
<input type="checkbox" name="required" id="required$cur" value="1" <!--#if int($server['required']) != 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-required')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="optional$cur">$T('srv-optional')</label>
@@ -231,9 +252,10 @@
<span class="desc">$T('explain-optional')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="send_group$cur">$T('srv-send_group')</label>
<input type="checkbox" name="send_group" id="send_group$cur" value="1" <!--#if int($server['send_group']) != 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('srv-explain-send_group')</span>
<label class="config" for="pipelining_requests$cur">$T('srv-pipelining_requests')</label>
<input type="number" name="pipelining_requests" id="pipelining_requests$cur" value="$server['pipelining_requests']" min="1" max="20" required />
<span class="desc">$T('explain-pipelining_requests')<br>$T('readwiki')
<a href="https://sabnzbd.org/wiki/advanced/nntp-pipelining" target="_blank">https://sabnzbd.org/wiki/advanced/nntp-pipelining</a></span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="expire_date$cur">$T('srv-expire_date')</label>
@@ -249,17 +271,18 @@
<label class="config" for="notes$cur">$T('srv-notes')</label>
<textarea name="notes" id="notes$cur" rows="3" cols="50">$server['notes']</textarea>
</div>
<div class="field-pair">
<div class="field-pair no-field-pair-bg">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
<button class="btn btn-default testServer" type="button"><span class="glyphicon glyphicon-sort"></span> $T('button-testServer')</button>
<button class="btn btn-default testServer" type="button" aria-busy="false"><span class="glyphicon glyphicon-sort" aria-hidden="true"></span> $T('button-testServer')</button>
<button class="btn btn-default delServer"><span class="glyphicon glyphicon-trash"></span> $T('button-delServer')</button>
</div>
<div class="field-pair result-box">
<div class="alert"></div>
<div class="result-box" role="status" aria-live="polite" aria-atomic="true">
<div class="alert"></div>
</div>
</div>
</fieldset>
</div>
<div class="col1" style="display:block;">
<div class="col1 padding" style="display:block;">
<!--#if 'amounts' in $server#-->
<div class="server-amounts-text">
<p>
@@ -273,13 +296,14 @@
<p title="$T('readwiki')">
<b>$T('srv-article-availability'):</b><br/>
$T('selectedDates'): <span id="server-article-value-${cur}"></span>
$T('selectedDates'): <span id="server-article-value-${cur}"></span><br/>
<a href="https://sabnzbd.org/not-complete" id="server-article-not-complete-${cur}" target="_blank">https://sabnzbd.org/not-complete</a>
</p>
<!--#if $server['expire_date']#-->
<p><b>$T('srv-expire_date'):</b> $(server['expire_date'])</p>
<!--#end if#-->
<!--#if $server['quota']#-->
<p><b>$T('quota-left'):</b> $(server['quota_left'])B</p>
<p><b>$T('quota-left'):</b> $(server['quota_left'])</p>
<!--#end if#-->
</div>
<div class="server-chart" data-serverid="${cur}">
@@ -290,6 +314,9 @@
serverBandwithData[${cur}] = <!--#echo json.dumps($server['amounts'][4])#-->
serverArticleTries[${cur}] = <!--#echo json.dumps($server['amounts'][5])#-->
serverArticleFailed[${cur}] = <!--#echo json.dumps($server['amounts'][6])#-->
<!--#if int($server['enable']) != 0#-->
hostnames += ",$server['host']"
<!--#end if#-->
</script>
<!--#end if#-->
</div>
@@ -298,8 +325,8 @@
<!--#end for#-->
</div>
<script type="text/javascript" src="${root}staticcfg/js/chartist.min.js"></script>
<script type="text/javascript" src="${root}staticcfg/js/filesize.min.js"></script>
<script type="text/javascript" src="$url('staticcfg/js/chartist.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/js/filesize.min.js', v=$cache_buster)"></script>
<script type="text/javascript">
// Standardize chart options
var chartOptions = {
@@ -327,8 +354,8 @@
function showCharts() {
// Get the constants
const startDate = new Date(\$('#chart-start').val())
const endDate = new Date(\$('#chart-end').val())
const startDate = new Date(jQuery('#chart-start').val())
const endDate = new Date(jQuery('#chart-end').val())
const oneDay = 24 * 60 * 60 * 1000
const nrDays = Math.round((endDate-startDate)/oneDay)
@@ -339,8 +366,8 @@
var maxBandwith = 0
// For each chart
\$('.server-chart').each(function(j, elemn) {
const server_id = \$(elemn).data('serverid')
jQuery('.server-chart').each(function(j, elemn) {
const server_id = jQuery(elemn).data('serverid')
var totalBandwithThisRange = 0
var totalArticlesTriedThisRange = 0
var totalArticlesFailedThisRange = 0
@@ -383,7 +410,7 @@
}
// Update the text value
\$('#server-bandwith-value-' + server_id).text(filesize(totalBandwithThisRange, {round: 1}))
jQuery('#server-bandwith-value-' + server_id).text(filesize(totalBandwithThisRange, {round: 1}))
// Calculate article success ratio, if available
var articleRatio = Math.round(100 * (1 - totalArticlesFailedThisRange/totalArticlesTriedThisRange))
@@ -391,14 +418,17 @@
// If values were missing
if(!isNaN(articleRatio)) {
// Use filesize to convert to unit-display
\$('#server-article-value-' + server_id).text('$T("srv-articles-tried")'.replace('%f', articleRatio).replace('%d', filesize(totalArticlesTriedThisRange, {unix: true, round: 0, spacer: "", base: 1})))
jQuery('#server-article-value-' + server_id).text('$T("srv-articles-tried")'.replace('%f', articleRatio).replace('%d', filesize(totalArticlesTriedThisRange, {unix: true, round: 0, spacer: "", base: 1})))
// If we have a low value, we link them to the website
if(articleRatio > 60) jQuery('#server-article-not-complete-' + server_id).hide()
} else {
\$('#server-article-value-' + server_id).text('$T("notAvailable")')
jQuery('#server-article-value-' + server_id).text('$T("notAvailable")')
jQuery('#server-article-not-complete-' + server_id).hide()
}
// Save bandwidth data in a very ugly way, but we need to do this
// so we can calculate the maximum Y-axis for all graphs
\$(elemn).data("chart-data", data)
jQuery(elemn).data("chart-data", data)
})
// Set the maximum
@@ -406,11 +436,11 @@
chartOptions.axisY.low = 0
// Update all the axis with the largest value and draw the graph
\$('.server-chart').each(function(j, elemn) {
const server_id = \$(elemn).data('serverid')
jQuery('.server-chart').each(function(j, elemn) {
const server_id = jQuery(elemn).data('serverid')
// Show the chart
chart = new Chartist.Line('#server-chart-'+server_id, \$(elemn).data("chart-data"), chartOptions)
chart = new Chartist.Line('#server-chart-'+server_id, jQuery(elemn).data("chart-data"), chartOptions)
chart.on('created', function(context) {
// Make sure to add this as the first child so it's at the bottom
context.svg.elem('rect', {
@@ -422,15 +452,15 @@
stroke: '#b9b9b9',
'stroke-width': '1px'
}, '', context.svg, true)
\$('#server-chart-'+server_id+' .ct-label.ct-vertical').each(function(index, elmn) {
jQuery('#server-chart-'+server_id+' .ct-label.ct-vertical').each(function(index, elmn) {
elmn.innerHTML = filesize(elmn.innerHTML, {round: 1}).replace(' ','')
})
});
})
// Limit input to sensible values
\$('#chart-start').attr("max", \$('#chart-end').val())
\$('#chart-end').attr("min", \$('#chart-start').val())
jQuery('#chart-start').attr("max", jQuery('#chart-end').val())
jQuery('#chart-end').attr("min", jQuery('#chart-start').val())
}
// Need to mitigate timezone effects!
@@ -443,21 +473,19 @@
/**
When finished loading
**/
\$(document).ready(function(){
// Exception when change of priority, reload
\$('input[name="priority"], input[name="displayname"]').on('change', function() {
\$('.fullform').submit(function() {
// No ajax this time
\$('input[name="ajax"]').val('')
// Skip the fancy stuff, just submit
this.submit()
})
jQuery(document).ready(function(){
// Initialize tooltips
jQuery('[data-toggle="tooltip"]').tooltip()
// Reload the page after saving in case we change items that make the servers appear different
jQuery('input[name="priority"], input[name="displayname"], textarea[name="notes"]').on('change', function(event) {
jQuery(event.target).parents("form").attr("data-reload-on-save", "")
})
/**
Update charts when changed
**/
\$('#chart-start, #chart-end').on('change', function(elemn) {
jQuery('#chart-start, #chart-end').on('change', function(elemn) {
showCharts()
// Lets us leave (needs to be called after the change event)
@@ -472,41 +500,37 @@
/**
Click events
**/
\$('.showserver').click(function () {
if(\$(this).parent().hasClass('server-disabled')) {
\$(this).parent().parent().toggleClass('server-disabled')
jQuery('.showserver').click(function () {
if(jQuery(this).parent().hasClass('server-disabled')) {
jQuery(this).parent().parent().toggleClass('server-disabled')
}
\$(this).parent().next().toggle();
\$(this).parent().next().next().toggle();
if (\$(this).text().indexOf("$T('showDetails')") > 0) {
\$(this).html(\$(this).html().replace("$T('showDetails')", "$T('hideDetails')"));
jQuery(this).parent().next().toggle();
jQuery(this).parent().next().next().toggle();
if (jQuery(this).text().indexOf("$T('showDetails')") > 0) {
jQuery(this).html(jQuery(this).html().replace("$T('showDetails')", "$T('hideDetails')"));
} else {
\$(this).html(\$(this).html().replace("$T('hideDetails')", "$T('showDetails')"));
jQuery(this).html(jQuery(this).html().replace("$T('hideDetails')", "$T('showDetails')"));
// Recalculate the charts if changed while details were open
showCharts()
}
// Add coloring
addRowColor()
});
\$('#addServerButton').click(function(){
\$('#addServerContent').show();
// Add coloring
addRowColor()
jQuery('#addServerButton').click(function(){
jQuery('#addServerContent').show();
});
\$('[name="ssl"]').click(function() {
jQuery('[name="ssl"]').click(function() {
// Use CSS transitions to do some highlighting
var portBox = \$(this).parent().parent().find('[name="port"]')
var portBox = jQuery(this).parent().parent().find('[name="port"]')
if(this.checked) {
// Enabled SSL change port when not already a custom port
if(portBox.val() == '119') {
if(portBox.val() === '119') {
portBox.val('563')
portBox.addClass('port-highlight')
}
} else {
// Remove SSL port
if(portBox.val() == '563') {
if(portBox.val() === '563') {
portBox.val('119')
portBox.addClass('port-highlight')
}
@@ -515,65 +539,110 @@
})
// Testing servers
\$('.testServer').click(function(event){
jQuery('.testServer').click(function(event){
removeObfuscation()
var theButton = \$(this)
var theButton = jQuery(this)
var resultBox = theButton.parents('.col1').find('.result-box .alert');
theButton.attr("disabled", "disabled")
theButton.attr("aria-busy", "true")
theButton.find('span').toggleClass('glyphicon-sort glyphicon-refresh spin-glyphicon')
\$.ajax({
resultBox.removeClass('alert-success alert-danger').addClass('alert-info').html("$T('srv-testing')").show()
jQuery.ajax({
type: "POST",
url: "../../api",
data: "mode=config&name=test_server&" + \$(this).parents('form:first').serialize()
url: "$url('api')",
data: "mode=config&name=test_server&" + jQuery(this).parents('form:first').serialize()
}).then(function(data) {
// Let's replace the link
msg = data.value.message.replace('https://sabnzbd.org/certificate-errors', '<a href="https://sabnzbd.org/certificate-errors" class="alert-link" target="_blank">https://sabnzbd.org/certificate-errors</a>')
msg = msg.replace('-', '<br>')
// Fill the box and enable the button
resultBox.removeClass('alert-success alert-danger').show()
resultBox.removeClass('alert-info alert-success alert-danger').show()
resultBox.html(msg)
theButton.removeAttr("disabled")
theButton.attr("aria-busy", "false")
theButton.find('span').toggleClass('glyphicon-sort glyphicon-refresh spin-glyphicon')
// Succes or not?
// Success or not?
if(data.value.result) {
resultBox.addClass('alert-success')
resultBox.prepend('<span class="glyphicon glyphicon-ok-sign"></span> ')
resultBox.prepend('<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> ')
// Allow adding the new server if we are in the new-server section
if(theButton.parents("form[data-form='add-server']").length) {
jQuery(".addNewServer").removeAttr("disabled")
jQuery(".addNewServer").removeAttr("data-toggle")
jQuery(".addNewServer").removeAttr("title")
jQuery(".addNewServer").tooltip("destroy")
}
} else {
resultBox.addClass('alert-danger')
resultBox.prepend('<span class="glyphicon glyphicon-exclamation-sign"></span> ')
resultBox.prepend('<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> ')
// Disable the adding of new server, just to be sure
if(theButton.parents("form[data-form='add-server']").length) {
jQuery(".addNewServer").attr("disabled", "disabled")
jQuery(".addNewServer").attr("data-toggle", "tooltip")
jQuery(".addNewServer").attr("data-placement", "top")
jQuery(".addNewServer").attr("title", "$T('wizard-test-server-required')")
jQuery(".addNewServer").tooltip()
}
}
});
});
\$('.delServer').click(function(){
if( confirm("$T('confirm')") ) {
\$(this).parents('form:first').attr('action','delServer').submit();
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
setTimeout(function() { location.reload(); }, 500)
}
return false;
});
\$('.clrServer').click(function(){
if( confirm("$T('confirm')") ) {
\$(this).parents('form:first').attr('action','clrServer').submit();
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
setTimeout(function() { location.reload(); }, 500)
}
return false;
});
\$('.toggleServerCheckbox').click(function(){
var whichServer = \$(this).attr("name");
\$.ajax({
jQuery('.addNewServer').click(function(event){
event.preventDefault()
removeObfuscation()
var theButton = jQuery(this)
var resultBox = theButton.parents('.col1').find('.result-box .alert')
theButton.attr("disabled", "disabled")
jQuery.ajax({
type: "POST",
url: "toggleServer",
data: {server: whichServer, apikey: "$apikey" }
url: "$url('config/server/add_server')",
data: theButton.parents('form:first').serialize()
}).then(function(data) {
if(data.status) {
// Success — reload to show the new server
formWasSubmitted = true
formHasChanged = false
location.reload()
} else {
// Show error in the result box
resultBox.removeClass('alert-success').addClass('alert-danger').show()
resultBox.html('<span class="glyphicon glyphicon-exclamation-sign"></span> ' + data.error)
theButton.removeAttr("disabled")
}
})
})
jQuery('.delServer').click(function(){
if( confirm("$T('confirm')") ) {
jQuery(this).parents('form:first').attr('action',"$url('config/server/delete_server')").submit();
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
setTimeout(function() { location.reload(); }, 500)
}
return false;
});
jQuery('.clrServer').click(function(){
if( confirm("$T('confirm')") ) {
jQuery(this).parents('form:first').attr('action',"$url('config/server/clear_server')").submit();
// Let us leave!
formWasSubmitted = true;
formHasChanged = false;
setTimeout(function() { location.reload(); }, 500)
}
return false;
});
jQuery('.toggleServerCheckbox').click(function(){
var whichServer = jQuery(this).attr("name");
jQuery.ajax({
type: "POST",
url: "$url('config/server/toggle_server')",
data: {server: whichServer }
}).done(function() {
// Let us leave!
formWasSubmitted = true;
@@ -581,6 +650,35 @@
setTimeout(function() { location.reload(); }, 100)
});
});
// Show text-ad if there is space
if((jQuery("body").width() - jQuery("#content").width())/2 > (jQuery('.Servers .server-frame').width() + 40)) {
// Do not show if dismissed previously
if(localStorage.getItem("server-frame-hide-$version") === null) {
// Let the page on the server tell us if we need to show
function receiveMessage(event) {
// Check origin of message for security reasons
if(event.origin === 'https://sabnzbd.org') {
if(event.data === 'show_server') {
jQuery('.Servers .server-frame').show()
jQuery('.Servers .server-frame a').click(function () {
localStorage.setItem("server-frame-hide-$version", "hide")
jQuery('.Servers .server-frame').hide()
})
}
if(event.data === 'hide_server') {
// Hide and don't load anymore until the next release
jQuery('.Servers .server-frame').hide()
localStorage.setItem("server-frame-hide-$version", "hide")
}
}
}
window.addEventListener("message", receiveMessage, false);
// NOTE: The hash-part cannot be seen by the server, so we don't know which hostnames you use!
jQuery('.Servers .server-frame iframe').attr("src", "https://sabnzbd.org/servers#$active_lang" + hostnames)
}
}
});
</script>
File diff suppressed because it is too large. Load diff
@@ -1,16 +1,15 @@
<!--#set global $pane="Special"#-->
<!--#set global $help_uri="configuration/3.4/special"#-->
<!--#set global $help_uri = $confighelpuri + "special"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
<form action="saveSpecial" method="post" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<form action="$url('config/special/save')" method="post" class="fullform" autocomplete="off">
<div class="padTable">
<h4 class="darkred nomargin">$T('explain-special')</h4>
</div>
<div class="section">
<div class="col2">
<h3>$T('sptag-boolean') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('sptag-boolean') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
@@ -33,7 +32,7 @@
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('sptag-entries') <a href="$helpuri$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('sptag-entries') <a href="$help_uri" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
+87 -247
View File
@@ -1,5 +1,5 @@
<!--#set global $pane="Switches"#-->
<!--#set global $help_uri="configuration/3.4/switches"#-->
<!--#set global $help_uri = $confighelpuri + "switches"#-->
<!--#include $webdir + "/_inc_header_uc.tmpl"#-->
<div class="colmask">
@@ -8,25 +8,14 @@
<input type="checkbox" id="advanced-settings-button" name="advanced-settings-button"> $T('button-advanced')
</label>
</div>
<form action="saveSwitches" method="post" name="fullform" class="fullform" autocomplete="off">
<input type="hidden" id="apikey" name="apikey" value="$apikey" />
<input type="hidden" id="ajax" name="ajax" value="1" />
<form action="$url('config/switches/save')" method="post" class="fullform" autocomplete="off">
<input type="hidden" name="output" value="json" />
<div class="section advanced-settings">
<div class="col2">
<h3>$T('swtag-server') <a href="$helpuri$help_uri#toc1" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('swtag-server') <a href="$help_uri#toc1" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="load_balancing">$T('opt-load_balancing')</label>
<select name="load_balancing" id="load_balancing">
<option value="0" <!--#if $load_balancing == 0 then 'selected="selected"' else ""#--> >$T('no-load-balancing')</option>
<option value="1" <!--#if $load_balancing == 1 then 'selected="selected"' else ""#--> >$T('load-balancing')</option>
<option value="2" <!--#if $load_balancing == 2 then 'selected="selected"' else ""#--> >$T('load-balancing-happy-eyeballs')</option>
</select>
<span class="desc">$T('explain-load_balancing')</span>
</div>
<div class="field-pair">
<label class="config" for="max_art_tries">$T('opt-max_art_tries')</label>
<input type="number" name="max_art_tries" id="max_art_tries" value="$max_art_tries" min="2" max="2000" />
@@ -46,11 +35,11 @@
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('swtag-queue') <a href="$helpuri$help_uri#toc2" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('swtag-queue') <a href="$help_uri#toc2" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<div class="field-pair advanced-settings">
<label class="config" for="pre_script">$T('opt-pre_script')</label>
<select name="pre_script" id="pre_script">
<!--#for $sc in $scripts#-->
@@ -63,9 +52,22 @@
</select>
<span class="desc">$T('explain-pre_script')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="end_queue_script">$T('opt-end_queue_script')</label>
<select name="end_queue_script" id="end_queue_script">
<!--#for $sc in $scripts#-->
<!--#if $sc.lower() == $end_queue_script.lower()#-->
<option value="$sc" selected="selected">$Tspec($sc)</option>
<!--#else#-->
<option value="$sc">$Tspec($sc)</option>
<!--#end if#-->
<!--#end for#-->
</select>
<span class="desc">$T('explain-end_queue_script')</span>
</div>
<div class="field-pair">
<label class="config" for="propagation_delay">$T('opt-propagation_delay')</label>
<input type="number" name="propagation_delay" id="propagation_delay" value="$propagation_delay" /> <i>$T('minutes')</i>
<input type="number" name="propagation_delay" id="propagation_delay" value="$propagation_delay" min="0" /> <i>$T('minutes')</i>
<span class="desc">$T('explain-propagation_delay')</span>
</div>
<div class="field-pair advanced-settings">
@@ -89,33 +91,39 @@
<option value="0" <!--#if int($no_dupes) == 0 then 'selected="selected"' else ""#--> >$T('nodupes-off')</option>
<option value="4" <!--#if int($no_dupes) == 4 then 'selected="selected"' else ""#--> >$T('nodupes-tag')</option>
<option value="2" <!--#if int($no_dupes) == 2 then 'selected="selected"' else ""#--> >$T('nodupes-pause')</option>
<option value="3" <!--#if int($no_dupes) == 3 then 'selected="selected"' else ""#--> >$T('nodupes-fail')</option>
<option value="3" <!--#if int($no_dupes) == 3 then 'selected="selected"' else ""#--> >$T('fail-to-history')</option>
<option value="1" <!--#if int($no_dupes) == 1 then 'selected="selected"' else ""#--> >$T('nodupes-ignore')</option>
</select>
<span class="desc">$T('explain-no_dupes')</span>
<span class="desc">
$T('explain-no_dupes')<br>
<a href="https://sabnzbd.org/wiki/duplicate-detection" target="_blank">https://sabnzbd.org/wiki/duplicate-detection</a>
</span>
</div>
<div class="field-pair">
<label class="config" for="no_series_dupes">$T('opt-no_series_dupes')</label>
<select name="no_series_dupes" id="no_series_dupes">
<option value="0" <!--#if int($no_series_dupes) == 0 then 'selected="selected"' else ""#--> >$T('nodupes-off')</option>
<option value="4" <!--#if int($no_series_dupes) == 4 then 'selected="selected"' else ""#--> >$T('nodupes-tag')</option>
<option value="2" <!--#if int($no_series_dupes) == 2 then 'selected="selected"' else ""#--> >$T('nodupes-pause')</option>
<option value="3" <!--#if int($no_series_dupes) == 3 then 'selected="selected"' else ""#--> >$T('nodupes-fail')</option>
<option value="1" <!--#if int($no_series_dupes) == 1 then 'selected="selected"' else ""#--> >$T('nodupes-ignore')</option>
<label class="config" for="no_smart_dupes">$T('opt-no_smart_dupes')</label>
<select name="no_smart_dupes" id="no_smart_dupes">
<option value="0" <!--#if int($no_smart_dupes) == 0 then 'selected="selected"' else ""#--> >$T('nodupes-off')</option>
<option value="4" <!--#if int($no_smart_dupes) == 4 then 'selected="selected"' else ""#--> >$T('nodupes-tag')</option>
<option value="2" <!--#if int($no_smart_dupes) == 2 then 'selected="selected"' else ""#--> >$T('nodupes-pause')</option>
<option value="3" <!--#if int($no_smart_dupes) == 3 then 'selected="selected"' else ""#--> >$T('fail-to-history')</option>
<option value="1" <!--#if int($no_smart_dupes) == 1 then 'selected="selected"' else ""#--> >$T('nodupes-ignore')</option>
</select>
<span class="desc">$T('explain-no_series_dupes')</span>
<span class="desc">
$T('explain-no_smart_dupes')<br>
<a href="https://sabnzbd.org/wiki/duplicate-detection" target="_blank">https://sabnzbd.org/wiki/duplicate-detection</a>
</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="series_propercheck">$T('opt-series_propercheck')</label>
<input type="checkbox" name="series_propercheck" id="series_propercheck" value="1" <!--#if int($series_propercheck) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-series_propercheck')</span>
<label class="config" for="dupes_propercheck">$T('opt-dupes_propercheck')</label>
<input type="checkbox" name="dupes_propercheck" id="dupes_propercheck" value="1" <!--#if int($dupes_propercheck) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-dupes_propercheck')</span>
</div>
<div class="field-pair">
<label class="config" for="pause_on_pwrar">$T('opt-pause_on_pwrar')</label>
<select name="pause_on_pwrar" id="pause_on_pwrar">
<option value="0" <!--#if int($pause_on_pwrar) == 0 then 'selected="selected"' else ""#--> >$T('nodupes-off')</option>
<option value="1" <!--#if int($pause_on_pwrar) == 1 then 'selected="selected"' else ""#--> >$T('nodupes-pause')</option>
<option value="2" <!--#if int($pause_on_pwrar) == 2 then 'selected="selected"' else ""#--> >$T('abort')</option>
<option value="2" <!--#if int($pause_on_pwrar) == 2 then 'selected="selected"' else ""#--> >$T('fail-to-history')</option>
</select>
<span class="desc">$T('explain-pause_on_pwrar')</span>
</div>
@@ -133,7 +141,7 @@
<select name="action_on_unwanted_extensions" id="action_on_unwanted_extensions">
<option value="0" <!--#if int($action_on_unwanted_extensions) == 0 then 'selected="selected"' else ""#--> >$T('nodupes-off')</option>
<option value="1" <!--#if int($action_on_unwanted_extensions) == 1 then 'selected="selected"' else ""#--> >$T('nodupes-pause')</option>
<option value="2" <!--#if int($action_on_unwanted_extensions) == 2 then 'selected="selected"' else ""#--> >$T('abort')</option>
<option value="2" <!--#if int($action_on_unwanted_extensions) == 2 then 'selected="selected"' else ""#--> >$T('fail-to-history')</option>
</select>
<span class="desc">$T('explain-action_on_unwanted_extensions')</span>
</div>
@@ -141,6 +149,8 @@
<label class="config" for="auto_sort">$T('opt-auto_sort')</label>
<select name="auto_sort" id="auto_sort">
<option value="">$T('default')</option>
<option value="remaining asc" <!--#if $auto_sort == "remaining asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortRemaining')</option>
<option value="remaining_bytes asc" <!--#if $auto_sort == "remaining_bytes asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortRemainingBytesAsc')</option>
<option value="avg_age desc" <!--#if $auto_sort == "avg_age desc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeAsc')</option>
<option value="avg_age asc" <!--#if $auto_sort == "avg_age asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortAgeDesc')</option>
<option value="name asc" <!--#if $auto_sort == "name asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortNameAsc')</option>
@@ -148,7 +158,7 @@
<option value="size asc" <!--#if $auto_sort == "size asc" then 'selected="selected"' else ""#--> >$T('Glitter-sortSizeAsc')</option>
<option value="size desc" <!--#if $auto_sort == "size desc" then 'selected="selected"' else ""#--> >$T('Glitter-sortSizeDesc')</option>
</select>
<span class="desc">$T('explain-auto_sort')</span>
<span class="desc">$T('explain-auto_sort') $T('explain-auto_sort_remaining')</span>
</div>
<div class="field-pair">
<label class="config" for="direct_unpack">$T('opt-direct_unpack')</label>
@@ -164,7 +174,7 @@
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('swtag-pp') <a href="$helpuri$help_uri#toc3" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('swtag-pp') <a href="$help_uri#toc3" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
@@ -178,16 +188,16 @@
<input type="checkbox" name="enable_all_par" id="enable_all_par" value="1" <!--#if int($enable_all_par) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-enable_all_par').replace('. ', '.<br/>')</span>
</div>
<!--#if not $nt#-->
<!--#if not $windows#-->
<div class="field-pair advanced-settings <!--#if not $have_nice then "disabled" else "" #-->">
<label class="config" for="nice">$T('opt-nice')</label>
<input type="text" name="nice" id="nice" value="$nice" <!--#if not $have_nice then 'readonly="readonly" disabled="disabled"' else "" #--> />
<span class="desc">$T('explain-nice')</span>
<span class="desc">$T('readwiki')</span>
</div>
<div class="field-pair advanced-settings <!--#if not $have_ionice then "disabled" else "" #-->">
<label class="config" for="ionice">$T('opt-ionice')</label>
<input type="text" name="ionice" id="ionice" value="$ionice" <!--#if not $have_ionice then 'readonly="readonly" disabled="disabled"' else "" #--> />
<span class="desc">$T('explain-ionice')</span>
<span class="desc">$T('readwiki')</span>
</div>
<!--#else#-->
<div class="field-pair advanced-settings">
@@ -199,13 +209,13 @@
<option value="2" <!--#if int($win_process_prio) == 2 then 'selected="selected"' else ""#-->>$T('win_process_prio-low')</option>
<option value="1" <!--#if int($win_process_prio) == 1 then 'selected="selected"' else ""#-->>$T('win_process_prio-idle')</option>
</select>
<span class="desc">$T('explain-win_process_prio')</span>
<span class="desc">$T('readwiki')</span>
</div>
<!--#end if#-->
<div class="field-pair advanced-settings">
<label class="config" for="par_option">$T('opt-par_option')</label>
<input type="text" name="par_option" id="par_option" value="$par_option" />
<span class="desc">$T('explain-par_option')</span>
<span class="desc">$T('readwiki')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="sfv_check">$T('opt-sfv_check')</label>
@@ -232,11 +242,6 @@
<input type="checkbox" name="script_can_fail" id="script_can_fail" value="1" <!--#if int($script_can_fail) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-script_can_fail')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="new_nzb_on_failure">$T('opt-new_nzb_on_failure')</label>
<input type="checkbox" name="new_nzb_on_failure" id="new_nzb_on_failure" value="1" <!--#if int($new_nzb_on_failure) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-new_nzb_on_failure')</span>
</div>
<div class="field-pair">
<label class="config" for="ignore_samples">$T('opt-ignore_samples')</label>
<input type="checkbox" name="ignore_samples" id="ignore_samples" value="1" <!--#if int($ignore_samples) > 0 then 'checked="checked"' else ""#--> />
@@ -247,27 +252,23 @@
<input type="checkbox" name="deobfuscate_final_filenames" id="deobfuscate_final_filenames" value="1" <!--#if int($deobfuscate_final_filenames) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-deobfuscate_final_filenames') $T('explain-deobfuscate_final_filenames-ext')</span>
</div>
<div class="field-pair advanced-settings">
<label class="config" for="enable_meta">$T('opt-enable_meta')</label>
<input type="checkbox" name="enable_meta" id="enable_meta" value="1" <!--#if int($enable_meta) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-enable_meta').replace('. ', '.<br/>')</span>
</div>
<div class="field-pair">
<label class="config" for="cleanup_list">$T('opt-cleanup_list')</label>
<input type="text" name="cleanup_list" id="cleanup_list" value="$cleanup_list"/>
<span class="desc">$T('explain-cleanup_list')</span>
</div>
<div class="field-pair">
<label class="config" for="history_retention_select">$T('opt-history_retention')</label>
<input type="hidden" name="history_retention" id="history_retention" value="$history_retention">
<select name="history_retention_select" id="history_retention_select">
<option value="0">$T('history_retention-all')</option>
<option value="n">$T('history_retention-number')</option>
<option value="d">$T('history_retention-days')</option>
<option value="-1">$T('history_retention-none')</option>
<label class="config" for="history_retention_option">$T('opt-history_retention')</label>
<select name="history_retention_option" id="history_retention_option">
<option value="all" <!--#if $history_retention_option == "all" then 'selected="selected"' else ""#-->>$T('history_retention-all')</option>
<option value="number-archive" <!--#if $history_retention_option == "number-archive" then 'selected="selected"' else ""#-->>$T('history_retention-number-archive')</option>
<option value="number-delete" <!--#if $history_retention_option == "number-delete" then 'selected="selected"' else ""#-->>$T('history_retention-number-delete')</option>
<option value="days-archive" <!--#if $history_retention_option == "days-archive" then 'selected="selected"' else ""#-->>$T('history_retention-days-archive')</option>
<option value="days-delete" <!--#if $history_retention_option == "days-delete" then 'selected="selected"' else ""#-->>$T('history_retention-days-delete')</option>
<option value="all-archive" <!--#if $history_retention_option == "all-archive" then 'selected="selected"' else ""#-->>$T('history_retention-archive')</option>
<option value="all-delete" <!--#if $history_retention_option == "all-delete" then 'selected="selected"' else ""#-->>$T('history_retention-none')</option>
</select>
<input type="number" id="history_retention_number" name="history_retention_number" min="1">
<span class="desc">$T('explain-history_retention').replace('. ', '.<br/>')</span>
<input type="number" id="history_retention_number" name="history_retention_number" min="1" value="$history_retention_number">
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
@@ -278,7 +279,7 @@
</div><!-- /section -->
<div class="section advanced-settings">
<div class="col2">
<h3>$T('swtag-naming') <a href="$helpuri$help_uri#toc4" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('swtag-naming') <a href="$help_uri#toc4" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
@@ -292,12 +293,17 @@
<input type="checkbox" name="replace_spaces" id="replace_spaces" value="1" <!--#if int($replace_spaces) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-replace_spaces')</span>
</div>
<div class="field-pair">
<label class="config" for="replace_underscores">$T('opt-replace_underscores')</label>
<input type="checkbox" name="replace_underscores" id="replace_underscores" value="1" <!--#if int($replace_underscores) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-replace_underscores')</span>
</div>
<div class="field-pair">
<label class="config" for="replace_dots">$T('opt-replace_dots')</label>
<input type="checkbox" name="replace_dots" id="replace_dots" value="1" <!--#if int($replace_dots) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-replace_dots')</span>
</div>
<!--#if not $nt#-->
<!--#if not $windows#-->
<div class="field-pair">
<label class="config" for="sanitize_safe">$T('opt-sanitize_safe')</label>
<input type="checkbox" name="sanitize_safe" id="sanitize_safe" value="1" <!--#if int($sanitize_safe) > 0 then 'checked="checked"' else ""#--> />
@@ -313,7 +319,7 @@
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('swtag-quota') <a href="$helpuri$help_uri#toc5" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
<h3>$T('swtag-quota') <a href="$help_uri#toc5" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
@@ -348,199 +354,33 @@
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
<div class="section">
<div class="col2">
<h3>$T('swtag-indexing') <a href="$helpuri$help_uri#toc6" target="_blank"><span class="glyphicon glyphicon-question-sign"></span></a></h3>
</div><!-- /col2 -->
<div class="col1">
<fieldset>
<div class="field-pair">
<label class="config" for="rating_enable">$T('opt-rating_enable')</label>
<input type="checkbox" name="rating_enable" id="rating_enable" value="1" <!--#if int($rating_enable) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-rating_enable').replace('. ', '.<br/>')</span>
</div>
<div class="field-pair">
<label class="config" for="rating_api_key">$T('opt-rating_api_key')</label>
<input type="text" name="rating_api_key" id="rating_api_key" value="$rating_api_key" />
<span class="desc">$T('explain-rating_api_key')</span>
</div>
<div class="field-pair">
<label class="config" for="rating_filter_enable">$T('opt-rating_filter_enable')</label>
<input type="checkbox" name="rating_filter_enable" id="rating_filter_enable" value="1" <!--#if int($rating_filter_enable) > 0 then 'checked="checked"' else ""#--> />
<span class="desc">$T('explain-rating_filter_enable')</span>
</div>
<div class="field-pair" id="rating_filter_abort">
<label class="config">$T('opt-rating_filter_abort_if')</label>
<div class="rating-filter">
<p>
<label for="rating_filter_abort_video">$T('opt-rating_filter_video')</label>
<select name="rating_filter_abort_video" id="rating_filter_abort_video">
<option value="0" <!--#if $rating_filter_abort_video == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option>
<!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_abort_video == $val then 'selected="selected"' else ""#--> >$val $T('orLess')</option><!--#end for#-->
</select>
</p>
<p>
<label for="rating_filter_abort_audio">$T('opt-rating_filter_audio')</label>
<select name="rating_filter_abort_audio" id="rating_filter_abort_audio">
<option value="0" <!--#if $rating_filter_abort_audio == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option>
<!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_abort_audio == $val then 'selected="selected"' else ""#--> >$val $T('orLess')</option><!--#end for#-->
</select>
</p>
<p>
<span>
<input type="checkbox" value="1" id="rating_filter_abort_encrypted" name="rating_filter_abort_encrypted" <!--#if int($rating_filter_abort_encrypted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_encrypted">$T('opt-rating_filter_passworded')</label>
</span>
<span>
<input type="checkbox" value="1" id="rating_filter_abort_encrypted_confirm" name="rating_filter_abort_encrypted_confirm" <!--#if int($rating_filter_abort_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
<p>
<span>
<input type="checkbox" value="1" id="rating_filter_abort_spam" name="rating_filter_abort_spam" <!--#if int($rating_filter_abort_spam) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_spam">$T('opt-rating_filter_spam')</label>
</span>
<span>
<input type="checkbox" value="1" id="rating_filter_abort_spam_confirm" name="rating_filter_abort_spam_confirm" <!--#if int($rating_filter_abort_spam_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
<p>
<input type="checkbox" value="1" id="rating_filter_abort_downvoted" name="rating_filter_abort_downvoted" <!--#if int($rating_filter_abort_downvoted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_abort_downvoted">$T('opt-rating_filter_downvoted')</label>
</p>
<p>
<label for="rating_filter_abort_keywords">$T('opt-rating_filter_keywords')</label>
<input type="text" name="rating_filter_abort_keywords" id="rating_filter_abort_keywords" value="$rating_filter_abort_keywords"/>
<span class="desc">$T('explain-rating_filter_keywords')</span>
</p>
</div>
</div>
<div class="field-pair" id="rating_filter_pause">
<label class="config">$T('opt-rating_filter_pause_if')</label>
<div class="rating-filter">
<p>
<label for="rating_filter_pause_video">$T('opt-rating_filter_video')</label>
<select name="rating_filter_pause_video" id="rating_filter_pause_video">
<option value="0" <!--#if $rating_filter_pause_video == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option>
<!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_pause_video == $val then 'selected="selected"' else ""#--> >$val $T('orLess')</option><!--#end for#-->
</select>
</p>
<p>
<label for="rating_filter_pause_audio">$T('opt-rating_filter_audio')</label>
<select name="rating_filter_pause_audio" id="rating_filter_pause_audio">
<option value="0" <!--#if $rating_filter_pause_audio == 0 then 'selected="selected"' else ""#--> >$T('notUsed')</option>
<!--#for $val in $range(1, 10)#--><option value="$val" <!--#if $rating_filter_pause_audio == $val then 'selected="selected"' else ""#--> >$val $T('orLess') </option><!--#end for#-->
</select>
</p>
<p>
<span>
<input type="checkbox" value="1" id="rating_filter_pause_encrypted" name="rating_filter_pause_encrypted" <!--#if int($rating_filter_pause_encrypted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_encrypted">$T('opt-rating_filter_passworded')</label>
</span>
<span>
<input type="checkbox" value="1" id="rating_filter_pause_encrypted_confirm" name="rating_filter_pause_encrypted_confirm" <!--#if int($rating_filter_pause_encrypted_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_encrypted_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
<p>
<span>
<input type="checkbox" value="1" id="rating_filter_pause_spam" name="rating_filter_pause_spam" <!--#if int($rating_filter_pause_spam) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_spam">$T('opt-rating_filter_spam')</label>
</span>
<span>
<input type="checkbox" value="1" id="rating_filter_pause_spam_confirm" name="rating_filter_pause_spam_confirm" <!--#if int($rating_filter_pause_spam_confirm) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_spam_confirm">$T('opt-rating_filter_confirmed')</label>
</span>
</p>
<p>
<input type="checkbox" value="1" id="rating_filter_pause_downvoted" name="rating_filter_pause_downvoted" <!--#if int($rating_filter_pause_downvoted) > 0 then 'checked="checked"' else ""#--> />
<label for="rating_filter_pause_downvoted">$T('opt-rating_filter_downvoted')</label>
</p>
<p>
<label for="rating_filter_pause_keywords">$T('opt-rating_filter_keywords')</label>
<input type="text" name="rating_filter_pause_keywords" id="rating_filter_pause_keywords" value="$rating_filter_pause_keywords"/>
<span class="desc">$T('explain-rating_filter_keywords')</span>
</p>
</div>
</div>
<div class="field-pair">
<button class="btn btn-default saveButton"><span class="glyphicon glyphicon-ok"></span> $T('button-saveChanges')</button>
</div>
</fieldset>
</div><!-- /col1 -->
</div><!-- /section -->
</form>
</div><!-- /colmask -->
<script type="text/javascript">
\$(document).ready(function() {
if (!\$('#rating_filter_enable').is(":checked")) {
\$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide();
}
\$('#rating_filter_enable').change(function () {
if (\$(this).is(":checked")) {
\$("#rating_filter_abort").show();
\$("#rating_filter_pause").show();
}
else {
\$("#rating_filter_abort").hide();
\$("#rating_filter_pause").hide();
}
});
\$('#history_retention_select, #history_retention_number').on('change', updateHistoryRetention)
jQuery(document).ready(function() {
jQuery('#history_retention_option').on('change', updateHistoryRetention)
function updateHistoryRetention() {
var retention_setting = \$('#history_retention')
var retention_select = \$('#history_retention_select').val()
var retention_number = \$('#history_retention_number')
// Keep all or keep none
if(retention_select == "0" || retention_select == "-1") {
var retention_option = jQuery('#history_retention_option').val()
var retention_number = jQuery('#history_retention_number')
if(retention_option === "number-archive" || retention_option === "number-delete") {
retention_number.show()
retention_number.attr('placeholder', '$T('history_retention-limit')')
} else if(retention_option === "days-archive" || retention_option === "days-delete") {
retention_number.show()
retention_number.attr('placeholder', '$T('days').capitalize()')
} else {
retention_number.hide()
retention_number.val('')
retention_number.attr('placeholder', '')
retention_setting.val(retention_select)
} else {
retention_number.show()
// Days or number?
if(retention_select.indexOf("d") !== -1) {
retention_number.attr('placeholder', '$T('days').capitalize()')
if(retention_number.val()) {
retention_setting.val(retention_number.val() + 'd')
} else if(parseInt(retention_setting.val()) > 0) {
retention_number.val(parseInt(retention_setting.val()))
}
} else {
retention_number.attr('placeholder', '$T('history_retention-limit')')
if(retention_number.val()) {
retention_setting.val(retention_number.val())
} else if(parseInt(retention_setting.val()) > 0) {
retention_number.val(parseInt(retention_setting.val()))
}
}
}
}
// Set the history-retention settig
var retention_setting_value = \$('#history_retention').val()
if(parseInt(retention_setting_value) > 0) {
// Days or number?
if(retention_setting_value.indexOf("d") !== -1) {
\$('#history_retention_select').val("d")
} else {
\$('#history_retention_select').val("n")
}
\$('#history_retention_number').val(parseInt(retention_setting_value))
} else {
// Keep all or keep none
\$('#history_retention_select').val(retention_setting_value)
\$('#history_retention_number').hide()
}
updateHistoryRetention()
\$('.restoreDefaults').click(function(e) {
jQuery('.restoreDefaults').click(function(e) {
// Get section name
var sectionName = \$(this).parents('.section').find('.col2 h3').text().trim()
var sectionName = jQuery(this).parents('.section').find('.col2 h3').text().trim()
// Confirm?
if(!confirm("$T('explain-restoreDefaults') \""+sectionName+"\"\n$T('confirm')")) return false
@@ -548,14 +388,14 @@
// Need to get all the input values, so same way as saving normally
var key_container = {}
\$(this).parents('.section').extractFormDataTo(key_container);
jQuery(this).parents('.section').extractFormDataTo(key_container);
key_container = Object.keys(key_container)
// Send request
\$.ajax({
type: "GET",
url: "../../api",
data: "mode=set_config_default&apikey=${apikey}&output=json&keyword=" + key_container.join('&keyword=')
jQuery.ajax({
type: "POST",
url: "$url('api')",
data: "mode=set_config_default&output=json&keyword=" + key_container.join('&keyword=')
}).then(function(data) {
// Reload page
document.location = document.location
+24 -24
View File
@@ -1,4 +1,5 @@
<html lang="$active_lang">
<!DOCTYPE HTML>
<html lang="$active_lang" data-color-scheme="$color_scheme">
<head>
<title>SABnzbd - $T('login')</title>
@@ -6,57 +7,56 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1" />
<meta name="apple-mobile-web-app-title" content="SABnzbd" />
<link rel="apple-touch-icon" sizes="76x76" href="../staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="../staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="../staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="../staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="../staticcfg/ico/android-192x192.png" />
<link rel="shortcut icon" href="../staticcfg/ico/favicon.ico?v=$version" />
<link rel="apple-touch-icon" sizes="76x76" href="$url('staticcfg/ico/apple-touch-icon-76x76-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="120x120" href="$url('staticcfg/ico/apple-touch-icon-120x120-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="152x152" href="$url('staticcfg/ico/apple-touch-icon-152x152-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="180x180" href="$url('staticcfg/ico/apple-touch-icon-180x180-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="192x192" href="$url('staticcfg/ico/android-192x192.png', v=$cache_buster)" />
<link rel="shortcut icon" href="$url('staticcfg/ico/favicon.ico', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="../staticcfg/bootstrap/css/bootstrap.min.css?v=$version" />
<link rel="stylesheet" type="text/css" href="../staticcfg/css/login.css?v=$version" />
<link rel="stylesheet" type="text/css" href="$url('staticcfg/bootstrap/css/bootstrap.min.css', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="$url('staticcfg/css/login.css', v=$cache_buster)" />
<script type="text/javascript" src="../staticcfg/js/jquery-3.5.1.min.js?v=$version"></script>
<script type="text/javascript" src="../staticcfg/bootstrap/js/bootstrap.min.js?v=$version"></script>
<script type="text/javascript" src="$url('staticcfg/js/jquery-3.7.1.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/bootstrap/js/bootstrap.min.js', v=$cache_buster)"></script>
</head>
<html>
<body>
<div class="account-wall">
<div class="text-center logo-header">
<!--#include $webdir + "/staticcfg/images/logo-full.svg"#-->
<a href="https://sabnzbd.org/wiki/faq#why-login" target="_blank">
<span class="glyphicon glyphicon-question-sign"></span>
<a href="https://sabnzbd.org/wiki/faq#why-login" target="_blank" aria-label="$T('menu-help')">
<span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span>
</a>
</div>
<form class="form-signin" action="./" method="post">
<form class="form-signin" action="./login" method="post">
<!--#if $error#-->
<div class="alert alert-danger" role="alert">$error</div>
<!--#end if#-->
<input type="text" class="form-control" name="username" placeholder="$T('srv-username')" required autofocus>
<input type="password" class="form-control" name="password" placeholder="$T('srv-password')" required>
<input type="text" class="form-control" name="username" placeholder="$T('srv-username')" aria-label="$T('srv-username')" autocomplete="username" required autofocus>
<input type="password" class="form-control" name="password" placeholder="$T('srv-password')" aria-label="$T('srv-password')" autocomplete="current-password" required>
<button class="btn btn-default"><span class="glyphicon glyphicon-circle-arrow-right"></span> $T('login') </button>
<div class="checkbox text-center" data-toggle="tooltip" data-placement="bottom" title="$T('explain-sessionExpire')">
<div class="text-center" data-toggle="tooltip" data-placement="bottom" title="$T('explain-sessionExpire')">
<label>
<input type="checkbox" name="remember_me" value="1"> $T('rememberme')
$T('rememberme') <input type="checkbox" name="remember_me" value="1">
</label>
</div>
</form>
</div>
<script type="text/javascript">
// Tooltip
\$('[data-toggle="tooltip"]').tooltip()
jQuery('[data-toggle="tooltip"]').tooltip()
// Try-catch in case somebody disabled localstorage
try {
// Set what was done previously
\$('input[type="checkbox"]').prop('checked', localStorage.getItem("remember_me") === 'true')
jQuery('input[type="checkbox"]').prop('checked', localStorage.getItem("remember_me") === 'true')
// Store if we change something
\$('input[type="checkbox"]').on('change', function() {
localStorage.setItem("remember_me", \$(this).is(':checked'));
jQuery('input[type="checkbox"]').on('change', function() {
localStorage.setItem("remember_me", jQuery(this).is(':checked'));
})
} catch(err) { }
</script>
</body>
</html>
</html>
@@ -1,15 +1,32 @@
:root {
/* Follow the OS by default (Auto); forced by data-color-scheme below */
color-scheme: light dark;
/* Color palette — light-dark(light value, dark value) */
--clr-page-bg: light-dark(#E4E4E4, black);
--clr-surface: light-dark(#FFFFFF, #303030);
--clr-input-bg: light-dark(#FFFFFF, #555555);
--clr-border: light-dark(rgba(0, 0, 0, 0.15), #555555);
--clr-text: light-dark(#000000, #EBEBEB);
--clr-text-muted: light-dark(#636363, #c7c7c7);
--radius-lg: 8px;
--clr-toggle-active: #f9ca33;
--clr-toggle-inactive: light-dark(#aaaaaa, #666666);
}
/* The server renders the configured scheme into this attribute; empty/unknown = Auto */
html[data-color-scheme="light" i] {
color-scheme: light;
}
html[data-color-scheme="night" i] {
color-scheme: dark;
}
body {
overflow-y: scroll;
background-color: #E4E4E4;
}
* {
border-radius: 0 !important;
}
.btn, .btn:hover, .btn:active, .btn:focus {
box-shadow: 1px 1px 1px rgba(0,0,0,.1) !important;
background-color: white !important;
background-color: var(--clr-page-bg);
color: var(--clr-text);
}
.logo-header {
@@ -22,38 +39,55 @@ body {
}
.account-wall {
width: 300px;
width: 400px;
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -30%);
transform: translate(-50%, -30%);
background-color: var(--clr-surface);
border: 1px solid var(--clr-border);
border-radius: var(--radius-lg);
padding: 25px 40px 15px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.text-center a {
position: absolute;
right: 13px;
top: 12px;
color: #636363;
color: var(--clr-text-muted);
font-size: 1.2em
}
.text-center a:hover {
color: black !important;
color: var(--clr-text);
}
.form-signin .alert {
margin: 5px 0px;
}
.form-signin input {
margin-top: 5px
}
.form-signin input,
.form-signin .btn {
background-color: var(--clr-input-bg);
color: var(--clr-text);
border-color: light-dark(#ccc, #252525);
}
.form-signin .btn {
width: 100%;
margin-top: 10px;
font-weight: bold;
box-shadow: 1px 1px 1px light-dark(transparent, rgba(255, 255, 255, .1));
}
::placeholder {
color: var(--clr-text) !important;
opacity: 0.5;
}
.btn .glyphicon {
@@ -63,12 +97,109 @@ body {
font-size: 1.2em;
}
input[type="checkbox"] {
width: 16px;
height: 16px;
margin-top: 2px;
/* Toggle switch — text on the left, switch on the right */
label {
margin-top: 10px;
color: var(--clr-text-muted);
}
label {
color: #636363;
}
input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
position: relative;
top: 5px;
left: 5px;
width: 36px;
height: 20px;
background-color: var(--clr-toggle-inactive);
background-image:
radial-gradient(circle at 10px 10px, #ffffff 6.5px, rgba(255,255,255,0) 7px),
radial-gradient(circle at 11px 11px, rgba(0,0,0,0.30) 6.5px, transparent 9.5px);
background-size: 20px 20px;
background-repeat: no-repeat;
background-position: 0px center;
border-radius: 10px;
border: none;
cursor: pointer;
transition: background-color 0.2s, background-position 0.15s;
}
input[type="checkbox"]:checked {
background-color: var(--clr-toggle-active);
background-position: 16px center;
background-image:
radial-gradient(circle at 10px 10px, #ffffff 6.5px, rgba(255,255,255,0) 7px),
radial-gradient(circle at 10.5px 10.5px, rgba(0,0,0,0.30) 6.5px, transparent 9.5px);
}
input[type="checkbox"]:focus-visible {
outline: 2px solid var(--clr-toggle-active);
outline-offset: 2px;
border-radius: 10px;
}
/***
Dark-mode structural rules
Colors live in the light-dark() tokens above; these are the rules that cannot
be expressed as a color value. The two blocks below MUST stay identical:
the first applies when Night is forced, the second when the OS is dark and Light is not forced.
***/
html[data-color-scheme="night" i] {
/* Focus / active border */
.form-signin input:focus,
.form-signin .btn:focus {
border-color: #707070 !important;
outline: initial !important;
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
}
.text-center a,
.text-center a:hover {
color: var(--clr-text);
}
/* Tooltip — inverted (light tooltip on dark page) */
.tooltip-inner {
background-color: #E4E4E4 !important;
color: #000 !important;
}
.tooltip.bottom .tooltip-arrow {
border-bottom-color: #E4E4E4 !important;
}
.tooltip.top .tooltip-arrow {
border-top-color: #E4E4E4 !important;
}
}
@media (prefers-color-scheme: dark) {
html:not([data-color-scheme="light" i]) {
/* Focus / active border */
.form-signin input:focus,
.form-signin .btn:focus {
border-color: #707070 !important;
outline: initial !important;
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
}
.text-center a,
.text-center a:hover {
color: var(--clr-text);
}
/* Tooltip — inverted (light tooltip on dark page) */
.tooltip-inner {
background-color: #E4E4E4 !important;
color: #000 !important;
}
.tooltip.bottom .tooltip-arrow {
border-bottom-color: #E4E4E4 !important;
}
.tooltip.top .tooltip-arrow {
border-top-color: #E4E4E4 !important;
}
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
@@ -60,6 +60,7 @@
// Initialize
this.element = $(element);
this.initialDir = null;
this.showFiles = false;
this.currentBrowserPath = null;
this.currentRequest = null;
this.fileBrowserDialog = $('#filebrowser_modal .modal-body');
@@ -99,6 +100,11 @@
this.initialDir = this.element.data('initialdir') + folderSeperator + this.element.val();
}
// Are we selecting files or folders
if(this.element.data('files')) {
this.showFiles = true
}
// Browse
this.browse(this.initialDir , folderBrowseUrl);
@@ -109,13 +115,13 @@
// Remove start
self.currentBrowserPath = self.currentBrowserPath.replace(self.element.data('initialdir')+folderSeperator, '');
// If it's identical to the initial dir the replacement won't work
if(self.currentBrowserPath == self.element.data('initialdir')) {
if(self.currentBrowserPath === self.element.data('initialdir')) {
self.currentBrowserPath = '';
}
}
// Changed?
if(self.element.val() != self.currentBrowserPath) {
if(self.element.val() !== self.currentBrowserPath) {
self.element.val(self.currentBrowserPath);
formHasChanged = true;
}
@@ -144,12 +150,20 @@
// Still loading
if (this.currentRequest) this.currentRequest.abort();
// Show hidden folders on Linux?
var extraHidden = $('#show_hidden_folders').is(':checked') ? '&show_hidden_folders=1' : '';
// Show hidden folders
var params = { name: path}
if($('#show_hidden_folders').is(':checked')) {
params['show_hidden_folders'] = "1"
}
// Show files?
if(this.showFiles) {
params['show_files'] = "1"
}
// Get current folders
this.currentBrowserPath = path;
this.currentRequest = $.getJSON(endpoint + extraHidden, { name: path }, function (data) {
this.currentRequest = $.getJSON(endpoint, params, function (data) {
// Clean
self.fileBrowserDialog.empty();
@@ -157,17 +171,27 @@
var list = $('<div class="list-group">').appendTo(self.fileBrowserDialog);
$.each(data.paths, function (i, entry) {
// Title for first one
if(i == 0) {
if(i === 0) {
self.fileBrowserDialog.prepend($('<h4>').text(entry.current_path))
return
}
// Regular link
link = $('<a class="list-group-item" href="javascript:void(0)" />').click(function () {
self.browse(entry.path, endpoint); }
).text(entry.name);
// Are we looking for files and did we select a file?
if(self.showFiles && !entry.dir) {
// Trigger selection
self.currentBrowserPath = entry.path
$('#filebrowser_modal_accept').click()
} else {
self.browse(entry.path, endpoint);
}
}).text(entry.name);
// Back image
if(entry.name == '..') {
if(entry.name === '..') {
$('<span class="glyphicon glyphicon-arrow-left"></span> ').prependTo(link);
} else if(!entry.dir) {
$('<span class="glyphicon glyphicon-file"></span> ').prependTo(link);
} else {
$('<span class="glyphicon glyphicon-folder-open"></span> ').prependTo(link);
}
@@ -203,7 +227,12 @@ $.fn.extractFormDataTo = function(target) {
var selects = $("select", this);
selects.each(function (i,elem) {
target[elem.name] = elem.value;
if (elem.selectedOptions.length > 1) {
// Handle <select multiple="multiple">
target[elem.name] = Array.from(elem.selectedOptions).map(({ value }) => value).toString();
} else {
target[elem.name] = elem.value;
}
});
return this;
@@ -214,8 +243,13 @@ $.fn.extractFormDataTo = function(target) {
*
* (c) 2015 SABnzbd Team, Inc. All rights reserved.
*/
$.ajaxSetup({
headers: { "X-SABnzbd-CSRF": csrfToken }
});
function config_success() {
$('.saveButton').each(function () {
$('.saveButton[disabled=disabled]').each(function () {
$(this).removeAttr("disabled").html('<span class="glyphicon glyphicon-ok"></span> '+configTranslate.saveChanges);
});
// Let us leave!
@@ -223,7 +257,7 @@ function config_success() {
formHasChanged = false;
}
function config_failure() {
$('.saveButton').each(function () {
$('.saveButton[disabled=disabled]').each(function () {
$(this).removeAttr("disabled").addClass('btn-danger').html('<span class="glyphicon glyphicon-remove"></span> '+configTranslate.failed);
});
// Can't go yet..
@@ -233,8 +267,9 @@ function do_restart() {
// Show overlay
$('.main-restarting').show()
// What template
var switchedHTTPS = ($('#enable_https').is(':checked') == ($('#enable_https').data('original') === undefined))
// Check if we need redirect
// Uses == on purpose, because val() returns string and data() returns int!
var switchedHTTPS = ($('#enable_https').is(':checked') === ($('#enable_https').data('original') === undefined))
var portsUnchanged = ($('#port').val() == $('#port').data('original')) && ($('#https_port').val() == $('#https_port').data('original'))
// Are we on settings page or did nothing change?
@@ -243,7 +278,7 @@ function do_restart() {
var urlTotal = window.location.origin + urlBase
} else {
// Protocol and port depend on http(s) setting
if($('#enable_https').is(':checked') && (window.location.protocol == 'https:' || !$('#https_port').val())) {
if($('#enable_https').is(':checked') && (window.location.protocol === 'https:' || !$('#https_port').val())) {
// Https on and we visited this page from HTTPS
var urlProtocol = 'https:';
var urlPort = $('#https_port').val() ? $('#https_port').val() : $('#port').val();
@@ -261,7 +296,7 @@ function do_restart() {
$('.main-restarting .restarting-url').text(urlTotal)
// Initiate restart
$.ajax({ url: '../../api?mode=restart&apikey=' + sabSession,
$.ajax({ url: rootURL + 'api?mode=restart', type: 'POST',
complete: function() {
// Keep counter of failures
var loopCounter = 0;
@@ -292,7 +327,7 @@ function do_restart() {
// Exception if we go from HTTPS to HTTP
// (this is not allowed by browsers and all of the above will be ignored)
if(window.location.protocol != urlProtocol) {
if(window.location.protocol !== urlProtocol) {
// Saftey redirect after 20 sec
setTimeout(function() {
location.href = urlTotal;
@@ -302,7 +337,7 @@ function do_restart() {
});
}
// Remove obfusication
// Remove obfuscation
function removeObfuscation() {
$('input[data-hide]').each(function(index, objInput) {
$(objInput).attr('name', $(objInput).data('hide'))
@@ -310,15 +345,39 @@ function removeObfuscation() {
return true
}
// Add coloring to rows (shorthand function)
function addRowColor() {
// Have to do it seperate for each section
$('.section').each(function(i, elmn) {
$(elmn).find('.field-pair:visible').removeClass('even').filter(':even').addClass('even')
})
}
// Set default functions for the autocomplete everywhere
jQuery.extend(jQuery.fn.typeahead.defaults, {
source: function (query, process) {
// If there's no separator, it must be a relative path
if(query.split(folderSeperator).length < 2 && this.$element.data('initialdir')) {
query = this.$element.data('initialdir') + folderSeperator + query;
}
var params = { compact: "1", name: query }
if($('#show_hidden_folders').is(':checked')) {
params['show_hidden_folders'] = "1"
}
if(this.$element.data('files')) {
params['show_files'] = "1"
}
// Get info from the API
return jQuery.get(folderBrowseUrl, params, function (data) {
return process(data["paths"]);
});
},
updater: function(item) {
// Is it a relative path?
if(item.indexOf(this.$element.data('initialdir')) === 0) {
// Remove start
return item.replace(this.$element.data('initialdir') + folderSeperator, '');
}
// Full path
return item
}
})
$(document).ready(function () {
$('form').append('<input type="hidden" name="csrf_token" value="' + csrfToken + '">');
/**
Restart function
**/
@@ -345,12 +404,13 @@ $(document).ready(function () {
datatype: 'json',
// But first remove Obfuscation!
beforeSerialize: removeObfuscation,
beforeSubmit: function () {
$('.saveButton').each(function () {
beforeSubmit: function (arr, form, options) {
// Only in the current form
form.find('.saveButton').each(function () {
$(this).attr("disabled", "disabled").removeClass('btn-danger').html('<span class="glyphicon glyphicon-transfer"></span> ' + configTranslate.saving);
});
},
success: function (json) {
success: function (json, statusText, xhr, form) {
if (json.error) {
$('#config_err_msg').text(json.error);
alert(json.error)
@@ -364,6 +424,12 @@ $(document).ready(function () {
$('#config_err_msg').text(" ");
setTimeout(config_success, 1000);
}
} else if(form && form.is('[data-reload-on-save]')) {
// Values changed that are rendered by the server, so reload the page
$('#config_err_msg').text(" ");
formWasSubmitted = true;
formHasChanged = false;
location.reload();
} else {
$('#config_err_msg').text(" ");
setTimeout(config_success, 1000);
@@ -407,7 +473,7 @@ $(document).ready(function () {
$('input[type="checkbox"]').parents('label').addClass('config-hover')
// Disable sections
var checkDisabled = '#rating_enable, #enable_tv_sorting, #enable_movie_sorting, #enable_date_sorting'
var checkDisabled = '#enable_tv_sorting, #enable_movie_sorting, #enable_date_sorting'
$(checkDisabled).on('change', function() {
$(this).parent().nextAll().toggleClass('disabled')
@@ -421,14 +487,16 @@ $(document).ready(function () {
$('.advanced-button').on('change', function(event){
localStorage.setItem('advanced-settings', !$('.advanced-settings').is(':visible'))
$('.advanced-settings').toggle()
addRowColor()
})
if(localStorage.getItem('advanced-settings') == 'true') {
if(localStorage.getItem('advanced-settings') === 'true') {
$('.advanced-settings').show()
$('#advanced-settings-button').prop('checked', true)
addRowColor()
}
addRowColor()
// Add tooltips
// Render tooltips in the body, otherwise they get clipped by sections with overflow: hidden
jQuery.fn.tooltip.Constructor.DEFAULTS.container = 'body'
jQuery('[title]').tooltip()
});
/*
@@ -448,16 +516,56 @@ var pagesContainer = new Array(arrPages.length);
// Add trigger to focus on the field and load the results
$(document).ready(function() {
$('#search-menu').on('shown.bs.dropdown', function(event) {
setConfigSearchExpanded(true)
// Focus so easy typing
$('#search-box').focus()
// Load things to search if we haven't yet
if(!pagesContainer[0]) {
$.each(arrPages, function(index, page) {
$.get(rootURL + 'config/' + page + '/', function(data) {
$.get(rootURL + 'config/' + page, function(data) {
pagesContainer[index] = $(data).find('label')
});
});
}
}).on('hidden.bs.dropdown', function(event) {
setConfigSearchExpanded(false)
});
$('#search-box').on('keydown', function(event) {
var key = event.key || event.which;
var isArrowDown = key === 'ArrowDown' || key === 40;
var isArrowUp = key === 'ArrowUp' || key === 38;
var isEscape = key === 'Escape' || key === 'Esc' || key === 27;
if(isArrowDown || isArrowUp) {
event.preventDefault();
event.stopPropagation();
focusConfigSearchResult(isArrowDown ? 1 : -1)
} else if(isEscape) {
event.preventDefault();
event.stopPropagation();
closeConfigSearch()
}
});
$('#search-dropdown').on('keydown', 'a.config-search-result', function(event) {
var key = event.key || event.which;
var isArrowDown = key === 'ArrowDown' || key === 40;
var isArrowUp = key === 'ArrowUp' || key === 38;
var isEscape = key === 'Escape' || key === 'Esc' || key === 27;
if(isArrowDown || isArrowUp) {
event.preventDefault();
event.stopPropagation();
focusConfigSearchResult(isArrowDown ? 1 : -1)
} else if(isEscape) {
event.preventDefault();
event.stopPropagation();
closeConfigSearch()
}
}).on('mouseenter focus', 'a.config-search-result', function() {
getConfigSearchResults().parent().removeClass('active')
$(this).parent().addClass('active')
});
// For the scrolling
@@ -483,11 +591,46 @@ $(document).ready(function() {
// Don't go too fast
var searchTimeout
function getConfigSearchResults() {
return $('#search-dropdown').find('a.config-search-result')
}
function setConfigSearchExpanded(expanded) {
$('#search-menu > a[data-toggle="dropdown"]').attr('aria-expanded', expanded ? 'true' : 'false')
}
function closeConfigSearch() {
$('#search-menu').removeClass('open')
setConfigSearchExpanded(false)
$('#search-box').focus()
}
function focusConfigSearchResult(offset) {
var $results = getConfigSearchResults()
var activeIndex = $results.index(document.activeElement)
var nextIndex
if(!$results.length) return
if(activeIndex < 0) {
nextIndex = offset > 0 ? 0 : $results.length - 1
} else {
nextIndex = activeIndex + offset
if(nextIndex >= $results.length) nextIndex = 0
if(nextIndex < 0) nextIndex = $results.length - 1
}
getConfigSearchResults().parent().removeClass('active')
$results.eq(nextIndex).parent().addClass('active')
$results.eq(nextIndex).focus()
}
function doConfigSearch(value) {
// Cancel previous
clearTimeout(searchTimeout)
// Build new search
var searchTerm = $(value).val().replace('"', '\"')
var searchTerm = $.trim($(value).val())
var searchOutput = $('#search-dropdown')
// Build new search
@@ -498,14 +641,24 @@ function doConfigSearch(value) {
if (searchTerm.length < 2) return
// Find some results!
$.each(pagesContainer, function(page_index, results) {
if(!results) return
// Get the matches
var subResults = results.filter(':contains("'+searchTerm+'")')
var subResults = results.filter(function() {
return $(this).text().toUpperCase().indexOf(searchTerm.toUpperCase()) >= 0
})
if(subResults.length > 0) {
// Add the section
searchOutput.append('<li class="divider"></li>')
searchOutput.append('<li class="dropdown-header">'+configTranslate.searchPages[page_index]+'</li>')
searchOutput.append($('<li class="divider"></li>'))
searchOutput.append($('<li class="dropdown-header"></li>').text(configTranslate.searchPages[page_index]))
$.each(subResults, function(index, result) {
searchOutput.append('<li><a href="'+rootURL + 'config/' + arrPages[page_index] + '/#' + $(result).attr('for') +'">'+$(result).text()+'</a></li>')
var resultUrl = rootURL + 'config/' + arrPages[page_index] + '#' + $(result).attr('for')
searchOutput.append(
$('<li></li>').append(
$('<a class="config-search-result"></a>')
.attr('href', resultUrl)
.text($(result).text())
)
)
})
}
})
+2 -2
View File
@@ -9,7 +9,7 @@ BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE B
1. Definitions
1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("syncing") will be considered an Adaptation for the purpose of this License.
2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
@@ -44,7 +44,7 @@ The above rights may be exercised in all media and formats whether now known or
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+82 -129
View File
@@ -1,25 +1,39 @@
<div class="history" id="history-tab" data-bind="visible: hasHistory() || displayTabbed()" style="display: none">
<h2>$T('menu-history')</h2>
<table class="table table-hover history-table paginated">
<div class="history" id="history-tab">
<div class="history-header">
<h2>$T('menu-history') <small data-bind="visible: history.showArchive()">($T('archive'))</small></h2>
<a href="#" aria-label="$T('Glitter-multiOperations')" data-bind="click: history.showMultiEdit, visible: hasHistory()">
<span class="glyphicon glyphicon-tasks" data-tooltip="true" data-placement="left" title="$T('Glitter-multiOperations')"></span>
</a>
</div>
<table class="table table-hover history-table paginated" aria-label="$T('menu-history')">
<thead>
<tr>
<th style="width: 25px;"></th>
<th></th>
<th class="table-status-header" data-bind="css: { 'table-header-status-smaller' : extraHistoryColumns().length }"></th>
<th scope="col" style="width: 25px;"><span class="sr-only">$T('Glitter-result')</span></th>
<th scope="col"><span class="sr-only">$T('name')</span></th>
<th class="table-status-header" scope="col" data-bind="css: { 'table-header-status-smaller' : extraHistoryColumns().length || displayCompact() }"><span class="sr-only">$T('status')</span></th>
<!-- ko foreach: extraHistoryColumns -->
<th class="table-header-extra"></th>
<th class="table-header-extra" scope="col"><span class="sr-only" data-bind="text: glitterTranslate.column[\$data]"></span></th>
<!-- /ko -->
<th style="width: 130px;"></th>
<th style="width: 60px;"></th>
<th scope="col" style="width: 130px;"><span class="sr-only">$T('post-Completed')</span></th>
<th scope="col" style="width: 60px;"><span class="sr-only">$T('Glitter-actions')</span></th>
</tr>
</thead>
<tbody data-bind="foreach: history.historyItems">
<!-- ko if: !hasHistory() -->
<tbody class="no-downloads">
<tr>
<td colspan="6" data-bind="attr: { 'colspan': 5 + extraHistoryColumns().length }">
<span>$T('empty')</span>
</td>
</tr>
</tbody>
<!-- /ko -->
<tbody data-bind="foreach: history.historyItems, visible: hasHistory()" style="display: none;">
<tr class="history-item" data-bind="css: {'history-failed-download':failed()}">
<td>
<div data-bind="visible: processingWaiting()">
<span class="glyphicon glyphicon-time"></span>
<div role="img" aria-label="$T('post-Queued')" data-bind="visible: processingWaiting()">
<span class="glyphicon glyphicon-time" aria-hidden="true"></span>
</div>
<div data-bind="visible: processingDownload()">
<div role="img" aria-label="$T('stage-download')" data-bind="visible: processingDownload()">
<div class="processing-download">
<div class="loader-bar-one"></div>
<div class="loader-bar-two"></div>
@@ -27,116 +41,25 @@
<div class="loader-bar-four"></div>
</div>
</div>
<div data-bind="visible: (!failed() && !processingDownload() && !processingWaiting())">
<span class="glyphicon glyphicon-ok"></span>
<div role="img" aria-label="$T('post-Completed')" data-bind="visible: (!failed() && !processingDownload() && !processingWaiting())">
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
</div>
<div data-bind="visible: failed() && canRetry()">
<a class="retry-button" href="#" data-bind="click: retry">
<span class="glyphicon glyphicon-exclamation-sign"></span>
<a class="retry-button" href="#" aria-label="$T('button-retry')" data-bind="click: retry">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
</a>
</div>
<div data-bind="visible: failed() && !canRetry()">
<span class="retry-button-inactive">
<span class="glyphicon glyphicon-exclamation-sign"></span>
<span class="retry-button-inactive" role="img" aria-label="$T('post-Failed')">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
</span>
</div>
</td>
<td class="name" data-bind="css: { 'name-has-ratings' : historyStatus.has_rating }">
<td class="name">
<div class="row-wrap-text">
<a class="retry-buttontext" href="#" data-bind="visible: (failed() && canRetry()), click: retry">$T('button-retry')</a>
<span data-bind="text: historyStatus.name, attr: { 'title': historyStatus.name() }"></span>
</div>
<!-- ko if: historyStatus.has_rating -->
<div class="dropdown history-ratings">
<a href="#" class="name-icons hover-button" data-toggle="dropdown" onclick="keepOpen(this)">
<span class="glyphicon glyphicon-thumbs-up"></span> <span data-bind="text: historyStatus.rating_avg_vote_up"></span>
<span class="glyphicon glyphicon-thumbs-down"></span> <span data-bind="text: historyStatus.rating_avg_vote_down"></span>
</a>
<ul class="dropdown-menu history-ratings-menu">
<li>
<form class="history-ratings-basic">
<label>
<input type="radio" value="up" data-bind="attr: { 'name': 'ratings-status-'+nzo_id, 'checked': historyStatus.rating_user_vote() == 1 }, event: { change: setUserVote }" />
<span class="glyphicon glyphicon-thumbs-up"></span>
<span data-bind="text: historyStatus.rating_avg_vote_up"></span>
</label>
<label>
<input type="radio" value="down" data-bind="attr: { 'name': 'ratings-status-'+nzo_id, 'checked': historyStatus.rating_user_vote() == 2 }, event: { change: setUserVote }" />
<span class="glyphicon glyphicon-thumbs-down"></span>
<span data-bind="text: historyStatus.rating_avg_vote_down"></span>
</label>
<label>
<span class="glyphicon glyphicon-facetime-video"></span>
<select name="ratings-video" data-bind="value: historyStatus.rating_user_video, event: { change: setUserRating }, disable: historyStatus.rating_user_video">
<option value="">&nbsp;</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</label>
<label>
<span class="glyphicon glyphicon-volume-up"></span>
<select name="ratings-audio" data-bind="value: historyStatus.rating_user_audio, event: { change: setUserRating }, disable: historyStatus.rating_user_audio">
<option value="">&nbsp;</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</label>
<!-- ko if: historyStatus.url_info -->
<a href="#" target="_blank" data-bind="attr: { 'href':historyStatus.url_info }" title="$T('Glitter-openInfoURL')"><span class="glyphicon glyphicon-globe"></span></a>
<!-- /ko -->
</form>
</li>
<li class="divider"></li>
<li>
<form class="history-ratings-report" data-bind="submit: setUserReport">
<strong>$T('report')</strong>
<br />
<label>
<input type="radio" name="rating_flag" value="spam" /> $T('spam')
</label>
<br />
<label>
<input type="radio" name="rating_flag" value="encrypted" /> $T('encrypted')
</label>
<br />
<label>
<input type="radio" name="rating_flag" value="expired" /> $T('expired')
<select name="ratings-report-expired-server" class="ratings-report-hidden form-control" data-bind="options: \$parent.servers, optionsText: 'host', optionsValue: 'host', optionsCaption: '$T('nzo-all')'"></select>
</label>
<br />
<label>
<input type="radio" name="rating_flag" value="other" /> $T('otherProblem')
<input type="text" class="form-control ratings-report-hidden" name="ratings-report-other" />
</label>
<br />
<label>
<input type="radio" name="rating_flag" value="comment" /> $T('comment')
<input type="text" class="form-control ratings-report-hidden" name="ratings-report-comment" />
</label>
<br />
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> $T('send')</button>
</form>
</li>
</ul>
</div>
<!-- /ko -->
</td>
<td class="status row-wrap-text" data-bind="text: statusText()" onclick="showDetails(this)"></td>
<!-- ko foreach: parent.parent.extraHistoryColumns -->
@@ -146,8 +69,11 @@
<!-- /ko -->
<td class="history-completedon row-wrap-text" data-bind="text: completedOn(), attr: { 'data-timestamp': completed }" onclick="showDetails(this)"></td>
<td class="delete">
<div class="dropdown">
<a href="#" data-toggle="dropdown" data-bind="click: updateAllHistoryInfo">
<label data-bind="visible: parent.isMultiEditing()">
<input type="checkbox" name="multiedit" title="$T('Glitter-multiSelect')" aria-label="$T('Glitter-selectJob')" data-bind="click: parent.addMultiEdit, attr: { 'id': 'multiedit_' + id } " />
</label>
<div class="dropdown" data-bind="visible: !parent.isMultiEditing()">
<a href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="$T('nzoDetails')" data-bind="click: updateAllHistoryInfo">
<span class="caret"></span>
</a>
<!-- ko if: hasDropdown() -->
@@ -157,13 +83,19 @@
<div class="col-sm-2">$T('name')</div>
<div class="col-sm-10" data-bind="text: historyStatus.name"></div>
</div>
<div class="row" data-bind="visible: historyStatus.time_added">
<div class="col-sm-2">$T('rss-added')</div>
<div class="col-sm-10" data-bind="text: timeAdded(), attr: { 'data-timestamp': historyStatus.time_added }"></div>
</div>
<div class="row">
<div class="col-sm-2">$T('post-Completed')</div>
<div class="col-sm-10" data-bind="text: completedOn, attr: { 'data-timestamp': completed }"></div>
</div>
<div class="row">
<div class="col-sm-2">$T('status')</div>
<div class="col-sm-10" data-bind="text: glitterTranslate.status[historyStatus.status()] ? glitterTranslate.status[historyStatus.status()] : statusText()"></div>
<div class="col-sm-10">
<span data-bind="text: glitterTranslate.status[historyStatus.status()] ? glitterTranslate.status[historyStatus.status()] : statusText()"></span>
</div>
</div>
<div class="row">
<div class="col-sm-2">$T('size')</div>
@@ -177,7 +109,7 @@
<div class="col-sm-2">$T('srv-password')</div>
<div class="col-sm-10" data-bind="text: historyStatus.password"></div>
</div>
<div class="row">
<div class="row" data-bind="visible: historyStatus.storage() || historyStatus.path()">
<div class="col-sm-2">$T('msg-path')</div>
<div class="col-sm-10" data-bind="text: historyStatus.storage() == '' ? historyStatus.path : historyStatus.storage"></div>
</div>
@@ -187,11 +119,14 @@
<div class="col-sm-10 history-status-modallink" data-bind="longText: actions, longTextType: name()"></div>
</div>
<!-- /ko -->
<div class="col-sm-12 text-right" data-bind="visible: failed()">
<a href="#" class="btn btn-default mark-completed-btn" data-bind="click: markAsCompleted"><span class="glyphicon glyphicon-ok"></span> $T('button-mark-completed')</a>
</div>
</div>
</div>
<!-- /ko -->
</div>
<a href="#" data-bind="click: deleteSlot">
<a href="#" data-bind="click: parent.triggerRemoveDownload, attr: { 'aria-label': processingDownload() == 2 ? '$T('abort')' : '$T('nzo-delete')' }">
<span class="hover-button glyphicon glyphicon-trash" data-bind="css: { 'glyphicon-stop' : processingDownload() == 2, disabled : processingDownload() == 1 }, attr: { title: processingDownload() == 2 ? '$T('abort')' : '$T('nzo-delete')' }"></span>
</a>
</td>
@@ -199,23 +134,45 @@
</tbody>
</table>
<div class="history-footer">
<div class="input-group search-box">
<input type="text" class="form-control" placeholder="$T('Glitter-search')" required data-bind="textInput: history.searchTerm, event: { keydown: history.clearSearchTerm }" />
<a data-bind="event: { mousedown: history.clearSearchTerm }">
<input type="text" class="form-control" placeholder="$T('Glitter-search')" aria-label="$T('Glitter-search')" required data-bind="textInput: history.searchTerm, event: { keydown: history.clearSearchTerm }" />
<a href="#" data-tooltip="true" data-html="true" data-placement="right" title="$T('Glitter-searchExplain')" data-bind="click: history.clearSearchTerm, attr: { 'aria-label': history.searchTerm() ? '$T('Glitter-clearSearch')' : '$T('Glitter-search')' }">
<span class="glyphicon" data-bind="css: { 'glyphicon-search' : !history.searchTerm(), 'glyphicon-remove' : history.searchTerm() }"></span>
</a>
</div>
<ul class="pagination" data-bind="foreach: history.pagination.allpages(), visible: history.pagination.hasPagination" style="display: none;">
<li data-bind="css: { active: isCurrent, disabled: isDots }, click: onclick">
<span data-bind="text: page"></span>
<li data-bind="css: { active: isCurrent, disabled: isDots }">
<!-- ko ifnot: isDots -->
<a href="#" data-bind="text: page, click: onclick, attr: { 'aria-current': isCurrent ? 'page' : null }"></a>
<!-- /ko -->
<!-- ko if: isDots -->
<span aria-hidden="true" data-bind="text: page"></span>
<!-- /ko -->
</li>
</ul>
<div class="multioperations-selector" id="history-options">
<a href="#" class="hover-button" title="$T('link-retryAll')" data-tooltip="true" data-placement="left" data-bind="click: history.retryAllFailed"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="hover-button" title="$T('showAllHis') / $T('showFailedHis')" data-tooltip="true" data-placement="left" data-bind="click: history.toggleShowFailed, css: { 'history-options-show-failed': history.showFailed }"><span class="glyphicon glyphicon-exclamation-sign"></span></a>
<a href="#modal-purge-history" class="hover-button" title="$T('purgeHist')" data-toggle="modal" data-tooltip="true" data-placement="left"><span class="glyphicon glyphicon-trash"></span></a>
<a href="#" class="hover-button history-archive" title="$T('showArchive') / $T('showAllHis')" data-tooltip="true" data-placement="top" data-bind="click: history.toggleShowArchive, css: { 'history-options-show-failed': history.showArchive }"><svg viewBox="6 6 36 36" height="14" width="14" class="archive-icon"><path d="M41.09 10.45l-2.77-3.36c-.56-.66-1.39-1.09-2.32-1.09h-24c-.93 0-1.76.43-2.31 1.09l-2.77 3.36c-.58.7-.92 1.58-.92 2.55v25c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4v-25c0-.97-.34-1.85-.91-2.55zm-17.09 24.55l-11-11h7v-4h8v4h7l-11 11zm-13.75-25l1.63-2h24l1.87 2h-27.5z"/></svg></a>
<a href="#" class="hover-button" title="$T('showFailedHis') / $T('showAllHis')" data-tooltip="true" data-placement="top" data-bind="click: history.toggleShowFailed, css: { 'history-options-show-failed': history.showFailed }"><span class="glyphicon glyphicon-exclamation-sign"></span></a>
<a href="#" class="hover-button" title="$T('link-retryAll')" data-tooltip="true" data-placement="top" data-bind="click: history.retryAllFailed"><span class="glyphicon glyphicon-repeat"></span></a>
<a href="#" class="hover-button" title="$T('button-mark-completed')" data-bind="visible: (history.isMultiEditing() && hasHistory()), click: history.doMultiMarkCompleted" data-tooltip="true" data-placement="top"><span class="glyphicon glyphicon-ok"></span></a>
<div data-bind="visible: (history.isMultiEditing() && hasHistory())">
<span class="label label-default" data-bind="text: history.multiEditItems().length">0</span>
<label for="multiedit-checkall-history">
<input type="checkbox" name="multieditCheckAll" id="multiedit-checkall-history" title="$T('Glitter-checkAll')" data-bind="click: history.checkAllJobs" data-tooltip="true" data-placement="top" />
</label>
</div>
<a href="#" class="hover-button" title="$T('nzo-delete')" data-bind="visible: (history.isMultiEditing() && hasHistory()), click: history.doMultiDelete" data-tooltip="true" data-placement="top">
<span class="glyphicon glyphicon-trash"></span>
</a>
<a href="#modal-purge-history" class="hover-button" title="$T('purgeHist')" data-bind="visible: !(history.isMultiEditing() && hasHistory())" data-toggle="modal" data-tooltip="true" data-placement="top">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
<div class="info-container history-info">
@@ -224,10 +181,6 @@
<span data-bind="text: history.downloadedMonth"></span>B $T('Glitter-thisMonth')
<span data-bind="text: history.downloadedTotal"></span>B $T('Glitter-total')
</div>
</div><!-- /.history-footer -->
</div>
<div class="info-container history-info" data-bind="visible: !hasHistory() && !displayTabbed()" style="display: none">
<span class="glyphicon glyphicon-save"></span>
<span data-bind="text: history.downloadedToday"></span>B $T('Glitter-today')
<span data-bind="text: history.downloadedMonth"></span>B $T('Glitter-thisMonth')
<span data-bind="text: history.downloadedTotal"></span>B $T('Glitter-total')
</div>
+40 -35
View File
@@ -1,19 +1,19 @@
<nav class="navbar navbar-inverse main-navbar">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-label="$T('Glitter-toggleNavigation')" aria-controls="navbar-collapse" aria-expanded="false">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-logo" href="./">
<a class="navbar-logo" href="$url()" aria-label="SABnzbd $T('menu-queue')">
#include $webdir + "/../../Config/templates/staticcfg/images/logo-small.svg"#
</a>
<div class="btn-group">
<div class="btn-group">
<button type="button" class="btn btn-default navbar-btn" data-bind="click: pauseToggle, attr: { 'title': downloadsPaused() ? '$T('link-resume')' : '$T('link-pause')' }">
<button type="button" class="btn btn-default navbar-btn" data-bind="click: pauseToggle, attr: { 'title': downloadsPaused() ? '$T('link-resume')' : '$T('link-pause')', 'aria-label': downloadsPaused() ? '$T('link-resume')' : '$T('link-pause')' }">
<span class="glyphicon" data-bind="css: { 'glyphicon-play' : downloadsPaused(), 'glyphicon-pause' : !downloadsPaused() }"></span>
</button>
<button type="button" class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown" aria-label="$T('pauseFor')" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@@ -26,7 +26,7 @@
<li class="divider"></li>
<li><a href="#" data-bind="click: openCustomPauseTime">$T('Glitter-custom')</a></li>
</ul>
<span class="btn btn-default navbar-btn navbar-timeleft" data-bind="text: timeLeft" data-toggle="dropdown">0:00</span>
<span class="btn btn-default navbar-btn navbar-timeleft" data-bind="text: timeLeft" data-toggle="dropdown">0:00</span>
</div>
</div>
</div>
@@ -37,18 +37,18 @@
<li class="speedlimit-dropdown dropdown">
<div class="btn-group">
<div class="btn-group">
<button type="button" class="btn btn-default navbar-btn navbar-speed" data-toggle="dropdown">
<button type="button" class="btn btn-default navbar-btn navbar-speed" data-toggle="dropdown" aria-haspopup="true">
<span data-bind="text: speedText">0 KB/s</span>
</button>
<button type="button" class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown" onclick="keepOpen(this)">
<button type="button" class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown" onclick="keepOpen(this)" aria-hidden="true" tabindex="-1">
<span class="caret"></span>
</button>
<a href="#" class="max-speed-input-clear hover-button" data-bind="click: clearSpeedLimit, visible:(speedLimit() != 100)" style="display: none;">
<a href="#" class="max-speed-input-clear hover-button" aria-label="$T('button-clear')" data-bind="click: clearSpeedLimit, visible:(speedLimit() < 100 && speedLimit() > 0)" style="display: none;">
<span class="glyphicon glyphicon-link"></span>
</a>
<div class="dropdown-menu max-speed-input">
<div data-bind="visible: !bandwithLimit()">
<a href="./config/general/#bandwidth_max_value">
<a href="$url('config/general#bandwidth_max_value')">
<span class="glyphicon glyphicon-cog"></span> $T('Glitter-setMaxLinespeed')
</a>
</div>
@@ -61,14 +61,14 @@
</div>
</li>
<li data-tooltip="true" data-placement="bottom" title="$T('Glitter-addNZB')">
<a href="#modal-add-nzb" data-toggle="modal"><span class="glyphicon glyphicon-plus-sign"></span></a>
<a href="#modal-add-nzb" data-toggle="modal" aria-label="$T('Glitter-addNZB')"><span class="glyphicon glyphicon-plus-sign"></span></a>
</li>
<li data-tooltip="true" data-placement="bottom" title="$T('Glitter-statusInterfaceOptions')" data-bind="click: loadStatusInfo">
<a href="#modal-options" data-toggle="modal"><span class="glyphicon glyphicon-wrench"></span></a>
<a href="#modal-options" data-toggle="modal" aria-label="$T('Glitter-statusInterfaceOptions')"><span class="glyphicon glyphicon-wrench"></span></a>
</li>
<!--#if $have_rss_defined#-->
<li data-tooltip="true" data-placement="bottom" title="$T('cmenu-rss')">
<a href="./config/rss/">
<a href="$url('config/rss')" aria-label="$T('cmenu-rss')">
<svg class="rss-icon-svg" viewBox="0 0 8 8">
<rect class="rss-button" width="8" height="8" />
<circle class="rss-symbol" cx="2" cy="6" r="1" />
@@ -79,10 +79,10 @@
</li>
<!--#end if#-->
<li data-tooltip="true" data-placement="bottom" title="SABnzbd $T('menu-config')">
<a href="./config/"><span class="glyphicon glyphicon-cog"></span></a>
<a href="$url('config')" aria-label="SABnzbd $T('menu-config')"><span class="glyphicon glyphicon-cog"></span></a>
</li>
<li class="dropdown main-menu-link" data-bind="css: { 'active-on-queue-finish-menu': onQueueFinish()}">
<a href="#" data-toggle="dropdown" onclick="keepOpen(this)">
<li class="dropdown main-menu-link" data-bind="css: { 'active-on-queue-finish-menu': finishaction()}">
<a href="#" data-toggle="dropdown" onclick="keepOpen(this)" aria-label="$T('Glitter-mainMenu')" aria-haspopup="true" aria-expanded="false">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@@ -91,38 +91,43 @@
<li><a href="#modal-help" data-toggle="modal"><span class="glyphicon glyphicon-question-sign"></span> $T('menu-help')</a></li>
<li><a href="https://sabnzbd.org/donate" target="_blank"><span class="glyphicon glyphicon-heart"></span> $T('menu-donate')</a></li>
<!--#if $have_logout or $have_quota or $have_rss_defined or $have_watched_dir or $pp_pause_event#--><li class="divider"></li><!--#end if#-->
<!--#if $have_logout#--><li><a href="./login/?logout=1"><span class="glyphicon glyphicon-log-out"></span> $T('logout')</a></li><!--#end if#-->
<!--#if $have_logout#--><li>
<form method="post" action="$url('logout')">
<input type="hidden" name="csrf_token" value="$csrf_token" />
<button type="submit"><span class="glyphicon glyphicon-log-out"></span> $T('logout')</button>
</form>
</li><!--#end if#-->
<!--#if $have_quota#--><li><a href="#" data-bind="click: doQueueAction" data-mode="reset_quota">$T('link-resetQuota')</a></li><!--#end if#-->
<!--#if $have_rss_defined#--><li><a href="#" data-bind="click: doQueueAction" data-mode="rss_now">$T('button-rssNow')</a></li><!--#end if#-->
<!--#if $have_watched_dir#--><li><a href="#" data-bind="click: doQueueAction" data-mode="watched_now">$T('sch-scan_folder')</a></li><!--#end if#-->
<!--#if $pp_pause_event#--><li><a href="#" data-bind="click: doQueueAction" data-mode="resume_pp">$T('sch-resume_post')</a></li><!--#end if#-->
<li class="divider"></li>
<li><a href="./shutdown/?apikey=$apikey&amp;pid=$pid" data-bind="click: shutdownSAB">$T('shutdownSab')</a></li>
<li><a href="#" data-bind="click: restartSAB">$T('Glitter-restartSab')</a></li>
<li>
<form method="post" action="$url('shutdown')" data-bind="submit: shutdownSAB">
<input type="hidden" name="csrf_token" value="$csrf_token" />
<button type="submit">$T('shutdownSab')</button>
</form>
</li>
<li>
<form data-bind="submit: restartSAB">
<button type="submit">$T('Glitter-restartSab')</button>
</form>
</li>
<li class="divider"></li>
<li class="dropdown-header"><span class="glyphicon glyphicon-off"></span> $T('Glitter-onFinish'):</li>
<li>
<select data-bind="value: onQueueFinish, event: { change: setOnQueueFinish }" class="form-control">
<select data-bind="value: finishaction, event: { change: setOnQueueFinish }" class="form-control" aria-label="$T('Glitter-onFinish')">
<option value=""></option>
<optgroup label="$T('eoq-actions')">
<option value="shutdown_program">$T('shutdownSab')</option>
<!--#if $power_options#-->
<option value="shutdown_pc">$T('shutdownPc')</option>
<option value="standby_pc">$T('standbyPc')</option>
<option value="hibernate_pc">$T('hibernatePc')</option>
<!--#end if#-->
</optgroup>
<optgroup label="$T('eoq-scripts')" data-bind="visible: queue.scriptsList().length > 1">
<!-- ko foreach: queue.scriptsList -->
<!-- ko if: \$data != glitterTranslate.noneText -->
<option data-bind="text: \$data, attr: { value: 'script_'+\$data } " ></option>
<!-- /ko -->
<!-- /ko -->
</optgroup>
<option value="shutdown_program">$T('shutdownSab')</option>
<!--#if $power_options#-->
<option value="shutdown_pc">$T('shutdownPc')</option>
<option value="standby_pc">$T('standbyPc')</option>
<option value="hibernate_pc">$T('hibernatePc')</option>
<!--#end if#-->
</select>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</nav>
@@ -1,8 +1,8 @@
<div id="queue-messages" class="queue-messages" data-bind="visible: hasMessages() || displayTabbed()" style="display: none;">
<table class="table table-hover table-messages">
<table class="table table-hover table-messages" aria-label="$T('warnings')">
<thead>
<tr>
<th class="table-messages-header-label"></th>
<th class="table-messages-header-label"><span class="sr-only">$T('warnings')</span></th>
<th style="width: 30px;"></th>
</tr>
</thead>
@@ -11,7 +11,7 @@
<tr>
<td class="table-messages-hide"></td>
<td data-bind="attr: { 'rowspan': parseInt(nrWarnings())+1 }, click: clearWarnings" class="table-messages-remove">
<a href="#" class="hover-button"><span class="glyphicon glyphicon-remove"></span></a>
<a href="#" class="hover-button" aria-label="$T('button-clear')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
</td>
</tr>
<!-- ko foreach: allWarnings -->
@@ -32,7 +32,7 @@
</td>
<!-- ko if: \$data.hasOwnProperty("clear") -->
<td class="table-messages-remove">
<a href="#" data-bind="click: clear" class="hover-button"><span class="glyphicon glyphicon-remove"></span></a>
<a href="#" data-bind="click: clear" class="hover-button" aria-label="$T('button-clear')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
</td>
<!-- /ko -->
</tr>
@@ -45,4 +45,4 @@
<!-- /ko -->
</tbody>
</table>
</div>
</div>
@@ -1,13 +1,17 @@
<!--#from sabnzbd.constants import VALID_ARCHIVES, VALID_NZB_FILES#-->
<!--#set $file_exts = ', '.join(VALID_NZB_FILES + VALID_ARCHIVES)#-->
<!-- Notifcation box -->
<!-- Notification box -->
<div class="main-notification-box" style="display: none">
<div class="main-notification-box-uploading">
<span class="glyphicon glyphicon-open"></span> $T('Glitter-notification-uploading') <span class="main-notification-box-file-count"></span>
</div>
<div class="main-notification-box-uploading-failed">
<span class="glyphicon glyphicon-exclamation-sign"></span> $T('Glitter-notification-upload-failed').replace('%s', '') <span class="main-notification-box-file-count"></span>
</div>
<div class="main-notification-box-queue-repair">
<span class="glyphicon glyphicon glyphicon-wrench"></span> $T('Glitter-repairQueue')
<span class="glyphicon glyphicon-wrench"></span> $T('Glitter-repairQueue')
</div>
<div class="main-notification-box-disconnect">
@@ -68,13 +72,13 @@
</div>
<!-- Modals -->
<div id="modal-options" class="modal fade" tabindex="-1">
<div id="modal-options" class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-options-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<a href="#" data-bind="click: loadStatusInfo, css: { 'rotate-refresh': !hasStatusInfo() }" title="$T('Glitter-interfaceRefresh')"><span class="glyphicon glyphicon-repeat"></span></a>
<h4 class="modal-title">$T('Glitter-statusInterfaceOptions')</h4>
<h4 class="modal-title" id="modal-options-title">$T('Glitter-statusInterfaceOptions')</h4>
</div>
<div class="modal-body">
<ul class="nav nav-tabs">
@@ -85,6 +89,11 @@
</ul>
<div class="tab-content">
<div class="tab-pane fade in active" id="options-status">
<div class="row" data-bind="visible: statusInfo.active_socks5_proxy">
<div class="col-sm-6">$T('opt-socks5_proxy_url') &nbsp </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: statusInfo.active_socks5_proxy"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-localIP4') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.localipv4() ? '$T('dashboard-connectionError')' : statusInfo.localipv4(), css: { 'options-bad-status' : !statusInfo.localipv4() }"></div>
@@ -102,7 +111,7 @@
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-NameserverDNS') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.dnslookup() ? '$T('dashboard-connectionError')' : statusInfo.dnslookup(), css: { 'options-bad-status' : (statusInfo.dnslookup() != 'OK') }"></div>
<div class="col-sm-6" data-bind="visible: hasStatusInfo, text: !statusInfo.dnslookup() ? '$T('dashboard-connectionError')' : 'OK', css: { 'options-bad-status' : !statusInfo.dnslookup() }"></div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasStatusInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<hr/>
@@ -112,30 +121,43 @@
<span data-bind="text: cacheSize"></span> (<span data-bind="text: cacheArticles"></span> $T('Glitter-articles'))
</div>
</div>
<div class="row" data-bind="visible: statusInfo.loadavg()">
<div class="col-sm-6">$T('dashboard-loadavg') &nbsp; </div>
<div class="col-sm-6">
<span data-bind="text: statusInfo.loadavg"></span>
</div>
</div>
<div class="row" data-bind="visible: statusInfo.delayed_assembler() > 5">
<div class="col-sm-6">$T('dashboard-delayed') &nbsp; </div>
<div class="col-sm-6">
<span data-bind="visible: statusInfo.delayed_assembler() > 5">$T('dashboard-delayed-disk')</span>
<small data-bind="visible: statusInfo.delayed_assembler() > 5">(<span data-bind="text: statusInfo.delayed_assembler"></span>x)</small>
</div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-systemPerformance') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<div class="col-sm-6 col-dot-overflow" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.pystone"></span>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small data-bind="truncatedText: statusInfo.cpumodel, length: 25, attr: { 'data-original-title': statusInfo.cpumodel }" data-tooltip="true"></small>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest') (~10 $T('seconds'))"><span class="glyphicon glyphicon-repeat"></span></a>
<small title="$cpumodel $cpusimd" data-tooltip="true">$cpumodel $cpusimd</small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-downloadDirSpeed') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<div class="col-sm-6 col-dot-overflow" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.downloaddirspeed()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="truncatedText: statusInfo.downloaddir, length: 24, attr: { 'data-original-title': statusInfo.downloaddir }" data-tooltip="true"></span>)</small>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest') (~10 $T('seconds'))"><span class="glyphicon glyphicon-repeat"></span></a>
<small data-bind="text: statusInfo.downloaddir, attr: { 'data-original-title': statusInfo.downloaddir }" data-tooltip="true"></small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('dashboard-completeDirSpeed') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<div class="col-sm-6 col-dot-overflow" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.completedirspeed()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="truncatedText: statusInfo.completedir, length: 24, attr: { 'data-original-title': statusInfo.completedir }" data-tooltip="true"></span>)</small>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest') (~10 $T('seconds'))"><span class="glyphicon glyphicon-repeat"></span></a>
<small data-bind="text: statusInfo.completedir, attr: { 'data-original-title': statusInfo.completedir }" data-tooltip="true"></small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
@@ -143,18 +165,23 @@
<div class="col-sm-6">$T('dashboard-internetBandwidth') &nbsp; </div>
<div class="col-sm-6" data-bind="visible: hasPerformanceInfo">
<span data-bind="text: statusInfo.internetbandwidth()"></span> MB/s
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest')"><span class="glyphicon glyphicon-repeat"></span></a>
<small>(<span data-bind="text: statusInfo.internetbandwidth()*8"></span> Mbps)</small>
<a href="#" class="diskspeed-button" data-bind="click: loadStatusInfo" data-tooltip="true" data-placement="right" title="$T('dashboard-repeatTest') (~10 $T('seconds'))"><span class="glyphicon glyphicon-repeat"></span></a>
<small><span data-bind="text: statusInfo.internetbandwidth()*8"></span> Mbps</small>
</div>
<div class="col-sm-6 col-loading" data-bind="visible: !hasPerformanceInfo()">$T('Glitter-loading')<span class="loader-dot-one">.</span><span class="loader-dot-two">.</span><span class="loader-dot-three">.</span></div>
</div>
<div class="row">
<div class="col-sm-6">$T('platform') &nbsp; </div>
<div class="col-sm-6">
$platform
</div>
</div>
<div class="row test-download">
<div class="col-sm-6">$T('dashboard-testDownload') &nbsp; </div>
<div class="col-sm-6">
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="100MB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 100 MB</a>
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="1000MB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 1 GB</a>
<a href="#" class="btn btn-default" data-bind="click: testDownload" data-size="10GB" data-tooltip="true" data-placement="top" title="$T('dashboard-testDownload-explain')"><span class="glyphicon glyphicon-download-alt"></span> 10 GB</a>
</div>
</div>
<hr />
@@ -170,14 +197,17 @@
</div>
<div class="row options-function-box">
<div class="col-sm-6">
<a href="./api?mode=showlog&apikey=$apikey" target="_blank" class="btn btn-default" data-tooltip="true" data-placement="top" title="$T('Glitter-logText')">
<span class="glyphicon glyphicon-file"></span> $T('link-showLog')
</a>
<form method="post" action="$url('log')" target="_blank">
<input type="hidden" name="csrf_token" value="$csrf_token" />
<button type="submit" class="btn btn-default" data-tooltip="true" data-placement="top" title="$T('Glitter-logText')">
<span class="glyphicon glyphicon-file"></span> $T('link-showLog')
</button>
</form>
</div>
<div class="col-sm-6">
<div class="input-group" data-tooltip="true" data-placement="top" title="$T('logging')">
<span class="input-group-addon"><span class="glyphicon glyphicon-comment"></span></span>
<select class="form-control" data-bind="value: statusInfo.loglevel">
<select class="form-control" data-bind="value: loglevel">
<option value="0">$T('log-errWarn')</option>
<option value="1">$T('log-info')</option>
<option value="2">$T('log-debug')</option>
@@ -208,15 +238,20 @@
</div>
<div class="row" data-bind="visible: serverssl">
<div class="col-sm-6">$T('srv-ssl')</div>
<div class="col-sm-6">
<span class="glyphicon glyphicon-ok"></span> <span data-bind="text: serversslinfo"></span>
<div class="col-sm-6 col-dot-overflow">
<span class="glyphicon glyphicon-ok"></span>
<span data-bind="text: serversslinfo"></span>
</div>
</div>
<div class="row">
<div class="col-sm-6"># $T('connections')</div>
<div class="col-sm-6">
<span data-bind="text: serverconnections().length"></span> /
<span data-bind="text: servertotalconn"></span>
<span data-bind="text: servertotalconn"></span><br>
<!-- ko if: serveripaddress() -->
<span data-bind="text: servercanonname"></span><br>
<span data-bind="text: serveripaddress"></span>
<!-- /ko -->
</div>
</div>
<div class="row">
@@ -232,17 +267,17 @@
</div>
</div>
</div>
<div class="row" data-bind="visible: !isFinite(serveractiveconn())">
<div class="row" data-bind="visible: serverwarning()">
<div class="col-sm-12">
<div class="alert alert-warning">
<span class="glyphicon glyphicon-info-sign"></span>
<span data-bind="text: serveractiveconn()"></span>
<span data-bind="text: serverwarning()"></span>
</div>
</div>
</div>
<!-- ko if: serverconnections().length > 0 -->
<table class="table table-hover table-server-connections" data-bind="visible: \$root.showActiveConnections()">
<table class="table table-hover table-server-connections" aria-label="$T('connections')" data-bind="visible: \$root.showActiveConnections()">
<thead>
<tr>
<th><strong>$T('article-id')</strong></th>
@@ -272,7 +307,7 @@
<a href="#" class="hover-button process-all-orphaned" data-bind="click: removeAllOrphaned">$T('Glitter-purgeOrphaned') <span class="glyphicon glyphicon-trash"></span></a>
<a href="#" class="hover-button process-all-orphaned" data-bind="click: addAllOrphaned">$T('Glitter-retryAllOrphaned') <span class="glyphicon glyphicon-plus-sign"></span></a>
<div class="clearfix"></div>
<table class="table table-hover table-striped">
<table class="table table-hover table-striped" aria-label="$T('Glitter-orphanedJobs')">
<thead>
<tr>
<th style="width: 30px;"></th>
@@ -301,7 +336,7 @@
</label>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">$T('Glitter-interfaceRefresh')</label>
<label class="col-sm-6 control-label" for="refreshRate-option">$T('Glitter-interfaceRefresh')</label>
<div class="col-sm-4">
<select id="refreshRate-option" class="form-control" data-bind="value: refreshRate">
<option value="1">1 $T('second')</option>
@@ -319,9 +354,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">$T('Glitter-queueItemLimit')</label>
<label class="col-sm-6 control-label" for="queue-pagination-limit">$T('Glitter-queueItemLimit')</label>
<div class="col-sm-4">
<select name="queue-pagination-limit" class="form-control" data-bind="value: queue.paginationLimit">
<select name="queue-pagination-limit" id="queue-pagination-limit" class="form-control" data-bind="value: queue.paginationLimit">
<option value="5">5 / $T('Glitter-page')</option>
<option value="10">10 / $T('Glitter-page')</option>
<option value="20">20 / $T('Glitter-page')</option>
@@ -334,9 +369,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">$T('Glitter-historyItemLimit')</label>
<label class="col-sm-6 control-label" for="history-pagination-limit">$T('Glitter-historyItemLimit')</label>
<div class="col-sm-4">
<select name="history-pagination-limit" class="form-control" data-bind="value: history.paginationLimit">
<select name="history-pagination-limit" id="history-pagination-limit" class="form-control" data-bind="value: history.paginationLimit">
<option value="5">5 / $T('Glitter-page')</option>
<option value="10">10 / $T('Glitter-page')</option>
<option value="20">20 / $T('Glitter-page')</option>
@@ -348,11 +383,10 @@
</select>
</div>
</div>
<div class="options-switch"></div>
<div class="form-group">
<label class="col-sm-6 control-label">$T('Glitter-dateFormat')</label>
<label class="col-sm-6 control-label" for="general-date-format">$T('Glitter-dateFormat')</label>
<div class="col-sm-4">
<select name="general-date-format" class="form-control" data-bind="value: dateFormat">
<select name="general-date-format" id="general-date-format" class="form-control" data-bind="value: dateFormat">
<option value="DD/MM/YYYY HH:mm"></option>
<option value="DD/MM/YYYY h:mma"></option>
<option value="MM/DD/YYYY HH:mm"></option>
@@ -368,12 +402,12 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="general-extra-queue-columns">
$T('Glitter-showExtraQueueColumn')<br />
<span class="label label-warning">&gt; 1200 pixels</span>
</label>
<div class="col-sm-4">
<select name="general-extra-column" class="form-control-multiselect form-control" data-bind="selectedOptions: extraQueueColumns" multiple="true">
<select name="general-extra-column" id="general-extra-queue-columns" class="form-control-multiselect form-control" data-bind="selectedOptions: extraQueueColumns" multiple="true">
<option value="category">$T('category')</option>
<option value="priority">$T('priority')</option>
<option value="processing">$T('swtag-pp')</option>
@@ -383,12 +417,12 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="general-extra-history-columns">
$T('Glitter-showExtraHistoryColumn')<br />
<span class="label label-warning">&gt; 1200 pixels</span>
</label>
<div class="col-sm-4">
<select name="general-extra-column" class="form-control-multiselect form-control" data-bind="selectedOptions: extraHistoryColumns" multiple="true">
<select name="general-extra-column" id="general-extra-history-columns" class="form-control-multiselect form-control" data-bind="selectedOptions: extraHistoryColumns" multiple="true">
<option value="category">$T('category')</option>
<option value="size">$T('size')</option>
<option value="speed">$T('Glitter-speed')</option>
@@ -396,43 +430,53 @@
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="displayCompact">
$T("Glitter-displayCompact")
</label>
<div class="col-sm-4">
<input type="checkbox" name="displayCompact" value="true" data-bind="checked: displayCompact" />
<input type="checkbox" name="displayCompact" id="displayCompact" value="true" data-bind="checked: displayCompact" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="displayFullWidth">
$T("Glitter-displayFullWidth")
</label>
<div class="col-sm-4">
<input type="checkbox" name="displayFullWidth" value="true" data-bind="checked: displayFullWidth" />
<input type="checkbox" name="displayFullWidth" id="displayFullWidth" value="true" data-bind="checked: displayFullWidth" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="displayTabbed">
$T("Glitter-displayTabbed")
</label>
<div class="col-sm-4">
<input type="checkbox" name="displayTabbed" value="true" data-bind="checked: displayTabbed" />
<input type="checkbox" name="displayTabbed" id="displayTabbed" value="true" data-bind="checked: displayTabbed" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="confirmDeleteQueue">
$T("Glitter-confirmDeleteQueue")
</label>
<div class="col-sm-4">
<input type="checkbox" name="confirmDeleteQueue" value="true" data-bind="checked: confirmDeleteQueue" />
<input type="checkbox" name="confirmDeleteQueue" id="confirmDeleteQueue" value="true" data-bind="checked: confirmDeleteQueue" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label">
<label class="col-sm-6 control-label" for="confirmDeleteHistory">
$T("Glitter-confirmDeleteHistory")
</label>
<div class="col-sm-4">
<input type="checkbox" name="confirmDeleteHistory" value="true" data-bind="checked: confirmDeleteHistory" />
<input type="checkbox" name="confirmDeleteHistory" id="confirmDeleteHistory" value="true" data-bind="checked: confirmDeleteHistory" />
</div>
</div>
<div class="form-group form-checkbox">
<label class="col-sm-6 control-label" for="keyboardShortcuts">
$T("Glitter-keyboardShortcuts")
<span class="glyphicon glyphicon-question-sign" data-tooltip="true" data-placement="top" data-html="true"
data-original-title="P: $T('link-pause')<br>A: $T('Glitter-addNZB')<br>S: $T('Glitter-statusInterfaceOptions')<br>C: $T('menu-config')<br>$T('Glitter-keyboardShortcuts-arrows')"></span>
</label>
<div class="col-sm-4">
<input type="checkbox" name="keyboardShortcuts" id="keyboardShortcuts" value="true" data-bind="checked: keyboardShortcuts" />
</div>
</div>
</form>
@@ -444,12 +488,12 @@
</div>
</div>
<div id="modal-add-nzb" class="modal fade" tabindex="-1">
<div id="modal-add-nzb" class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-add-nzb-title">
<div class="modal-dialog">
<form class="modal-content" data-bind="submit: addNZB">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-addNZB')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-add-nzb-title">$T('Glitter-addNZB')</h4>
</div>
<div class="modal-body form-horizontal">
<div class="row">
@@ -483,42 +527,50 @@
<div class="clearfix"></div>
<hr />
<div class="form-group">
<label class="col-sm-4 control-label">$T('name')</label>
<label class="col-sm-4 control-label" for="nzbname">$T('name')</label>
<div class="col-sm-6">
<input type="text" name="nzbname" id="nzbname" placeholder="$T('Glitter-addnzbFilename')" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('srv-password')</label>
<label class="col-sm-4 control-label" for="password">$T('srv-password')</label>
<div class="col-sm-6">
<input type="text" name="password" id="password" placeholder="$T('srv-optional')" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('category')</label>
<label class="col-sm-4 control-label" for="add-nzb-category">$T('category')</label>
<div class="col-sm-6">
<select name="Category" class="form-control" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText',"></select>
<select name="Category" id="add-nzb-category" class="form-control" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText', optionsCaption: ''"></select>
<span class="glyphicon glyphicon-tag"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('priority')</label>
<label class="col-sm-4 control-label" for="add-nzb-priority">$T('priority')</label>
<div class="col-sm-6">
<select name="Priority" class="form-control" data-bind="options: queue.priorityOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<!-- This list is different from the one during download! -->
<select name="Priority" id="add-nzb-priority" class="form-control">
<option value=""></option>
<option value="2">$T('pr-force')</option>
<option value="1">$T('pr-high')</option>
<option value="0">$T('pr-normal')</option>
<option value="-1">$T('pr-low')</option>
<option value="-2" >$T('pr-paused')</option>
</select>
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('swtag-pp')</label>
<label class="col-sm-4 control-label" for="add-nzb-processing">$T('swtag-pp')</label>
<div class="col-sm-6">
<select name="Processing" class="form-control" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '$T('default')'"></select>
<select name="Processing" id="add-nzb-processing" class="form-control" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: ''"></select>
<span class="glyphicon glyphicon-check"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">$T('eoq-scripts')</label>
<label class="col-sm-4 control-label" for="add-nzb-script">$T('eoq-scripts')</label>
<div class="col-sm-6">
<select name="Post-processing" class="form-control" data-bind="options: queue.scriptsList, optionsCaption: '$T('default')', enable: (queue.scriptsList().length > 1)"></select>
<select name="Post-processing" id="add-nzb-script" class="form-control" data-bind="options: queue.scriptsList, optionsCaption: '', optionsValue: 'scriptValue', optionsText: 'scriptText', enable: (queue.scriptsList().length > 1)"></select>
<span class="glyphicon glyphicon-flash"></span>
</div>
</div>
@@ -528,12 +580,12 @@
</div>
</div>
<div id="modal-item-files" class="modal fade" tabindex="-1">
<div id="modal-item-files" class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-item-files-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title row-wrap-text" data-bind="text: filelist.filelist_name">$T('Glitter-loading')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title row-wrap-text" id="modal-item-files-title" data-bind="text: filelist.filelist_name">$T('Glitter-loading')</h4>
</div>
<div class="modal-body">
<div id="modal-item-filelist">
@@ -596,12 +648,65 @@
</div>
</div>
<div id="modal-retry-job" class="modal modal-small fade" tabindex="-1">
<div id="modal-delete-queue-job" class="modal modal-delete-job fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-delete-queue-job-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-retryJob')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title row-wrap-text" id="modal-delete-queue-job-title">$T('removeNZB-Files')</h4>
</div>
<form data-bind="submit: queue.removeDownloads">
<div class="modal-body">
$T('confirm-delete')
<ul data-bind="foreach: queue.deleteItems">
<li data-bind="text: name"></li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">$T('cancel')</button>
<button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> $T('nzo-delete')</button>
</div>
</form>
</div>
</div>
</div>
<div id="modal-delete-history-job" class="modal modal-delete-job fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-delete-history-job-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title row-wrap-text" id="modal-delete-history-job-title">$T('nzo-delete')</h4>
</div>
<form data-bind="submit: history.removeDownloads">
<div class="modal-body">
$T('confirm-delete')
<ul data-bind="foreach: history.deleteItems">
<li data-bind="text: historyStatus.name"></li>
</ul>
</div>
<div class="modal-footer">
<div class="checkbox" data-bind="visible: !history.showArchive()">
<label>
<input type="checkbox" data-bind="checked: history.permanentlyDelete"> <span>$T('permanently-delete')</span>
</label>
</div>
<button type="button" class="btn btn-default" data-dismiss="modal">$T('cancel')</button>
<button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> $T('nzo-delete')</button>
</div>
</form>
</div>
</div>
</div>
<div id="modal-retry-job" class="modal modal-small fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-retry-job-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-retry-job-title">$T('Glitter-retryJob')</h4>
</div>
<form id="retry-job-form" data-bind="submit: history.retryJob">
<div class="modal-body">
@@ -626,6 +731,9 @@
</div>
</div>
</fieldset>
<fieldset>
$T('Glitter-retryNoChecks')
</fieldset>
</div>
<div class="modal-footer">
<button class="btn btn-default"><span class="glyphicon glyphicon-repeat"></span> $T('button-retry')</button>
@@ -635,24 +743,24 @@
</div>
</div>
<div id="history-script-log" class="modal fade" tabindex="-1">
<div id="history-script-log" class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="history-script-log-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-scriptLog')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="history-script-log-title">$T('Glitter-scriptLog')</h4>
</div>
<div class="modal-body"></div>
<div class="modal-body"><pre></pre></div>
</div>
</div>
</div>
<div id="modal-help" class="modal fade">
<div id="modal-help" class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-help-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('menu-help')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-help-title">$T('menu-help')</h4>
</div>
<div class="modal-body">
#include $webdir + "/../../Config/templates/staticcfg/images/logo-full.svg"#
@@ -673,24 +781,24 @@
<td><a href="https://github.com/sabnzbd/sabnzbd" target="_blank">https://github.com/sabnzbd/sabnzbd/</a></td>
</tr>
<tr>
<td><strong>$T('menu-irc'):</strong></td>
<td><strong>$T('menu-live-chat'):</strong></td>
<td><a href="https://sabnzbd.org/live-chat" target="_blank">https://sabnzbd.org/live-chat</a></td>
</tr>
</tbody>
</table>
<hr/>
<p><small>Copyright (C) 2007-2021 The SABnzbd Team &lt;team@sabnzbd.org&gt;<br/>$T('yourRights') </small></p>
<p><small>Copyright &copy; 2007-2026 by The SABnzbd-Team (<a href="https://sabnzbd.org/" target="_blank">sabnzbd.org</a>)<br/>$T('yourRights') </small></p>
</div>
</div>
</div>
</div>
<div id="modal-purge-history" class="modal modal-small fade" tabindex="-1">
<div id="modal-purge-history" class="modal modal-small fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-purge-history-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-clearHistory')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-purge-history-title">$T('Glitter-clearHistory')</h4>
</div>
<div class="modal-body">
<button type="button" class="btn btn-danger" data-bind="click: history.emptyHistory" data-action="history-purge-failed"><span class="glyphicon glyphicon-floppy-remove"></span> $T('purgeFailed')</button>
@@ -698,16 +806,23 @@
<button type="button" class="btn btn-danger" data-bind="click: history.emptyHistory" data-action="history-purge-completed"><span class="glyphicon glyphicon-floppy-saved"></span> $T('purgeCompl')</button><hr />
<button type="button" class="btn btn-danger" data-bind="click: history.emptyHistory" data-action="history-purge-page"><span class="glyphicon glyphicon-check"></span> $T('purgePage') <span class="label label-default" data-bind="text: history.historyItems().length"></span></button>
</div>
<div class="modal-footer">
<div class="checkbox">
<label>
<input type="checkbox" data-bind="checked: history.permanentlyDelete"> <span>$T('permanently-delete')</span>
</label>
</div>
</div>
</div>
</div>
</div>
<div id="modal_custom_pause" class="modal modal-small fade" tabindex="-1">
<div id="modal-custom-pause" class="modal modal-small fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="modal-custom-pause-title">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">$T('Glitter-pauseFor')</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="$T('close')"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-custom-pause-title">$T('Glitter-pauseFor')</h4>
</div>
<div class="modal-body">
<form data-bind="submit: saveCustomPause">
+70 -47
View File
@@ -9,22 +9,16 @@
</a>
</div>
<!-- /ko -->
<!--#if $loadavg#-->
<div class="info-container-box" title="$T('ft-sysload') - $T('menu-config') &#10140; $T('cmenu-special') &#10140; show_sysload">
<span class="glyphicon glyphicon-record"></span>
<span data-bind="text: systemLoad"></span>
</div>
<!--#end if#-->
<!-- ko if: (queueDataLeft() != '') -->
<div class="info-container-box">
<span class="glyphicon glyphicon-save"></span>
<span data-bind="text: queueDataLeft"></span> $T('Glitter-left')
</div>
<!-- /ko -->
<!-- ko if: (quotaLimit() != 0) -->
<!-- ko if: (parseInt(quotaLimit()) != 0) -->
<div class="info-container-box">
<span data-bind="css: { 'queue-error-info' : (parseInt(quotaLimitLeft())<=0) }">
<span class="glyphicon glyphicon-log-in"></span> <span data-bind="text: quotaLimitLeft"></span>B / <span data-bind="text: quotaLimit"></span>B $T('quota-left')
<span class="glyphicon glyphicon-log-in"></span> <span data-bind="text: quotaLimitLeft"></span> / <span data-bind="text: quotaLimit"></span> $T('quota-left')
</span>
</div>
<!-- /ko -->
@@ -52,6 +46,8 @@
<span class="glyphicon glyphicon-tasks" data-tooltip="true" data-placement="left" title="$T('Glitter-multiOperations')"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#" data-action="sortRemainingAsc" data-bind="click: queue.queueSorting">$T('Glitter-sortRemaining')</a></li>
<li><a href="#" data-action="sortRemainingBytesAsc" data-bind="click: queue.queueSorting">$T('Glitter-sortRemainingBytesAsc')</a></li>
<li><a href="#" data-action="sortAgeAsc" data-bind="click: queue.queueSorting">$T('Glitter-sortAgeAsc')</a></li>
<li><a href="#" data-action="sortAgeDesc" data-bind="click: queue.queueSorting">$T('Glitter-sortAgeDesc')</a></li>
<li><a href="#" data-action="sortNameAsc" data-bind="click: queue.queueSorting">$T('Glitter-sortNameAsc')</a></li>
@@ -62,17 +58,17 @@
</div>
</div>
<div class="clearfix"></div>
<table class="table table-striped table-hover queue-table">
<table class="table table-striped table-hover queue-table" aria-label="$T('menu-queue')">
<thead>
<tr>
<th style="width: 25px;"></th>
<th></th>
<th scope="col" style="width: 25px;"><span class="sr-only">$T('status')</span></th>
<th scope="col"><span class="sr-only">$T('name')</span></th>
<!-- ko foreach: extraQueueColumns -->
<th class="table-header-extra"></th>
<th class="table-header-extra" scope="col"><span class="sr-only" data-bind="text: glitterTranslate.column[\$data]"></span></th>
<!-- /ko -->
<th class="table-header-progress" data-bind="css: { 'table-header-progress-smaller' : extraQueueColumns().length }"></th>
<th style="width: 85px;"></th>
<th style="width: 60px;"></th>
<th class="table-header-progress" scope="col" data-bind="css: { 'table-header-progress-smaller' : extraQueueColumns().length || displayCompact() }"><span class="sr-only">$T('Glitter-progress')</span></th>
<th scope="col" style="width: 85px;"><span class="sr-only">$T('status')</span></th>
<th scope="col" style="width: 60px;"><span class="sr-only">$T('Glitter-actions')</span></th>
</tr>
</thead>
<!-- ko if: !hasQueue() -->
@@ -89,7 +85,7 @@
<tbody data-bind="visible: hasQueue(), sortable: { data: queue.queueItems, afterMove: queue.move, options: { start: queue.dragStart, stop: queue.dragStop, axis: 'y', containment: '.queue', distance: 10 } }" style="display: none;">
<tr class="queue-item">
<td>
<a href="#" data-bind="click: pauseToggle, attr: { 'title': pausedStatus() ? '$T('link-resume')' : '$T('link-pause')' }">
<a href="#" data-bind="click: pauseToggle, attr: { 'title': pausedStatus() ? '$T('link-resume')' : '$T('link-pause')', 'aria-label': pausedStatus() ? '$T('link-resume')' : '$T('link-pause')' }">
<span class="hover-button glyphicon" data-bind="css: queueIcon"></span>
</a>
</td>
@@ -107,27 +103,41 @@
<!-- /ko -->
</div>
<form data-bind="submit: editingNameSubmit">
<input type="text" data-bind="value: nameForEdit, visible: editingName(), hasfocus: editingName" />
<input type="text" aria-label="$T('Glitter-rename')" data-bind="value: nameForEdit, visible: editingName(), hasfocus: editingName" />
</form>
<div class="name-icons direct-unpack hover-button" data-bind="visible: direct_unpack() && !editingName()">
<span class="glyphicon glyphicon-compressed"></span> <span data-bind="text: direct_unpack"></span>
</div>
<div class="name-options" data-bind="visible: !editingName(), css: { disabled: isGrabbing() }">
<a href="#" data-bind="click: \$parent.queue.moveButton" class="hover-button buttonMoveToTop" title="$T('Glitter-top')"><span class="glyphicon glyphicon-chevron-up"></span></a>
<a href="#" data-bind="click: \$parent.queue.moveButton" class="hover-button buttonMoveToBottom" title="$T('Glitter-bottom')"><span class="glyphicon glyphicon-chevron-down"></span></a>
<a href="#" data-bind="click: editName" class="hover-button" title="$T('Glitter-rename')"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="#" data-bind="click: showFiles" class="hover-button" title="$T('nzoDetails') - $T('srv-password')"><span class="glyphicon glyphicon-folder-open"></span></a>
<a href="#" data-bind="click: \$parent.queue.moveButton" class="hover-button buttonMoveToTop" title="$T('Glitter-top')" aria-label="$T('Glitter-top')"><span class="glyphicon glyphicon-chevron-up"></span></a>
<a href="#" data-bind="click: \$parent.queue.moveButton" class="hover-button buttonMoveToBottom" title="$T('Glitter-bottom')" aria-label="$T('Glitter-bottom')"><span class="glyphicon glyphicon-chevron-down"></span></a>
<a href="#" data-bind="click: editName" class="hover-button" title="$T('Glitter-rename')" aria-label="$T('Glitter-rename')"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="#" data-bind="click: showFiles" class="hover-button" title="$T('nzoDetails') - $T('srv-password')" aria-label="$T('nzoDetails')"><span class="glyphicon glyphicon-folder-open"></span></a>
<small data-bind="text: avg_age"></small>
</div>
</td>
<!-- ko foreach: parent.parent.extraQueueColumns -->
<td class="row-extra-text">
<!-- ko if: \$data == 'category' -->
<select class="form-control row-extra-select" data-bind="options: \$parent.parent.categoriesList, optionsValue: 'catValue', optionsText: 'catText', value: \$parent.category, valueAllowUnset: true, event: { change: \$parent.changeCat }"></select>
<!-- /ko -->
<!-- ko if: \$data == 'priority' && !\$parent.isFetchingBlocks -->
<select class="form-control row-extra-select" data-bind="options: \$parent.parent.priorityOptions, optionsValue: 'value', optionsText: 'name', value: \$parent.priority, valueAllowUnset: true, event: { change: \$parent.changePriority }"></select>
<!-- /ko -->
<!-- ko if: \$data == 'processing' -->
<select class="form-control row-extra-select" data-bind="options: \$parent.parent.processingOptions, optionsValue: 'value', optionsText: 'name', value: \$parent.unpackopts, valueAllowUnset: true, event: { change: \$parent.changeProcessing }"></select>
<!-- /ko -->
<!-- ko if: \$data == 'scripts' -->
<select class="form-control row-extra-select" data-bind="options: \$parent.parent.scriptsList, optionsValue: 'scriptValue', optionsText: 'scriptText', value: \$parent.script, valueAllowUnset: true, event: { change: \$parent.changeScript }, enable: (\$parent.parent.scriptsList().length > 1)"></select>
<!-- /ko -->
<!-- ko if: \$data == 'age' -->
<div class="row-wrap-text" data-bind="text: \$parent.showColumn(\$data)"></div>
<!-- /ko -->
</td>
<!-- /ko -->
<td class="progress-indicator">
<div class="progress">
<div class="progress-bar progress-bar-info" data-bind="attr: { 'style': 'width: ' + percentage() + '%; background-color: ' + progressColor() + ';' }">
<div class="progress-bar progress-bar-info" role="progressbar" aria-label="$T('Glitter-progress')" aria-valuemin="0" aria-valuemax="100" data-bind="attr: { 'style': 'width: ' + percentage() + '%; background-color: ' + progressColor() + ';', 'aria-valuenow': percentage() }">
<strong data-bind="text: percentage() + '%'"></strong>
<i data-bind="text: missingText"></i>
</div>
@@ -137,93 +147,106 @@
<td class="timeleft row-wrap-text" data-bind="text: statusText"></td>
<td class="delete">
<label data-bind="visible: parent.isMultiEditing()">
<input type="checkbox" name="multiedit" title="$T('Glitter-multiSelect')" data-bind="click: parent.addMultiEdit, attr: { 'id': 'multiedit_' + id } " />
<input type="checkbox" name="multiedit" title="$T('Glitter-multiSelect')" aria-label="$T('Glitter-selectJob')" data-bind="click: parent.addMultiEdit, attr: { 'id': 'multiedit_' + id } " />
</label>
<!-- ko if: !isGrabbing() -->
<div class="dropdown" data-bind="visible: !parent.isMultiEditing()">
<a href="#" data-toggle="dropdown" data-bind="click: toggleDropdown">
<a href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="$T('nzoDetails')" data-bind="click: toggleDropdown">
<span class="caret"></span>
</a>
<!-- ko if: hasDropdown() -->
<ul class="dropdown-menu queue-item-settings">
<li title="$T('category')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-tag"></span>
<select name="Category" class="form-control" data-bind="options: parent.categoriesList, optionsValue: 'catValue', optionsText: 'catText', value: category, event: { change: changeCat }"></select>
<select name="Category" class="form-control" aria-label="$T('category')" data-bind="options: parent.categoriesList, optionsValue: 'catValue', optionsText: 'catText', value: category, valueAllowUnset: true, event: { change: changeCat }"></select>
</li>
<!-- ko if: !isFetchingBlocks -->
<li title="$T('priority')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span>
<select name="Priority" class="form-control" data-bind="options: parent.priorityOptions, optionsValue: 'value', optionsText: 'name', value: priority, event: { change: changePriority }"></select>
<select name="Priority" class="form-control" aria-label="$T('priority')" data-bind="options: parent.priorityOptions, optionsValue: 'value', optionsText: 'name', value: priority, valueAllowUnset: true, event: { change: changePriority }"></select>
</li>
<!-- /ko -->
<li title="$T('swtag-pp')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-check"></span>
<select name="Processing" class="form-control" data-bind="options: parent.processingOptions, optionsValue: 'value', optionsText: 'name', value: unpackopts, event: { change: changeProcessing }"></select>
<select name="Processing" class="form-control" aria-label="$T('swtag-pp')" data-bind="options: parent.processingOptions, optionsValue: 'value', optionsText: 'name', value: unpackopts, valueAllowUnset: true, event: { change: changeProcessing }"></select>
</li>
<li title="$T('eoq-scripts')" data-tooltip="true" data-placement="left">
<span class="glyphicon glyphicon-flash"></span>
<select name="Post-processing" class="form-control" data-bind="options: parent.scriptsList, value: script, event: { change: changeScript }, enable: (parent.scriptsList().length > 1)"></select>
<select name="Post-processing" class="form-control" aria-label="$T('eoq-scripts')" data-bind="options: parent.scriptsList, value: script, valueAllowUnset: true, optionsValue: 'scriptValue', optionsText: 'scriptText', event: { change: changeScript }, enable: (parent.scriptsList().length > 1)"></select>
</li>
</ul>
<!-- /ko -->
</div>
<!-- /ko -->
<a href="#" class="hover-button" title="$T('removeNZB-Files')" data-bind="click: removeDownload"><span class="glyphicon glyphicon-trash"></span></a>
<a href="#" class="hover-button" title="$T('removeNZB-Files')" aria-label="$T('removeNZB-Files')" data-bind="click: parent.triggerRemoveDownload"><span class="glyphicon glyphicon-trash"></span></a>
</td>
</tr>
</tbody>
</table>
<div class="queue-footer">
<form class="multioperations-selector" data-bind="visible: (hasQueue() && queue.isMultiEditing())" style="display: none;">
<div class="add-nzb-inputbox add-nzb-inputbox-small add-nzb-inputbox-options">
<label for="multiedit-checkall">
<input type="checkbox" name="multieditCheckAll" id="multiedit-checkall" title="$T('Glitter-checkAll')" data-bind="click: queue.checkAllJobs" data-tooltip="true" data-placement="top" />
<label for="multiedit-checkall-queue">
<input type="checkbox" name="multieditCheckAll" id="multiedit-checkall-queue" title="$T('Glitter-checkAll')" aria-label="$T('Glitter-checkAll')" data-bind="click: queue.checkAllJobs" data-tooltip="true" data-placement="top" />
</label>
<a href="#" class="hover-button" data-bind="click: queue.doMultiDelete">
<a href="#" class="hover-button" title="$T('removeNZB-Files')" aria-label="$T('Glitter-removeSelected')" data-bind="click: queue.doMultiDelete" data-tooltip="true" data-placement="top">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
<div class="add-nzb-inputbox add-nzb-inputbox-small">
<label for="multiedit-play">
<input type="radio" name="multiedit-status" value="resume" id="multiedit-play" data-bind="event: { change: queue.doMultiEditUpdate }" />
<label for="multiedit-play" data-bind="event: { mousedown: queue.handleMultiEditStatusMouseDown }">
<input type="radio" name="multiedit-status" value="resume" id="multiedit-play" aria-label="$T('link-resume')" data-bind="event: { change: queue.doMultiEditUpdate }" />
<span class="glyphicon glyphicon-play" title="$T('link-resume')" data-tooltip="true" data-placement="top"></span>
</label>
<label for="multiedit-pause">
<input type="radio" name="multiedit-status" value="pause" id="multiedit-pause" data-bind="event: { change: queue.doMultiEditUpdate }" />
<label for="multiedit-pause" data-bind="event: { mousedown: queue.handleMultiEditStatusMouseDown }">
<input type="radio" name="multiedit-status" value="pause" id="multiedit-pause" aria-label="$T('link-pause')" data-bind="event: { change: queue.doMultiEditUpdate }" />
<span class="glyphicon glyphicon-pause" title="$T('link-pause')" data-tooltip="true" data-placement="top"></span>
</label>
<a href="#" class="hover-button" title="$T('Glitter-top')" aria-label="$T('Glitter-top')" data-bind="click: queue.doMultiMoveToTop" data-tooltip="true" data-placement="top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<a href="#" class="hover-button" title="$T('Glitter-bottom')" aria-label="$T('Glitter-bottom')" data-bind="click: queue.doMultiMoveToBottom" data-tooltip="true" data-placement="top">
<span class="glyphicon glyphicon-chevron-down"></span>
</a>
<span class="label label-default" data-bind="text: queue.multiEditItems().length">0</span>
</div>
<div class="add-nzb-inputbox-clear"></div>
<div class="add-nzb-inputbox" data-tooltip="true" data-placement="top" title="$T('category')">
<span class="glyphicon glyphicon-tag"></span>
<select name="Category" class="form-control" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
<select name="Category" class="form-control" aria-label="$T('category')" data-bind="options: queue.categoriesList, optionsValue: 'catValue', optionsText: 'catText', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
</div>
<div class="add-nzb-inputbox" data-tooltip="true" data-placement="top" title="$T('priority')">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span>
<select name="Priority" class="form-control" data-bind="options: queue.priorityOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
<select name="Priority" class="form-control" aria-label="$T('priority')" data-bind="options: queue.priorityOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
</div>
<div class="add-nzb-inputbox" data-tooltip="true" data-placement="top" title="$T('swtag-pp')">
<span class="glyphicon glyphicon-check"></span>
<select name="Processing" class="form-control" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
<select name="Processing" class="form-control" aria-label="$T('swtag-pp')" data-bind="options: queue.processingOptions, optionsValue: 'value', optionsText: 'name', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
</div>
<div class="add-nzb-inputbox" data-tooltip="true" data-placement="top" title="$T('eoq-scripts')">
<span class="glyphicon glyphicon-flash"></span>
<select name="Post-processing" class="form-control" data-bind="options: queue.scriptsList, optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
<select name="Post-processing" class="form-control" aria-label="$T('eoq-scripts')" data-bind="options: queue.scriptsList, optionsValue: 'scriptValue', optionsText: 'scriptText', optionsCaption: '', event: { change: queue.doMultiEditUpdate }"></select>
</div>
<div class="clearfix"></div>
</form>
<div class="input-group search-box" data-bind="visible: queue.hasQueueSearch" style="display: none;">
<input type="text" class="form-control" placeholder="$T('Glitter-search')" required data-bind="textInput: queue.searchTerm, event: { keydown: queue.clearSearchTerm }" />
<a data-bind="event: { mousedown: queue.clearSearchTerm }">
<input type="text" class="form-control" placeholder="$T('Glitter-search')" aria-label="$T('Glitter-search')" required data-bind="textInput: queue.searchTerm, event: { keydown: queue.clearSearchTerm }" />
<a href="#" data-tooltip="true" data-html="true" data-placement="right" title="$T('Glitter-searchExplain')" data-bind="click: queue.clearSearchTerm, attr: { 'aria-label': queue.searchTerm() ? '$T('Glitter-clearSearch')' : '$T('Glitter-search')' }">
<span class="glyphicon" data-bind="css: { 'glyphicon-search' : !queue.searchTerm(), 'glyphicon-remove' : queue.searchTerm() }"></span>
</a>
</div>
<ul class="pagination" data-bind="foreach: queue.pagination.allpages, visible: queue.pagination.hasPagination" style="display: none;">
<li data-bind="css: { active: isCurrent, disabled: isDots }, click: onclick">
<span data-bind="text: page"></span>
<li data-bind="css: { active: isCurrent, disabled: isDots }">
<!-- ko ifnot: isDots -->
<a href="#" data-bind="text: page, click: onclick, attr: { 'aria-current': isCurrent ? 'page' : null }"></a>
<!-- /ko -->
<!-- ko if: isDots -->
<span aria-hidden="true" data-bind="text: page"></span>
<!-- /ko -->
</li>
</ul>
</div>
</div><!-- /.queue-footer -->
</div>
+59 -53
View File
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<!--#set $active_lang=$active_lang.replace('_', '-').lower()#-->
<html lang="$active_lang" <!--#if $rtl#-->dir="rtl"<!--#end if#--> id="sabnzbd" data-bind="filedrop: { overlaySelector: '.main-filedrop', onFileDrop: addNZBFromFile }">
<html lang="$active_lang" <!--#if $rtl#-->dir="rtl"<!--#end if#--> id="sabnzbd" data-color-scheme="$color_scheme" data-bind="filedrop: { overlaySelector: '.main-filedrop', onFileDrop: addNZBFromFile }">
<head>
<!--
Glitter V2
@@ -25,25 +25,23 @@
<meta name="msapplication-navbutton-color" content="#000000" />
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" sizes="76x76" href="./staticcfg/ico/apple-touch-icon-76x76-precomposed.png" />
<link rel="apple-touch-icon" sizes="120x120" href="./staticcfg/ico/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="./staticcfg/ico/apple-touch-icon-152x152-precomposed.png" />
<link rel="apple-touch-icon" sizes="180x180" href="./staticcfg/ico/apple-touch-icon-180x180-precomposed.png" />
<link rel="apple-touch-icon" sizes="192x192" href="./staticcfg/ico/android-192x192.png" />
<link rel="mask-icon" href="./staticcfg/ico/safari-pinned-tab.svg" color="#383F45">
<link rel="shortcut icon" type="image/ico" href="./staticcfg/ico/favicon.ico?v=$version" data-bind="attr: { 'href': SABIcon }" />
<link rel="apple-touch-icon" sizes="76x76" href="$url('staticcfg/ico/apple-touch-icon-76x76-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="120x120" href="$url('staticcfg/ico/apple-touch-icon-120x120-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="152x152" href="$url('staticcfg/ico/apple-touch-icon-152x152-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="180x180" href="$url('staticcfg/ico/apple-touch-icon-180x180-precomposed.png', v=$cache_buster)" />
<link rel="apple-touch-icon" sizes="192x192" href="$url('staticcfg/ico/android-192x192.png', v=$cache_buster)" />
<link rel="mask-icon" href="$url('staticcfg/ico/safari-pinned-tab.svg', v=$cache_buster)" color="#383F45">
<link rel="shortcut icon" type="image/ico" href="$url('staticcfg/ico/favicon.ico', v=$cache_buster)" data-bind="attr: { 'href': SABIcon }" />
<link rel="stylesheet" type="text/css" href="./static/bootstrap/css/bootstrap.min.css?v=$version" />
<link rel="stylesheet" type="text/css" href="./static/stylesheets/glitter.css?v=$version" />
<link rel="stylesheet" type="text/css" href="./static/stylesheets/glitter.mobile.css?v=$version" media="all and (max-width: 768px)" />
<!--#if $color_scheme not in ('Light', '') #-->
<link rel="stylesheet" type="text/css" href="./static/stylesheets/colorschemes/${color_scheme}.css?v=$version"/>
<!--#end if#-->
<link rel="stylesheet" type="text/css" href="$url('static/bootstrap/css/bootstrap.min.css', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="$url('static/stylesheets/glitter.css', v=$cache_buster)" />
<link rel="stylesheet" type="text/css" href="$url('static/stylesheets/glitter.mobile.css', v=$cache_buster)" media="all and (max-width: 768px)" />
<!-- Make translations available in scripts -->
<script type="text/javascript">
var apiKey = "$apikey";
var csrfToken = "$csrf_token";
var displayLang = "$active_lang";
var dateScriptUrl = "$url('static/javascripts/date.min.js', v=$cache_buster)";
var sabSpeedHistory = [$bytespersec_list];
var newRelease = "$new_release";
var newReleaseUrl = "$new_rel_url";
@@ -52,30 +50,21 @@
var glitterTranslate = new Object();
glitterTranslate.paused = "$T('post-Paused')";
glitterTranslate.left = "$T('Glitter-left')";
glitterTranslate.clearWarn = "$T('confirm')";
glitterTranslate.clearOrphanWarning = "$T('Glitter-clearOrphanWarning')";
glitterTranslate.pausePromptFail = "$T('Glitter-pausePromptFail')"
glitterTranslate.pauseFor = "$T('pauseFor')"
glitterTranslate.minutes = "$T('mins')"
glitterTranslate.shutdown = "$T('shutdownOK?')";
glitterTranslate.restart = "$T('explain-Restart') $T('explain-needNewLogin')".replace(/\<br(\s*\/|)\>/g, '\n');
glitterTranslate.repair = "$T('explain-Repair')".replace(/<br \/>/g, "\n").replace(/&quot;/g,'"');
glitterTranslate.deleteMsg = "$T('nzo-delete')";
glitterTranslate.removeDown = "$T('confirm')";
glitterTranslate.removeDow1 = "$T('confirm')";
glitterTranslate.confirm = "$T('confirm')";
glitterTranslate.markComplete = "$T('button-mark-completed')";
glitterTranslate.renameAbort = "$T('Glitter-confirmAbortDirectUnpack')\n$T('confirm')";
glitterTranslate.retryAll = "$T('link-retryAll')?";
glitterTranslate.fetch = "$T('Glitter-fetch')";
glitterTranslate.encrypted = "$T('Glitter-encrypted')";
glitterTranslate.duplicate = "$T('Glitter-duplicate')";
glitterTranslate.tooLarge = "$T('Glitter-tooLarge')";
glitterTranslate.unwanted = "$T('Glitter-unwanted')";
glitterTranslate.incomplete = "$T('Glitter-incomplete')";
glitterTranslate.filtered = "$T('Glitter-filtered')";
glitterTranslate.waitSec = "$T('Glitter-waitSec')";
glitterTranslate.checking = "$T('post-Checking')";
glitterTranslate.misingArt = "$T('missingArt')";
glitterTranslate.noSelect = "$T('Glitter-noSelect')";
glitterTranslate.sendThanks = "$T('Glitter-sendThanks')";
glitterTranslate.fetchingURL = "$T('Glitter-addFromURL')"
glitterTranslate.chooseFile = "$T('Glitter-chooseFile')";
glitterTranslate.orphanedJobsMsg = "$T('explain-orphans')";
glitterTranslate.useCache = "$T('explain-cache_limitstr').replace("64M", "256M").replace("128M", "512M")";
@@ -85,7 +74,14 @@
glitterTranslate.defaultText = "$T('default')";
glitterTranslate.noneText = "$T('None')";
glitterTranslate.moreText = "$T('Glitter-more')";
glitterTranslate.column = [];
glitterTranslate.column['category'] = "$T('category')";
glitterTranslate.column['priority'] = "$T('priority')";
glitterTranslate.column['processing'] = "$T('swtag-pp')";
glitterTranslate.column['scripts'] = "$T('eoq-scripts')";
glitterTranslate.column['age'] = "$T('nzo-age')";
glitterTranslate.column['size'] = "$T('size')";
glitterTranslate.column['speed'] = "$T('Glitter-speed')";
glitterTranslate.status = [];
glitterTranslate.status['DirectUnpack'] = "$T('opt-direct_unpack')";
glitterTranslate.status['Completed'] = "$T('post-Completed')";
@@ -103,7 +99,9 @@
glitterTranslate.status['Repair'] = "$T('stage-repair')";
glitterTranslate.status['Filejoin'] = "$T('stage-filejoin')";
glitterTranslate.status['Unpack'] = "$T('stage-unpack')";
glitterTranslate.status['Deobfuscate'] = "$T('stage-deobfuscate')";
glitterTranslate.status['Script'] = "$T('stage-script')";
glitterTranslate.status['RSS'] = "$T('stage-rss')";
glitterTranslate.status['Source'] = "$T('stage-source')";
glitterTranslate.status['Servers'] = "$T('stage-servers')";
glitterTranslate.status['INFO'] = "$T('log-info')".replace('+', '').toUpperCase();
@@ -124,19 +122,27 @@
glitterTranslate.priority['Stop'] = "$T('pr-stop')";
</script>
<!-- Inclusion is faster than external scripts. We load momentJS locale seperatly so failure won't break anything -->
<script type="text/javascript" src="$url('staticcfg/js/jquery-3.7.1.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/js/jquery-ui.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/jquery.peity.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/jquery.hotkeys.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/moment-2.26.0.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/knockout-3.5.1.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/knockout-extensions.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/search-query-parser.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/bootstrap/js/bootstrap.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/glitter.basic.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/glitter.main.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/glitter.queue.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/glitter.history.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('static/javascripts/glitter.filelist.pagination.js', v=$cache_buster)"></script>
<script type="text/javascript">
<!--#include raw $webdir + "/static/javascripts/jquery-3.5.1.min.js"#-->
<!--#include raw $webdir + "/static/javascripts/jquery-ui.min.js"#-->
<!--#include raw $webdir + "/static/javascripts/jquery.peity.min.js"#-->
<!--#include raw $webdir + "/static/javascripts/moment-2.26.0.min.js"#-->
<!--#include raw $webdir + "/static/javascripts/knockout-3.5.1.min.js"#-->
<!--#include raw $webdir + "/static/javascripts/knockout-extensions.js"#-->
<!--#include raw $webdir + "/static/bootstrap/js/bootstrap.min.js"#-->
<!--#include $webdir + "/static/javascripts/glitter.js"#-->
jQuery(function () {
ko.applyBindings(new ViewModel(), document.getElementById("sabnzbd"));
});
</script>
<!--#if active_lang != 'en'#-->
<script type="text/javascript" src="./static/javascripts/momentjs_locale/${active_lang}.js"></script>
<script type="text/javascript" src="$url('static/javascripts/momentjs_locale/' + $active_lang + '.js', v=$cache_buster)"></script>
<!--#end if#-->
</head>
<body>
@@ -144,21 +150,21 @@
<!--#include $webdir + "/include_menu.tmpl"#-->
</div>
<div class="container main-content">
<div class="history-queue-swicher">
<ul class="nav nav-tabs">
<li class="active">
<a href="#queue-tab" data-toggle="tab">$T('menu-queue') <span class="badge" data-bind="text: queue.totalItems"></span></a>
</li>
<li>
<a href="#history-tab" data-toggle="tab">$T('menu-history')<span class="badge" data-bind="text: history.totalItems"></span></a>
</li>
<li>
<a href="#queue-messages" data-toggle="tab">$T('warnings')<span class="badge" data-bind="text: hasMessages, css: { 'badge-warning': hasMessages() }"></span></a>
</li>
</ul>
</div>
<div class="container history-queue-swicher">
<ul class="nav nav-tabs">
<li class="active">
<a href="#queue-tab" data-toggle="tab">$T('menu-queue') <span class="badge" data-bind="text: queue.totalItems"></span></a>
</li>
<li>
<a href="#history-tab" data-toggle="tab">$T('menu-history') <span class="badge badge-info" data-bind="text: history.ppItems, visible: history.ppItems"></span><span class="badge" data-bind="text: history.totalItems"></span></a>
</li>
<li>
<a href="#queue-messages" data-toggle="tab">$T('warnings') <span class="badge" data-bind="text: hasMessages, css: { 'badge-warning': hasMessages() }"></span></a>
</li>
</ul>
</div>
<div class="container main-content" data-bind="css: { 'main-content-loaded': isLoaded }">
<!--#include $webdir + "/include_queue.tmpl"#-->
<!--#include $webdir + "/include_messages.tmpl"#-->
<!--#include $webdir + "/include_history.tmpl"#-->
File diff suppressed because one or more lines are too long.
@@ -23,34 +23,19 @@ if(isMobile) {
});
}
$.ajaxSetup({
headers: { "X-SABnzbd-CSRF": csrfToken }
});
// Basic API-call
function callAPI(data) {
function callAPI(data, timeout = 10000) {
// Fill basis var's
data.output = "json";
data.apikey = apiKey;
var ajaxQuery = $.ajax({
url: "./api",
type: "GET",
cache: false,
type: "POST",
data: data,
timeout: 10000 // Wait a little longer on mobile connections
});
return $.when(ajaxQuery);
}
// Special API call
function callSpecialAPI(url, data) {
// Did we get input?
if(data == undefined) data = {};
// Fill basis var's
data.output = "json";
data.apikey = apiKey;
var ajaxQuery = $.ajax({
url: url,
type: "GET",
cache: false,
data: data
timeout: timeout
});
return $.when(ajaxQuery);
@@ -75,11 +60,11 @@ function convertHTMLtoText(htmltxt) {
// Function to re-write 0:09:21=>9:21, 0:10:10=>10:10, 0:00:30=>0:30
function rewriteTime(timeString) {
// Remove "0:0" from start
if(timeString.substring(0,3) == '0:0') {
if(timeString.substring(0,3) === '0:0') {
timeString = timeString.substring(3)
}
// Remove "0:" from start
else if(timeString.substring(0,2) == '0:') {
else if(timeString.substring(0,2) === '0:') {
timeString = timeString.substring(2)
}
return timeString
@@ -88,13 +73,13 @@ function rewriteTime(timeString) {
// How to display the date-time?
function displayDateTime(inDate, outFormat, inFormat) {
// What input?
if(inDate == '') {
if(inDate === '') {
var theMoment = moment()
} else {
var theMoment = moment.utc(inDate, inFormat)
}
// Special format or regular format?
if(outFormat == 'fromNow') {
if(outFormat === 'fromNow') {
return theMoment.fromNow()
} else {
return theMoment.local().format(outFormat)
@@ -172,7 +157,7 @@ function setCheckAllState(checkSelector, rangeSelector) {
var nrChecks = allChecks.filter(":checked");
if(nrChecks.length === 0) {
$(checkSelector).prop({'checked': false, 'indeterminate': false})
} else if(nrChecks.length == allChecks.length) {
} else if(nrChecks.length === allChecks.length) {
$(checkSelector).prop({'checked': true, 'indeterminate': false})
} else {
$(checkSelector).prop({'checked': false, 'indeterminate': true})
@@ -57,7 +57,7 @@ function Fileslisting(parent) {
$.each(response.files, function(index, slot) {
// Existing or updating?
var existingItem = ko.utils.arrayFirst(self.fileItems(), function(i) {
return i.nzf_id() == slot.nzf_id;
return i.nzf_id() === slot.nzf_id;
});
if(existingItem) {
@@ -76,7 +76,7 @@ function Fileslisting(parent) {
}
// Check if we show/hide completed
if(localStorageGetItem('showCompletedFiles') == 'No') {
if(localStorageGetItem('showCompletedFiles') === 'No') {
$('.item-files-table tr.files-done').hide();
$('#filelist-showcompleted').removeClass('hover-button')
}
@@ -217,8 +217,8 @@ function FileslistingModel(parent, data) {
self.nzf_id = ko.observable(data.nzf_id);
self.file_age = ko.observable(data.age);
self.mb = ko.observable(data.mb);
self.canselect = ko.observable(data.status != "finished" && data.status != "queued");
self.isdone = ko.observable(data.status == "finished");
self.canselect = ko.observable(data.status !== "finished" && data.status !== "queued");
self.isdone = ko.observable(data.status === "finished");
self.percentage = ko.observable(self.isdone() ? fixPercentages(100) : fixPercentages((100 - (data.mbleft / data.mb * 100)).toFixed(0)));
// Update internally
@@ -227,8 +227,8 @@ function FileslistingModel(parent, data) {
self.nzf_id(data.nzf_id)
self.file_age(data.age)
self.mb(data.mb)
self.canselect(data.status != "finished" && data.status != "queued")
self.isdone(data.status == "finished")
self.canselect(data.status !== "finished" && data.status !== "queued")
self.isdone(data.status === "finished")
// Data is given in MB, would always show 0% for small files even if completed
self.percentage(self.isdone() ? fixPercentages(100) : fixPercentages((100 - (data.mbleft / data.mb * 100)).toFixed(0)))
}
@@ -266,7 +266,7 @@ function paginationModel(parent) {
// Return object for adding
return {
page: pageNr,
isCurrent: pageNr == self.currentPage(),
isCurrent: pageNr === self.currentPage(),
isDots: false,
onclick: function(data) {
self.moveToPage(data.page);
@@ -294,7 +294,7 @@ function paginationModel(parent) {
self.nrPages(1)
self.currentStart(0);
// Are we on next page?
// Are we on next page? Bad!
if(self.currentPage() > 1) {
// Force full update
parent.parent.refresh(true);
@@ -302,9 +302,6 @@ function paginationModel(parent) {
// Move to current page
self.currentPage(1);
// Force full update
parent.parent.refresh(true);
} else {
// Calculate number of pages needed
var newNrPages = Math.ceil(parent.totalItems() / parent.paginationLimit())
@@ -359,7 +356,7 @@ function paginationModel(parent) {
}
// Change of number of pages?
if(newNrPages != self.nrPages()) {
if(newNrPages !== self.nrPages()) {
// Update
self.nrPages(newNrPages);
}
@@ -9,11 +9,17 @@ function HistoryListModel(parent) {
self.lastUpdate = 0;
self.historyItems = ko.observableArray([])
self.showFailed = ko.observable(false).extend({ persist: 'historyShowFailed' });
self.showArchive = ko.observable(false).extend({ persist: 'historyShowArchive' });
self.permanentlyDelete = ko.observable(false).extend({ persist: 'permanentlyDelete' });
self.isLoading = ko.observable(false).extend({ rateLimit: 100 });
self.searchTerm = ko.observable('').extend({ rateLimit: { timeout: 200, method: "notifyWhenChangesStop" } });
self.searchTerm = ko.observable('').extend({ rateLimit: { timeout: 400, method: "notifyWhenChangesStop" } });
self.paginationLimit = ko.observable(10).extend({ persist: 'historyPaginationLimit' });
self.totalItems = ko.observable(0);
self.deleteItems = ko.observableArray([]);
self.ppItems = ko.observable(0);
self.pagination = new paginationModel(self);
self.isMultiEditing = ko.observable(false).extend({ persist: 'historyIsMultiEditing' });
self.multiEditItems = ko.observableArray([]);
// Download history info
self.downloadedToday = ko.observable();
@@ -40,7 +46,7 @@ function HistoryListModel(parent) {
var newItems = [];
$.each(data.slots, function(index, slot) {
var existingItem = ko.utils.arrayFirst(self.historyItems(), function(i) {
return i.historyStatus.nzo_id() == slot.nzo_id;
return i.historyStatus.nzo_id() === slot.nzo_id;
});
// Set index in the results
slot.index = index
@@ -56,7 +62,7 @@ function HistoryListModel(parent) {
});
// Remove all items
if(itemIds.length == self.paginationLimit()) {
if(itemIds.length === self.paginationLimit()) {
// Replace it, so only 1 Knockout DOM-update!
self.historyItems(newItems);
newItems = [];
@@ -65,7 +71,7 @@ function HistoryListModel(parent) {
$.each(itemIds, function() {
var id = this.toString();
self.historyItems.remove(ko.utils.arrayFirst(self.historyItems(), function(i) {
return i.historyStatus.nzo_id() == id;
return i.historyStatus.nzo_id() === id;
}));
});
}
@@ -79,7 +85,7 @@ function HistoryListModel(parent) {
if(self.parent.queue.multiEditItems().length > 0) {
$.each(newItems, function() {
var currentItem = this;
self.parent.queue.multiEditItems.remove(function(inList) { return inList.id == currentItem.nzo_id; })
self.parent.queue.multiEditItems.remove(function(inList) { return inList.id === currentItem.id; })
})
}
}
@@ -93,6 +99,7 @@ function HistoryListModel(parent) {
History information
***/
self.totalItems(data.noofslots);
self.ppItems(data.ppslots)
self.downloadedToday(data.day_size);
self.downloadedWeek(data.week_size);
self.downloadedMonth(data.month_size);
@@ -110,8 +117,31 @@ function HistoryListModel(parent) {
value: newValue
})
}
// Update pagination and counters
self.parent.refresh(true)
});
self.triggerRemoveDownload = function(items) {
// Show and fill modal
self.deleteItems.removeAll()
// Single or multiple items?
if(items.length) {
ko.utils.arrayPushAll(self.deleteItems, items)
} else {
self.deleteItems.push(items)
}
// Show modal or delete right away
if(self.parent.confirmDeleteHistory()) {
// Open modal if desired
$('#modal-delete-history-job').modal("show")
} else {
// Otherwise just submit right away
$('#modal-delete-history-job form').submit()
}
}
// Retry a job
self.retryJob = function(form) {
// Adding a extra retry file happens through this special function
@@ -120,7 +150,6 @@ function HistoryListModel(parent) {
data.append("nzbfile", $(form.nzbFile)[0].files[0]);
data.append("value", $('#modal-retry-job input[name="retry_job_id"]').val());
data.append("password", $('#retry_job_password').val());
data.append("apikey", apiKey);
// Add
$.ajax({
@@ -139,30 +168,30 @@ function HistoryListModel(parent) {
form.reset()
}
// Searching in history (rate-limited in decleration)
// Searching in history (rate-limited in declaration)
self.searchTerm.subscribe(function() {
// Make sure we refresh
self.lastUpdate = 0
self.parent.refresh();
// Go back to page 1
if(self.pagination.currentPage() != 1) {
if(self.pagination.currentPage() !== 1) {
// This forces a refresh
self.pagination.moveToPage(1);
} else {
// Make sure we refresh
self.parent.refresh(true);
}
})
// Clear searchterm
self.clearSearchTerm = function(data, event) {
// Was it escape key or click?
if(event.type == 'mousedown' || (event.keyCode && event.keyCode == 27)) {
if(event.type === 'click' || (event.keyCode && event.keyCode === 27)) {
// Set the loader so it doesn't flicker and then switch
self.isLoading(true)
self.searchTerm('');
self.parent.refresh()
}
// Was it click and the field is empty? Then we focus on the field
if(event.type == 'mousedown' && self.searchTerm() == '') {
if(event.type === 'click' && self.searchTerm() === '') {
$(event.target).parents('.search-box').find('input[type="text"]').focus()
return;
return false;
}
// Need to return true to allow typing
return true;
@@ -170,10 +199,17 @@ function HistoryListModel(parent) {
// Toggle showing failed
self.toggleShowFailed = function(data, event) {
// Set the loader so it doesn't flicker and then switch
self.isLoading(true)
self.showFailed(!self.showFailed())
// Forde hide tooltip so it doesn't linger
// Force hide tooltip so it doesn't linger
$('#history-options a').tooltip('hide')
// Force refresh
self.parent.refresh(true)
}
// Toggle showing archive
self.toggleShowArchive = function(data, event) {
self.showArchive(!self.showArchive())
// Force hide tooltip so it doesn't linger
$('#history-options a').tooltip('hide')
// Force refresh
self.parent.refresh(true)
@@ -195,36 +231,34 @@ function HistoryListModel(parent) {
// Empty history options
self.emptyHistory = function(data, event) {
// Make sure no flickering
self.isLoading(true)
// What event?
var whatToRemove = $(event.target).data('action');
var skipArchive = $('#modal-purge-history input[type="checkbox"]').prop("checked")
var del_files, value;
// Purge failed
if(whatToRemove == 'history-purge-failed') {
if(whatToRemove === 'history-purge-failed') {
del_files = 0;
value = 'failed';
}
// Also remove files
if(whatToRemove == 'history-purgeremove-failed') {
if(whatToRemove === 'history-purgeremove-failed') {
del_files = 1;
value = 'failed';
}
// Remove completed
if(whatToRemove == 'history-purge-completed') {
if(whatToRemove === 'history-purge-completed') {
del_files = 0;
value = 'completed';
}
// Remove the ones on this page
if(whatToRemove == 'history-purge-page') {
if(whatToRemove === 'history-purge-page') {
// List all the ID's
var strIDs = '';
$.each(self.historyItems(), function(index) {
// Only append when it's a download that can be deleted
if(!this.processingDownload() && !this.processingWaiting()) {
strIDs = strIDs + this.nzo_id + ',';
strIDs = strIDs + this.id + ',';
}
})
// Send the command
@@ -232,6 +266,7 @@ function HistoryListModel(parent) {
mode: 'history',
name: 'delete',
del_files: 1,
archive: (!skipArchive) * 1,
value: strIDs
}).then(function() {
// Clear search, refresh and hide
@@ -246,13 +281,197 @@ function HistoryListModel(parent) {
callAPI({
mode: 'history',
name: 'delete',
value: value,
del_files: del_files
del_files: del_files,
archive: (!skipArchive) * 1,
value: value
}).then(function() {
self.parent.refresh();
$("#modal-purge-history").modal('hide');
});
};
// Show the input checkbox
self.showMultiEdit = function() {
self.isMultiEditing(!self.isMultiEditing())
self.multiEditItems.removeAll();
$('.history-table input[name="multiedit"], #multiedit-checkall-history').prop({'checked': false, 'indeterminate': false})
}
// Add to the list
self.addMultiEdit = function(item, event) {
// Is it a shift-click?
if(event.shiftKey) {
checkShiftRange('.history-table input[name="multiedit"]');
}
// Add or remove from the list?
if(event.currentTarget.checked) {
// Add item
self.multiEditItems.push(item);
} else {
// Go over them all to know which one to remove
self.multiEditItems.remove(function(inList) { return inList.id == item.id; })
}
// Update check-all buton state
setCheckAllState('#multiedit-checkall-history', '.history-table input[name="multiedit"]')
return true;
}
// Check all
self.checkAllJobs = function(item, event) {
// Get which ones we care about
var allChecks = $('.history-table input[name="multiedit"]').filter(':not(:disabled):visible');
// We need to re-evaltuate the state of this check-all
// Otherwise the 'inderterminate' will be overwritten by the click event!
setCheckAllState('#multiedit-checkall-history', '.history-table input[name="multiedit"]')
// Now we can check what happend
// For when some are checked, or all are checked (but not partly)
if(event.target.indeterminate || (event.target.checked && !event.target.indeterminate)) {
var allActive = allChecks.filter(":checked")
// First remove the from the list
if(allActive.length == self.multiEditItems().length) {
// Just remove all
self.multiEditItems.removeAll();
// Remove the check
allActive.prop('checked', false)
} else {
// Remove them seperate
allActive.each(function() {
// Go over them all to know which one to remove
var item = ko.dataFor(this)
self.multiEditItems.remove(function(inList) { return inList.id == item.id; })
// Remove the check of this one
this.checked = false;
})
}
} else {
// None are checked, so check and add them all
allChecks.prop('checked', true)
allChecks.each(function() { self.multiEditItems.push(ko.dataFor(this)) })
event.target.checked = true
}
// Set state of all the check-all's
setCheckAllState('#multiedit-checkall-history', '.history-table input[name="multiedit"]')
return true;
}
// Remove downloads from history
self.removeDownloads = function(form) {
// Hide modal and show notification
$('#modal-delete-history-job').modal("hide")
showNotification('.main-notification-box-removing')
var strIDsPP = '';
var strIDsHistory = '';
$.each(self.deleteItems(), function(index) {
// Split in jobs that need post-processing aborted, and jobs that need to be deleted
if(this.processingDownload() === 2) {
strIDsPP = strIDsPP + this.id + ',';
// These items should not be listed in the deletedItems later on
// as active post-processing aren't removed from the history output
self.deleteItems.remove(this)
} else {
strIDsHistory = strIDsHistory + this.id + ',';
}
})
// Trigger post-processing aborting
if(strIDsPP !== "") {
callAPI({
mode: 'cancel_pp',
value: strIDsPP
}).then(function(response) {
// Only hide and refresh
self.parent.refresh();
hideNotification()
});
}
if(strIDsHistory !== "") {
var skipArchive = $('#modal-delete-history-job input[type="checkbox"]').prop("checked")
// Permanently delete if we are on the Archive page
if(self.showArchive()) skipArchive = true
callAPI({
mode: 'history',
name: 'delete',
del_files: 1,
archive: (!skipArchive) * 1,
value: strIDsHistory
}).then(function(response) {
self.historyItems.removeAll(self.deleteItems());
self.multiEditItems.removeAll(self.deleteItems())
self.parent.refresh();
hideNotification()
});
}
};
// Delete all selected
self.doMultiDelete = function() {
// Anything selected?
if(self.multiEditItems().length < 1) return;
// Trigger modal
self.triggerRemoveDownload(self.multiEditItems())
}
// Mark jobs as completed
self.markAsCompleted = function(items) {
// Confirm
if(!confirm(glitterTranslate.markComplete)) {
return
}
// Single or multiple items?
var strIDs = '';
if(items.length) {
$.each(items, function(index) {
strIDs = strIDs + this.id + ',';
})
} else {
strIDs = items.id
}
// Send the API call
callAPI({
mode: 'history',
name: 'mark_as_completed',
value: strIDs
}).then(function(response) {
// Force refresh to update the UI
self.parent.refresh(true);
});
}
// Mark all selected as completed
self.doMultiMarkCompleted = function() {
// Anything selected?
if(self.multiEditItems().length < 1) return;
// Mark them
self.markAsCompleted(self.multiEditItems());
}
// Focus on the confirm button
$('#modal-delete-history-job').on("shown.bs.modal", function() {
$('#modal-delete-history-job .btn[type="submit"]').focus()
})
// On change of page we need to check all those that were in the list!
self.historyItems.subscribe(function() {
// We need to wait until the unit is actually finished rendering
setTimeout(function() {
$.each(self.multiEditItems(), function(index) {
$('#multiedit_' + this.id).prop('checked', true);
})
// Update check-all buton state
setCheckAllState('#multiedit-checkall-history', '.history-table input[name="multiedit"]')
}, 100)
}, null, "arrayChange")
}
/**
@@ -266,7 +485,7 @@ function HistoryModel(parent, data) {
// If we update the full set every time it uses lot of CPU
// The Status/Actionline/scriptline/completed we do update every time
// When clicked on the more-info button we load the rest again
self.nzo_id = data.nzo_id;
self.id = data.nzo_id;
self.index = data.index;
self.updateAllHistory = false;
self.hasDropdown = ko.observable(false);
@@ -303,14 +522,14 @@ function HistoryModel(parent, data) {
// Waiting?
self.processingWaiting = ko.pureComputed(function() {
return(self.status() == 'Queued')
return(self.status() === 'Queued')
})
// Processing or done?
self.processingDownload = ko.pureComputed(function() {
var status = self.status();
// When we can cancel
if (status === 'Extracting' || status === 'Verifying' || status == 'Repairing' || status === 'Running') {
if (status === 'Extracting' || status === 'Verifying' || status === 'Repairing' || status === 'Running') {
return 2
}
// These cannot be cancelled
@@ -344,7 +563,7 @@ function HistoryModel(parent, data) {
try {
// Extract the Download section
var downloadLog = ko.utils.arrayFirst(self.historyStatus.stage_log(), function(item) {
return item.name() == 'Download'
return item.name() === 'Download'
});
// Extract the speed
return downloadLog.actions()[0].match(/(\S*\s\S+)(?=<br\/>)/)[0]
@@ -353,7 +572,7 @@ function HistoryModel(parent, data) {
return;
case 'category':
// Exception for *
if(self.historyStatus.category() == "*")
if(self.historyStatus.category() === "*")
return glitterTranslate.defaultText
return self.historyStatus.category();
case 'size':
@@ -367,6 +586,11 @@ function HistoryModel(parent, data) {
return displayDateTime(self.completed(), parent.parent.dateFormat(), 'X')
});
// Format time added
self.timeAdded = ko.pureComputed(function() {
return displayDateTime(self.historyStatus.time_added(), parent.parent.dateFormat(), 'X')
});
// Subscribe to retryEvent so we can load the password
self.canRetry.subscribe(function() {
self.updateAllHistory = true;
@@ -375,13 +599,18 @@ function HistoryModel(parent, data) {
// Re-try button
self.retry = function() {
// Set JOB-id
$('#modal-retry-job input[name="retry_job_id"]').val(self.nzo_id)
$('#modal-retry-job input[name="retry_job_id"]').val(self.id)
// Set password
$('#retry_job_password').val(self.historyStatus.password())
// Open modal
$('#modal-retry-job').modal("show")
};
// Mark as completed button
self.markAsCompleted = function() {
parent.markAsCompleted(self);
};
// Update information only on click
self.updateAllHistoryInfo = function(data, event) {
// Show
@@ -408,144 +637,13 @@ function HistoryModel(parent, data) {
$(this).hide()
} else {
// Info in modal
$('#history-script-log .modal-body').load($(this).attr('href'), function(result) {
// Set title and then remove it
$('#history-script-log .modal-title').text($(this).find("h3").text())
$(this).find("h3, title").remove()
$('#history-script-log').modal('show');
$('#history-script-log .modal-body pre').load($(this).attr('href'), function(result) {
var modal = $('#history-script-log');
modal.find('.modal-title').text(self.historyStatus.name());
modal.modal('show');
});
}
return false;
})
}
// Delete button
self.deleteSlot = function(item, event) {
// Confirm?
if(!self.parent.parent.confirmDeleteHistory() || confirm(glitterTranslate.deleteMsg + ":\n" + item.historyStatus.name() + "\n\n" + glitterTranslate.removeDow1)) {
// Are we still processing and it can be stopped?
if(item.processingDownload() == 2) {
callAPI({
mode: 'cancel_pp',
value: self.nzo_id
})
// All we can do is wait
} else {
// Delete the item
callAPI({
mode: 'history',
name: 'delete',
del_files: 1,
value: self.nzo_id
}).then(function(response) {
if(response.status) {
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
self.parent.historyItems.remove(self);
self.parent.parent.refresh();
}
});
}
}
};
// User voting
self.setUserVote = function(item, event) {
// Send vote
callAPI({
mode: 'queue',
name: 'rating',
type: 'vote',
setting: $(event.target).val(),
value: self.nzo_id
}).then(function(response) {
// Update all info
self.updateAllHistory = true;
self.parent.parent.refresh(true)
})
}
// User rating
self.setUserRating = function(item, event) {
// Audio or video
var changeWhat = 'audio';
if($(event.target).attr('name') == 'ratings-video') {
changeWhat = 'video';
}
// Only on user-event, not the auto-fired ones
if(!event.originalEvent) return;
// Send vote
callAPI({
mode: 'queue',
name: 'rating',
type: changeWhat,
setting: $(event.target).val(),
value: self.nzo_id
}).then(function(response) {
// Update all info
self.updateAllHistory = true;
self.parent.parent.refresh(true)
})
}
// User comment
self.setUserReport = function(form) {
// What are we reporting?
var userReport = $(form).find('input[name="rating_flag"]:checked').val();
var userDetail = '';
// Anything selected?
if(!userReport) {
alert(glitterTranslate.noSelect)
return;
}
// Extra info?
if(userReport == 'comment') userDetail = $(form).find('input[name="ratings-report-comment"]').val();
if(userReport == 'other') userDetail = $(form).find('input[name="ratings-report-other"]').val();
// Exception for servers
if(userReport == 'expired') {
// Which server?
userDetail = $(form).find('select[name="ratings-report-expired-server"]').val();
// All?
if(userDetail == "") {
// Loop over all servers
$.each(parent.parent.servers, function(index, server) {
// Set timeout because simultanious requests don't work (yet)
setTimeout(function() {
submitUserReport(server.name)
}, index * 1500)
})
} else {
// Just the one server
submitUserReport(userDetail)
}
} else {
submitUserReport(userDetail)
}
// After all, close it
form.reset();
$(form).parent().parent().dropdown('toggle');
alert(glitterTranslate.sendThanks)
function submitUserReport(theDetail) {
// Send note
callAPI({
mode: 'queue',
name: 'rating',
type: 'flag',
setting: userReport,
detail: theDetail,
value: self.nzo_id
})
}
return false
}
}
}
@@ -1,56 +0,0 @@
/******
Glitter V1
By Safihre (2015) - safihre@sabnzbd.org
Code extended from Shiny-template
Code examples used from Knockstrap-template
The setup is hierarchical, 1 main ViewModel that contains:
- ViewModel
- QueueListModel
- paginationModel
- QueueModel (item 1)
- QueueModel (item 2)
- ...
- QueueModel (item n+1)
- HistoryListModel
- paginationModel
- HistoryModel (item 1)
- HistoryModel (item 2)
- ...
- HistoryModel (item n+1)
- Fileslisting
- FileslistingModel (file 1)
- FileslistingModel (file 2)
- ...
- FileslistingModel (file n+1)
ViewModel also contains all the code executed on document ready and
functions responsible for the status information, adding NZB, etc.
The QueueModel/HistoryModel's get added to the list-models when
jobs are added or on switching of pages (using paginationModel).
Once added only the properties that changed during a refresh
get updated. In the history all the detailed information is only
updated when created and when the user clicks on a detail.
The Fileslisting is only populated and updated when it is opened
for one of the QueueModel's.
******/
#include raw $webdir + "/static/javascripts/glitter.basic.js"#
/**
GLITTER CODE
**/
\$(function() {
'use strict';
#include raw $webdir + "/static/javascripts/glitter.main.js"#
#include raw $webdir + "/static/javascripts/glitter.queue.js"#
#include raw $webdir + "/static/javascripts/glitter.history.js"#
#include raw $webdir + "/static/javascripts/glitter.filelist.pagination.js"#
// GO!!!
ko.applyBindings(new ViewModel(), document.getElementById("sabnzbd"));
});
File diff suppressed because it is too large. Load diff
@@ -6,8 +6,6 @@ function QueueListModel(parent) {
var self = this;
self.parent = parent;
self.dragging = false;
self.rawCatList = [];
self.rawScriptList = [];
// Because SABNZB returns the name
// But when you want to set Priority you need the number..
@@ -34,12 +32,13 @@ function QueueListModel(parent) {
// External var's
self.queueItems = ko.observableArray([]);
self.totalItems = ko.observable(0);
self.deleteItems = ko.observableArray([]);
self.isMultiEditing = ko.observable(false).extend({ persist: 'queueIsMultiEditing' });
self.isLoading = ko.observable(false).extend({ rateLimit: 100 });
self.multiEditItems = ko.observableArray([]);
self.categoriesList = ko.observableArray([]);
self.scriptsList = ko.observableArray([]);
self.searchTerm = ko.observable('').extend({ rateLimit: { timeout: 200, method: "notifyWhenChangesStop" } });
self.searchTerm = ko.observable('').extend({ rateLimit: { timeout: 400, method: "notifyWhenChangesStop" } });
self.paginationLimit = ko.observable(20).extend({ persist: 'queuePaginationLimit' });
self.pagination = new paginationModel(self);
@@ -66,31 +65,6 @@ function QueueListModel(parent) {
return i.id;
});
// Did the category-list change?
// Otherwise KO will send updates to all <select> for every refresh()
if(self.rawCatList != data.categories.toString()) {
// Reformat categories
self.categoriesList($.map(data.categories, function(cat) {
// Default?
if(cat == '*') return { catValue: '*', catText: glitterTranslate.defaultText };
return { catValue: cat, catText: cat };
}))
// Update
self.rawCatList = data.categories.toString();
}
// Did the script-list change?
if(self.rawScriptList != data.scripts.toString()) {
// Reformat script-list
self.scriptsList($.map(data.scripts, function(script) {
// Default?
if(script == 'None') return glitterTranslate.noneText;
return script;
}))
// Update
self.rawScriptList = data.scripts.toString();
}
// Set limit
self.totalItems(data.noofslots);
@@ -101,7 +75,7 @@ function QueueListModel(parent) {
$.each(data.slots, function() {
var item = this;
var existingItem = ko.utils.arrayFirst(self.queueItems(), function(i) {
return i.id == item.nzo_id;
return i.id === item.nzo_id;
});
if(existingItem) {
@@ -114,7 +88,7 @@ function QueueListModel(parent) {
});
// Remove all items if there's any
if(itemIds.length == self.paginationLimit()) {
if(itemIds.length === self.paginationLimit()) {
// Replace it, so only 1 Knockout DOM-update!
self.queueItems(newItems);
newItems = [];
@@ -123,7 +97,7 @@ function QueueListModel(parent) {
$.each(itemIds, function() {
var id = this.toString();
self.queueItems.remove(ko.utils.arrayFirst(self.queueItems(), function(i) {
return i.id == id;
return i.id === id;
}));
});
}
@@ -174,6 +148,27 @@ function QueueListModel(parent) {
}
self.triggerRemoveDownload = function(items) {
// Show and fill modal
self.deleteItems.removeAll()
// Single or multiple items?
if(items.length) {
ko.utils.arrayPushAll(self.deleteItems, items)
} else {
self.deleteItems.push(items)
}
// Show modal or delete right away
if(self.parent.confirmDeleteQueue()) {
// Open modal if desired
$('#modal-delete-queue-job').modal("show")
} else {
// Otherwise just submit right away
$('#modal-delete-queue-job form').submit()
}
}
// Save pagination state
self.paginationLimit.subscribe(function(newValue) {
// Save in config if global
@@ -185,6 +180,8 @@ function QueueListModel(parent) {
value: newValue
})
}
// Update pagination and counters
self.parent.refresh(true)
});
// Do we show search box. So it doesn't dissapear when nothing is found
@@ -194,26 +191,27 @@ function QueueListModel(parent) {
// Searching in queue (rate-limited in decleration)
self.searchTerm.subscribe(function() {
// Refresh now
self.parent.refresh();
// Go back to page 1
if(self.pagination.currentPage() != 1) {
if(self.pagination.currentPage() !== 1) {
// This forces a refresh
self.pagination.moveToPage(1);
} else {
// Refresh now
self.parent.refresh();
}
})
// Clear searchterm
self.clearSearchTerm = function(data, event) {
// Was it escape key or click?
if(event.type == 'mousedown' || (event.keyCode && event.keyCode == 27)) {
if(event.type === 'click' || (event.keyCode && event.keyCode === 27)) {
self.isLoading(true)
self.searchTerm('');
self.parent.refresh()
}
// Was it click and the field is empty? Then we focus on the field
if(event.type == 'mousedown' && self.searchTerm() == '') {
if(event.type === 'click' && self.searchTerm() === '') {
$(event.target).parents('.search-box').find('input[type="text"]').focus()
return;
return false;
}
// Need to return true to allow typing
return true;
@@ -226,6 +224,14 @@ function QueueListModel(parent) {
// What action?
var sort, dir;
switch($(event.currentTarget).data('action')) {
case 'sortRemainingAsc':
sort = 'remaining';
dir = 'asc';
break;
case 'sortRemainingBytesAsc':
sort = 'remaining_bytes';
dir = 'asc';
break;
case 'sortAgeAsc':
sort = 'avg_age';
dir = 'desc';
@@ -274,7 +280,7 @@ function QueueListModel(parent) {
// Reset form and remove all checked ones
$form[0].reset();
self.multiEditItems.removeAll();
$('.delete input[name="multiedit"], #multiedit-checkall').prop({'checked': false, 'indeterminate': false})
$('.queue-table input[name="multiedit"], #multiedit-checkall-queue').prop({'checked': false, 'indeterminate': false})
// Is the multi-edit in view?
if(($form.offset().top + $form.outerHeight(true)) > ($(window).scrollTop()+$(window).height())) {
@@ -304,7 +310,7 @@ function QueueListModel(parent) {
}
// Update check-all buton state
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
setCheckAllState('#multiedit-checkall-queue', '.queue-table input[name="multiedit"]')
return true;
}
@@ -315,7 +321,7 @@ function QueueListModel(parent) {
// We need to re-evaltuate the state of this check-all
// Otherwise the 'inderterminate' will be overwritten by the click event!
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
setCheckAllState('#multiedit-checkall-queue', '.queue-table input[name="multiedit"]')
// Now we can check what happend
// For when some are checked, or all are checked (but not partly)
@@ -347,7 +353,7 @@ function QueueListModel(parent) {
self.doMultiEditUpdate()
}
// Set state of all the check-all's
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
setCheckAllState('#multiedit-checkall-queue', '.queue-table input[name="multiedit"]')
return true;
}
@@ -364,92 +370,160 @@ 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 != '') {
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
// Handle mousedown to capture state before change
self.handleMultiEditStatusMouseDown = function(item, event) {
var clickedValue = $(event.currentTarget).find("input").val();
// If this radio was already selected (same value as previous), clear it
if ($('.multioperations-selector input[name="multiedit-status"]:checked').val() === clickedValue) {
// Clear all radio buttons in this group after the click finished
// Hacky, but it works
setTimeout(function () {
$('.multioperations-selector input[name="multiedit-status"]').prop('checked', false);
}, 200)
}
return true;
}
// Remove downloads from queue
self.removeDownloads = function(form) {
// Hide modal and show notification
$('#modal-delete-queue-job').modal("hide")
showNotification('.main-notification-box-removing')
var strIDs = '';
$.each(self.deleteItems(), function(index) {
strIDs = strIDs + this.id + ',';
})
callAPI({
mode: 'queue',
name: 'delete',
del_files: 1,
value: strIDs
}).then(function(response) {
self.queueItems.removeAll(self.deleteItems());
self.multiEditItems.removeAll(self.deleteItems())
self.parent.refresh();
hideNotification()
});
};
// Delete all selected
self.doMultiDelete = function() {
// Anything selected?
if(self.multiEditItems().length < 1) return;
// Need confirm
if(!self.parent.confirmDeleteQueue() || confirm(glitterTranslate.removeDown)) {
// List all the ID's
var strIDs = '';
$.each(self.multiEditItems(), function(index) {
strIDs = strIDs + this.id + ',';
})
// Show notification
showNotification('.main-notification-box-removing-multiple', 0, self.multiEditItems().length)
// Remove
callAPI({
mode: 'queue',
name: 'delete',
del_files: 1,
value: strIDs
}).then(function(response) {
if(response.status) {
// Make sure the queue doesnt flicker and then fade-out
self.isLoading(true)
self.parent.refresh()
// Empty it
self.multiEditItems.removeAll();
// Hide notification
hideNotification()
}
})
}
// Trigger modal
self.triggerRemoveDownload(self.multiEditItems())
}
// Move all selected to top
self.doMultiMoveToTop = function() {
// Anything selected?
if(self.multiEditItems().length < 1) return;
// Move each item to the top, starting from the last one in the sorted list
var arrayList = self.multiEditItems()
var movePromises = [];
for(var i = arrayList.length - 1; i >= 0; i--) {
movePromises.push(callAPI({
mode: "switch",
value: arrayList[i].id,
value2: 0
}));
}
// Wait for all moves to complete then refresh
Promise.all(movePromises).then(function() {
self.parent.refresh();
});
}
// Move all selected to bottom
self.doMultiMoveToBottom = function() {
// Anything selected?
if(self.multiEditItems().length < 1) return;
// Move each item to the bottom, starting from the first one in the sorted list
var arrayList = self.multiEditItems()
var movePromises = [];
for(var i = 0; i < arrayList.length; i++) {
movePromises.push(callAPI({
mode: "switch",
value: arrayList[i].id,
value2: self.totalItems() - 1
}));
}
// Wait for all moves to complete then refresh
Promise.all(movePromises).then(function() {
self.parent.refresh();
});
}
// Focus on the confirm button
$('#modal-delete-queue-job').on("shown.bs.modal", function() {
$('#modal-delete-queue-job .btn[type="submit"]').focus()
})
// On change of page we need to check all those that were in the list!
self.queueItems.subscribe(function() {
// We need to wait until the unit is actually finished rendering
@@ -459,7 +533,7 @@ function QueueListModel(parent) {
})
// Update check-all buton state
setCheckAllState('#multiedit-checkall', '.queue-table input[name="multiedit"]')
setCheckAllState('#multiedit-checkall-queue', '.queue-table input[name="multiedit"]')
}, 100)
}, null, "arrayChange")
}
@@ -479,8 +553,8 @@ function QueueModel(parent, data) {
self.index = ko.observable(data.index);
self.status = ko.observable(data.status);
self.labels = ko.observableArray(data.labels);
self.isGrabbing = ko.observable(data.status == 'Grabbing' || data.avg_age == '-')
self.isFetchingBlocks = data.status == 'Fetching' || data.priority == 'Repair' // No need to update
self.isGrabbing = ko.observable(data.status === 'Grabbing' || !parseFloat(data.mb)) // mb===0 catches paused URL-grab jobs (status 'Paused'), needed to block show-files
self.isFetchingBlocks = data.status === 'Fetching' || data.priority === 'Repair' // No need to update
self.totalMB = ko.observable(parseFloat(data.mb));
self.remainingMB = ko.observable(parseFloat(data.mbleft))
self.missingMB = ko.observable(parseFloat(data.mbmissing))
@@ -491,7 +565,7 @@ function QueueModel(parent, data) {
self.priority = ko.observable(parent.priorityName[data.priority]);
self.script = ko.observable(data.script);
self.unpackopts = ko.observable(parseInt(data.unpackopts)) // UnpackOpts fails if not parseInt'd!
self.pausedStatus = ko.observable(data.status == 'Paused');
self.pausedStatus = ko.observable(data.status === 'Paused');
self.timeLeft = ko.observable(data.timeleft);
// Initially empty
@@ -502,7 +576,7 @@ function QueueModel(parent, data) {
// Color of the progress bar
self.progressColor = ko.computed(function() {
// Checking
if(self.status() == 'Checking') {
if(self.status() === 'Checking') {
return '#58A9FA'
}
// Check for missing data, the value is arbitrary! (2%)
@@ -510,7 +584,7 @@ function QueueModel(parent, data) {
return '#F8A34E'
}
// Set to grey, only when not Force download
if((self.parent.parent.downloadsPaused() && self.priority() != 2) || self.pausedStatus()) {
if((self.parent.parent.downloadsPaused() && self.priority() !== 2) || self.pausedStatus()) {
return '#B7B7B7'
}
// Nothing
@@ -519,6 +593,9 @@ function QueueModel(parent, data) {
// MB's
self.progressText = ko.pureComputed(function() {
if(self.isGrabbing()) {
return glitterTranslate.fetchingURL
}
return (self.totalMB() - self.remainingMB()).toFixed(0) + " MB / " + (self.totalMB() * 1).toFixed(0) + " MB";
})
@@ -531,23 +608,22 @@ function QueueModel(parent, data) {
return self.name()
})
self.missingText = ko.pureComputed(function() {
// Check for missing data, the value is arbitrary! (1%)
if(self.missingMB()/self.totalMB() > 0.01) {
// Check for missing data, can show 0 if article-size is smaller than 500K, but we accept that
if(self.missingMB()) {
return self.missingMB().toFixed(0) + ' MB ' + glitterTranslate.misingArt
}
return;
})
self.statusText = ko.computed(function() {
// Checking
if(self.status() == 'Checking') {
if(self.status() === 'Checking') {
return glitterTranslate.checking
}
// Grabbing
if(self.status() == 'Grabbing') {
if(self.status() === 'Grabbing') {
return glitterTranslate.fetch
}
// Pausing status
if((self.parent.parent.downloadsPaused() && self.priority() != 2) || self.pausedStatus()) {
if((self.parent.parent.downloadsPaused() && self.priority() !== 2) || self.pausedStatus()) {
return glitterTranslate.paused;
}
// Just the time
@@ -557,7 +633,7 @@ function QueueModel(parent, data) {
// Icon to better show force-priority
self.queueIcon = ko.computed(function() {
// Force comes first
if(self.priority() == 2) {
if(self.priority() === 2) {
return 'glyphicon-forward'
}
if(self.pausedStatus()) {
@@ -571,17 +647,17 @@ function QueueModel(parent, data) {
switch(param) {
case 'category':
// Exception for *
if(self.category() == "*")
if(self.category() === "*")
return glitterTranslate.defaultText
return self.category();
case 'priority':
// Onload-exception
if(self.priority() == undefined) return;
return ko.utils.arrayFirst(self.parent.priorityOptions(), function(item) { return item.value == self.priority()}).name;
if(self.priority() === undefined) return;
return ko.utils.arrayFirst(self.parent.priorityOptions(), function(item) { return item.value === self.priority()}).name;
case 'processing':
// Onload-exception
if(self.unpackopts() == undefined) return;
return ko.utils.arrayFirst(self.parent.processingOptions(), function(item) { return item.value == self.unpackopts()}).name;
if(self.unpackopts() === undefined) return;
return ko.utils.arrayFirst(self.parent.processingOptions(), function(item) { return item.value === self.unpackopts()}).name;
case 'scripts':
return self.script();
case 'age':
@@ -597,7 +673,7 @@ function QueueModel(parent, data) {
self.password(data.password);
self.index(data.index);
self.status(data.status)
self.isGrabbing(data.status == 'Grabbing' || data.avg_age == '-')
self.isGrabbing(data.status === 'Grabbing' || !parseFloat(data.mb))
self.totalMB(parseFloat(data.mb));
self.remainingMB(parseFloat(data.mbleft));
self.missingMB(parseFloat(data.mbmissing))
@@ -608,12 +684,12 @@ function QueueModel(parent, data) {
self.priority(parent.priorityName[data.priority]);
self.script(data.script);
self.unpackopts(parseInt(data.unpackopts)) // UnpackOpts fails if not parseInt'd!
self.pausedStatus(data.status == 'Paused');
self.pausedStatus(data.status === 'Paused');
self.timeLeft(data.timeleft);
// Did the label-list change?
// Otherwise KO will send updates to all texts during refresh()
if(self.rawLabels != data.labels.toString()) {
if(self.rawLabels !== data.labels.toString()) {
// Update
self.labels(data.labels);
self.rawLabels = data.labels.toString();
@@ -638,9 +714,37 @@ function QueueModel(parent, data) {
self.editingName(true)
self.nameForEdit(self.name())
// Select
$(event.target).parents('.name').find('input').select()
}
// Select the input
const $input = $(event.target).parents('.name').find('input');
$input.select();
// Add Tab/Shift+Tab navigation
$input.off('keydown.tabnav').on('keydown.tabnav', function (e) {
if (e.key === 'Tab') {
e.preventDefault();
// Find all rename inputs that are currently visible
const inputs = $('.queue-table input[type="text"]');
const currentIndex = inputs.index(this);
let nextIndex = e.shiftKey ? currentIndex - 1 : currentIndex + 1;
// Wrap around
if (nextIndex >= inputs.length) nextIndex = 0;
if (nextIndex < 0) nextIndex = inputs.length - 1;
// Simulate clicking Rename on the next row
const $nextRow = inputs.eq(nextIndex).closest('tr');
$nextRow.find('.hover-button[title="Rename"]').click();
// Delay focusing to wait for new input to appear
setTimeout(() => {
const $nextInput = $('.queue-table input[type="text"]').eq(nextIndex);
$nextInput.focus().select();
}, 50);
}
});
};
// Catch the submit action
self.editingNameSubmit = function() {
@@ -650,7 +754,7 @@ function QueueModel(parent, data) {
// Do on change
self.nameForEdit.subscribe(function(newName) {
// Anything change or empty?
if(!newName || self.name() == newName) return;
if(!newName || self.name() === newName) return;
// Rename would abort Direct Unpack, so ask if user is sure
if(self.direct_unpack() && !confirm(glitterTranslate.renameAbort)) return;
@@ -682,41 +786,39 @@ function QueueModel(parent, data) {
}
// Change of settings
self.changeCat = function(item, event) {
self.changeCat = function() {
callAPI({
mode: 'change_cat',
value: item.id,
value2: item.category()
value: self.id,
value2: self.category()
}).then(function() {
// Hide all tooltips before we refresh
$('.queue-item-settings li').filter('[data-tooltip="true"]').tooltip('hide')
self.parent.parent.refresh()
})
}
self.changeScript = function(item) {
// Not on empty handlers
if(!item.script() || parent.scriptsList().length <= 1) return;
self.changeScript = function() {
callAPI({
mode: 'change_script',
value: item.id,
value2: item.script()
value: self.id,
value2: self.script()
})
}
self.changeProcessing = function(item) {
self.changeProcessing = function() {
callAPI({
mode: 'change_opts',
value: item.id,
value2: item.unpackopts()
value: self.id,
value2: self.unpackopts()
})
}
self.changePriority = function(item, event) {
self.changePriority = function() {
// Not if we are fetching extra blocks for repair!
if(item.isFetchingBlocks) return
if(self.isFetchingBlocks) return
callAPI({
mode: 'queue',
name: 'priority',
value: item.id,
value2: item.priority()
value: self.id,
value2: self.priority()
}).then(function() {
// Hide all tooltips before we refresh
$('.queue-item-settings li').filter('[data-tooltip="true"]').tooltip('hide')
@@ -724,29 +826,5 @@ function QueueModel(parent, data) {
})
}
// Remove 1 download from queue
self.removeDownload = function(item, event) {
// Confirm and remove
if(!self.parent.parent.confirmDeleteQueue() || confirm(glitterTranslate.deleteMsg + ":\n" + item.name() + "\n\n" + glitterTranslate.removeDow1)) {
var itemToDelete = this;
// Show notification
showNotification('.main-notification-box-removing')
callAPI({
mode: 'queue',
name: 'delete',
del_files: 1,
value: item.id
}).then(function(response) {
// Make sure no flickering (if there are more items left) and then remove
self.parent.isLoading(self.parent.totalItems() > 1)
parent.queueItems.remove(itemToDelete);
parent.multiEditItems.remove(function(inList) { return inList.id == itemToDelete.id; })
self.parent.parent.refresh();
// Hide notifcation
hideNotification()
});
}
};
}
File diff suppressed because one or more lines are too long.
File diff suppressed because one or more lines are too long.
@@ -0,0 +1,12 @@
/*
* jQuery Hotkeys Plugin
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Based upon the plugin by Tzury Bar Yochay:
* https://github.com/tzuryby/jquery.hotkeys
*
* Original idea by:
* Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
!function(c){function e(e){var o,f;"string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys&&(o=e.handler,f=e.data.keys.toLowerCase().split(" "),e.handler=function(a){if(this===a.target||!(/textarea|select/i.test(a.target.nodeName)||c.hotkeys.options.filterTextInputs&&-1<c.inArray(a.target.type,c.hotkeys.textAcceptingInputTypes))){var s="keypress"!==a.type&&c.hotkeys.specialKeys[a.which],e=String.fromCharCode(a.which).toLowerCase(),r="",t={};c.each(["alt","ctrl","shift"],function(e,t){a[t+"Key"]&&s!==t&&(r+=t+"+")}),a.metaKey&&!a.ctrlKey&&"meta"!==s&&(r+="meta+"),a.metaKey&&"meta"!==s&&-1<r.indexOf("alt+ctrl+shift+")&&(r=r.replace("alt+ctrl+shift+","hyper+")),s?t[r+s]=!0:(t[r+e]=!0,t[r+c.hotkeys.shiftNums[e]]=!0,"shift+"===r&&(t[c.hotkeys.shiftNums[e]]=!0));for(var i=0,n=f.length;i<n;i++)if(t[f[i]])return o.apply(this,arguments)}})}c.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},c.each(["keydown","keyup","keypress"],function(){c.event.special[this]={add:e}})}(jQuery||this.jQuery||window.jQuery);
@@ -1,15 +1,3 @@
ko.bindingHandlers.truncatedText = {
update: function(element, valueAccessor, allBindingsAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
if (!value) return
var length = ko.utils.unwrapObservable(allBindingsAccessor().length) || ko.bindingHandlers.truncatedText.defaultLength,
truncatedValue = value.length > length ? convertHTMLtoText(value.substring(0, Math.min(value.length, length))) + "&hellip;" : convertHTMLtoText(value);
ko.bindingHandlers.html.update(element, function() {
return truncatedValue;
});
},
defaultLength: 15
};
ko.bindingHandlers.truncatedTextCenter = {
update: function(element, valueAccessor, allBindingsAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor())
@@ -33,10 +21,8 @@ ko.bindingHandlers.longText = {
// Input is an array
var value = ko.utils.unwrapObservable(valueAccessor())
// Convert HTML entities for all but the Script (because of the (more)-link)
if(allBindingsAccessor.get('longTextType') != "Script") {
value = value.map(convertHTMLtoText)
}
// Escape HTML in the source lines (the markup below is added afterwards)
value = value.map(convertHTMLtoText)
// Any <br>'s?
var outputText = '';
@@ -0,0 +1,317 @@
/*!
* search-search-query-parser.js
* Copyright(c) 2014-2019
* MIT Licensed
*
* Modified for SABnzbd use!
* Adapted to use without NPM.
*/
function search_query_parse(string, options) {
// Set a default options object when none is provided
if (!options) {
options = {offsets: true};
} else {
// If options offsets was't passed, set it to true
options.offsets = (typeof options.offsets === 'undefined' ? true : options.offsets)
}
if (!string) {
string = '';
}
// When no keywords or ranges set, treat as a simple string
else if (!options.keywords && !options.ranges && !options.tokenize) {
return string;
}
// Otherwise parse the advanced query syntax
else {
// Our object to store the query object
var query = {text: []};
// When offsets is true, create their array
if (options.offsets) {
query.offsets = [];
}
var exclusion = {};
var terms = [];
// Get a list of search terms respecting single and double quotes
var regex = /(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|\S+|\S+:\S+/g;
/*
Removed exclusion matching for SABnzbd, original regex:
var regex = /(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|(-?"(?:[^"\\]|\\.)*")|(-?'(?:[^'\\]|\\.)*')|\S+|\S+:\S+/g;
See: https://github.com/sabnzbd/sabnzbd/issues/2342
*/
var match;
while ((match = regex.exec(string)) !== null) {
var term = match[0];
var sepIndex = term.indexOf(':');
if (sepIndex !== -1) {
var split = term.split(':'),
key = term.slice(0, sepIndex),
val = term.slice(sepIndex + 1);
// Strip surrounding quotes
val = val.replace(/^\"|\"$|^\'|\'$/g, '');
// Strip backslashes respecting escapes
val = (val + '').replace(/\\(.?)/g, function (s, n1) {
switch (n1) {
case '\\':
return '\\';
case '0':
return '\u0000';
case '':
return '';
default:
return n1;
}
});
terms.push({
keyword: key,
value: val,
offsetStart: match.index,
offsetEnd: match.index + term.length
});
} else {
var isExcludedTerm = false;
/*
Removed for SABnzbd
See: https://github.com/sabnzbd/sabnzbd/issues/2342
if (term[0] === '-') {
isExcludedTerm = true;
term = term.slice(1);
}
*/
// Strip surrounding quotes
term = term.replace(/^\"|\"$|^\'|\'$/g, '');
// Strip backslashes respecting escapes
term = (term + '').replace(/\\(.?)/g, function (s, n1) {
switch (n1) {
case '\\':
return '\\';
case '0':
return '\u0000';
case '':
return '';
default:
return n1;
}
});
if (isExcludedTerm) {
if (exclusion['text']) {
if (exclusion['text'] instanceof Array) {
exclusion['text'].push(term);
} else {
exclusion['text'] = [exclusion['text']];
exclusion['text'].push(term);
}
} else {
// First time seeing an excluded text term
exclusion['text'] = term;
}
} else {
terms.push({
text: term,
offsetStart: match.index,
offsetEnd: match.index + term.length
});
}
}
}
// Reverse to ensure proper order when pop()'ing.
terms.reverse();
// For each search term
var term;
while (term = terms.pop()) {
// When just a simple term
if (term.text) {
// We add it as pure text
query.text.push(term.text);
// When offsets is true, push a new offset
if (options.offsets) {
query.offsets.push(term);
}
}
// We got an advanced search syntax
else {
var key = term.keyword;
// Check if the key is a registered keyword
options.keywords = options.keywords || [];
var isKeyword = false;
var isExclusion = false;
if (!/^-/.test(key)) {
isKeyword = !(-1 === options.keywords.indexOf(key));
} else if (key[0] === '-') {
var _key = key.slice(1);
isKeyword = !(-1 === options.keywords.indexOf(_key))
if (isKeyword) {
key = _key;
isExclusion = true;
}
}
// Check if the key is a registered range
options.ranges = options.ranges || [];
var isRange = !(-1 === options.ranges.indexOf(key));
// When the key matches a keyword
if (isKeyword) {
// When offsets is true, push a new offset
if (options.offsets) {
query.offsets.push({
keyword: key,
value: term.value,
offsetStart: isExclusion ? term.offsetStart + 1 : term.offsetStart,
offsetEnd: term.offsetEnd
});
}
var value = term.value;
// When value is a thing
if (value.length) {
// Get an array of values when several are there
var values = value.split(',');
if (isExclusion) {
if (exclusion[key]) {
// ...many times...
if (exclusion[key] instanceof Array) {
// ...and got several values this time...
if (values.length > 1) {
// ... concatenate both arrays.
exclusion[key] = exclusion[key].concat(values);
} else {
// ... append the current single value.
exclusion[key].push(value);
}
}
// We saw that keyword only once before
else {
// Put both the current value and the new
// value in an array
exclusion[key] = [exclusion[key]];
exclusion[key].push(value);
}
}
// First time we see that keyword
else {
// ...and got several values this time...
if (values.length > 1) {
// ...add all values seen.
exclusion[key] = values;
}
// Got only a single value this time
else {
// Record its value as a string
if (options.alwaysArray) {
// ...but we always return an array if option alwaysArray is true
exclusion[key] = [value];
} else {
// Record its value as a string
exclusion[key] = value;
}
}
}
} else {
// If we already have seen that keyword...
if (query[key]) {
// ...many times...
if (query[key] instanceof Array) {
// ...and got several values this time...
if (values.length > 1) {
// ... concatenate both arrays.
query[key] = query[key].concat(values);
} else {
// ... append the current single value.
query[key].push(value);
}
}
// We saw that keyword only once before
else {
// Put both the current value and the new
// value in an array
query[key] = [query[key]];
query[key].push(value);
}
}
// First time we see that keyword
else {
// ...and got several values this time...
if (values.length > 1) {
// ...add all values seen.
query[key] = values;
}
// Got only a single value this time
else {
if (options.alwaysArray) {
// ...but we always return an array if option alwaysArray is true
query[key] = [value];
} else {
// Record its value as a string
query[key] = value;
}
}
}
}
}
}
// The key allows a range
else if (isRange) {
// When offsets is true, push a new offset
if (options.offsets) {
query.offsets.push(term);
}
var value = term.value;
// Range are separated with a dash
var rangeValues = value.split('-');
// When both end of the range are specified
// keyword:XXXX-YYYY
query[key] = {};
if (2 === rangeValues.length) {
query[key].from = rangeValues[0];
query[key].to = rangeValues[1];
}
// When pairs of ranges are specified
// keyword:XXXX-YYYY,AAAA-BBBB
else if (!rangeValues.length % 2) {
}
// When only getting a single value,
// or an odd number of values
else {
query[key].from = value;
}
} else {
// We add it as pure text
var text = term.keyword + ':' + term.value;
query.text.push(text);
// When offsets is true, push a new offset
if (options.offsets) {
query.offsets.push({
text: text,
offsetStart: term.offsetStart,
offsetEnd: term.offsetEnd
});
}
}
}
}
// Concatenate all text terms if any
if (query.text.length) {
if (!options.tokenize) {
query.text = query.text.join(' ').trim();
}
}
// Just remove the attribute text when it's empty
else {
delete query.text;
}
// Return forged query object
query.exclude = exclusion;
return query;
}
}
@@ -1 +1 @@
@import url('Night.css') screen and (prefers-color-scheme: dark);
/* Placeholder — themes live in glitter.css; this file only populates the scheme dropdown */
@@ -1,280 +1 @@
body,
.modal-backdrop {
background-color: black;
color: #EBEBEB
}
nav {
background-color: #444444 !important;
border: 0 !important;
border-bottom: 1px solid black !important;
}
nav .btn {
background-color: #E4E4E4;
border-color: #5D5D5D !important;
}
@media (max-width: 767px) {
nav {
background-color: black !important;
}
}
a, a:active, a:hover, a:focus,
.hover-button.glyphicon-play,
.hover-button.glyphicon-stop,
.dropdown-menu>li>a,
legend,
#modal-options legend label,
#modal-options legend a,
#modal-item-files .item-files-table .progress small,
#modal-options .options-switch label,
#modal-options #options-orphans .process-all-orphaned,
.text-muted {
color: #EBEBEB;
}
.dropdown-menu>li>a:hover,
.dropdown-menu>li>a:focus,
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,
#feedback-slider {
background-color: #555555;
color: white !important;
}
.main-restarting,
.main-filedrop,
.nav-tabs>li>a {
color: white !important;
}
.hover-button,
.fileControls a:hover {
opacity: 0.7;
}
.form-control[disabled] {
opacity: 0.65;
}
.progress {
background-color: #DADADA;
}
.main-notification-box {
background-color: #727272;
border-color: #252525 !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.container,
.modal-body,
.modal-footer {
background-color: #727272;
}
.dropdown-menu,
.navbar-collapse.in .dropdown-menu {
background-color: #666;
}
.navbar-collapse.in .dropdown-menu {
border: none;
}
.max-speed-input-clear,
.max-speed-input-clear:hover,
.nav-tabs>li>a:hover,
.fileControls a {
color: black;
}
.nav-tabs>li.active>a,
.nav-tabs>li.active>a:focus,
.nav-tabs>li.active>a:hover,
.nav-tabs>li>a:hover {
background-color: #ddd;
color: #555 !important;
box-shadow: 0px -1px 1px 1px rgba(0,0,0,0.15);
}
.processing-download > div {
background-color: #EBEBEB;
}
.table-striped>tbody>tr:nth-child(odd),
.table>tbody>tr:nth-child(odd),
.multioperations-selector,
.pagination li.active span,
.pagination li span:hover,
.dropdown-menu .divider,
.history-queue-swicher .badge {
background-color: #444444;
color: #EBEBEB;
}
table,
.table-striped>tbody>tr:nth-child(even),
.table>tbody>tr:nth-child(even),
.table th,
.pagination li span,
.pagination>.disabled>span,
.pagination>.disabled>span:hover,
.search-box input,
input,
input.form-control,
.input-group-addon,
select.form-control,
.main-content .btn-default,
.modal-body .btn-default,
.modal-footer .btn-default,
.btn-default.disabled:hover,
.btn-default.disabled:active,
.btn-default.disabled:focus,
.form-control[disabled],
#modal-options .options-function-box .input-group-addon {
background-color: #555555;
color: #EBEBEB;
}
/* Needed to force the text-color */
.table-striped>tbody>tr:nth-child(odd)>td,
.table>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(even)>td,
.table>tbody>tr:nth-child(even)>td {
color: #EBEBEB;
}
/* Hovering the queue and the history */
.table>tbody>tr:hover {
background-color: #666;
}
.table,
tr td,
tbody>tr>td:last-child,
tbody>tr>td:first-child,
tbody>tr:last-child td,
.table-messages .table-messages-remove,
.multioperations-selector,
.pagination li span,
.pagination li a,
.search-box input,
input,
input.form-control,
.input-group-addon,
.search-box input:focus,
.search-box input:valid,
select.form-control,
#modal-options .table-server-connections th,
.main-content .btn-default,
.modal-body .btn-default,
.modal-footer .btn-default,
.queue .table-active-sorting {
border-color: #252525 !important;
}
.history-failed-download td.status,
.retry-buttontext,
.retry-button, .retry-button-inactive,
.history-options-show-failed,
.queue-error-info,
.options-bad-status,
.history-failed-download:hover .retry-button .glyphicon:before,
.retry-button:hover .glyphicon:before {
color: #F95151 !important;
}
.ui-sortable-helper td {
background-color: #555555 !important;
}
tbody .caret {
border-top-color: #EBEBEB !important;
}
.info-container,
#modal-options .options-status-box small,
#modal-options #options-status small,
#modal-options .tab-content h4 {
color: #D6D6D6;
}
td.name .name-icons span,
.navbar-nav .open .dropdown-menu>li>a,
.dropdown-header,
#modal-help small,
.hover-button.glyphicon-forward,
pre {
color: #EBEBEB !important;
opacity: 1 !important;
}
legend,
hr {
border-color: #C6C6C6 !important;
}
.ui-slider .ui-slider-handle {
background-color: #969696;
border-color: #969696
}
#modal-help table td,
#modal-help table {
background-color: transparent;
}
#modal-item-files .item-files-table td {
border-bottom: none !important;
}
#modal-item-files .item-files-table {
border-bottom: 1px solid black;
}
.history-queue-swicher .nav-tabs>li>a,
.history-queue-swicher .nav-tabs>li.active>a {
border-bottom: none;
margin-bottom: 1px;
}
.queue-item .dropdown-menu:after,
.history-item .dropdown-menu:after,
.info-container-box-sorting .dropdown-menu:after {
border-bottom-color: #666;
}
.container-compact .progress,
.container-compact .queue .progress-bar {
box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 1);
}
.modal-content {
border-color: #727272;
border-top: none;
}
.form-control:focus,
input[type="submit"]:focus,
button:focus {
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
outline: initial;
}
/* Placeholders - Will not work if grouped! */
::-webkit-input-placeholder {
color: #EBEBEB !important;
}
::-moz-placeholder {
color: #EBEBEB !important;
opacity: 1 !important;
}
:-ms-input-placeholder {
color: #EBEBEB !important;
}
/* Placeholder — themes live in glitter.css; this file only populates the scheme dropdown */
File diff suppressed because it is too large. Load diff
@@ -7,6 +7,10 @@
padding-right: 8px;
}
.container-full-width .container {
width: 100%;
}
.main-navbar {
margin-top: 0;
padding: 0;
@@ -18,7 +22,8 @@
.main-content {
border: 0;
margin-bottom: 0 !important;
margin: 0;
padding: 0;
}
.main-menu-link .icon-bar:first-child {
@@ -70,6 +75,10 @@ h2 {
QUEUE & HISTORY
**/
.history-queue-swicher {
margin-bottom: 0;
}
.info-container {
margin-top: 0px;
margin-bottom: 10px;
@@ -91,13 +100,6 @@ h2 {
white-space: pre;
}
.info-container .info-container-box-sorting {
position: absolute;
right: 10px;
top: 0px;
font-size: 1em;
}
.queue-table .table-header-progress {
width: 0%;
}
@@ -124,7 +126,7 @@ h2 {
}
.queue-table .progress {
margin: 0px 8px;
margin: 0px 15px;
}
.queue-table td.name .row-wrap-text,
@@ -147,6 +149,9 @@ tr.queue-item>td:first-child>a {
.queue-table td.name .name-options {
display: inline-block;
opacity: 1;
pointer-events: auto;
position: static;
}
.queue-table td.name .name-options small {
@@ -163,7 +168,7 @@ tr.queue-item>td:first-child>a {
}
.multioperations-selector .add-nzb-inputbox-small {
width: 72px;
width: 115px;
}
.multioperations-selector .add-nzb-inputbox-clear {
@@ -180,14 +185,6 @@ tr.queue-item>td:first-child>a {
min-width: 0px;
}
.history-table .history-ratings {
display: none;
}
.name-has-ratings .row-wrap-text {
max-width: calc(100% - 1px) !important;
}
.history-table .delete .dropdown-menu {
width: 100%;
left: 0;
@@ -278,4 +275,4 @@ tr.queue-item>td:first-child>a {
#modal-item-files .form-group {
clear: left;
margin-bottom: 5px;
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
#
# Copyright 2009 The SABnzbd-Team <team@sabnzbd.org>
# Copyright 2009 The SABnzbd-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
+12 -6
View File
@@ -1,13 +1,19 @@
<!DOCTYPE html>
<html lang="$active_lang">
<html lang="$active_lang" data-color-scheme="$color_scheme">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$T('wizard-quickstart')</title>
<link rel="stylesheet" type="text/css" href="../staticcfg/bootstrap/css/bootstrap.min.css?v=$version"/>
<link rel="stylesheet" type="text/css" href="static/style.css?v=$version"/>
<link rel="shortcut icon" href="../staticcfg/ico/favicon.ico?v=$version" />
<script type="text/javascript" src="../staticcfg/js/jquery-3.5.1.min.js?v=$version"></script>
<script type="text/javascript" src="../staticcfg/bootstrap/js/bootstrap.min.js?v=$version"></script>
<link rel="stylesheet" type="text/css" href="$url('staticcfg/bootstrap/css/bootstrap.min.css', v=$cache_buster)"/>
<link rel="stylesheet" type="text/css" href="$url('wizard/static/style.css', v=$cache_buster)"/>
<link rel="shortcut icon" href="$url('staticcfg/ico/favicon.ico', v=$cache_buster)" />
<script type="text/javascript" src="$url('staticcfg/js/jquery-3.7.1.min.js', v=$cache_buster)"></script>
<script type="text/javascript" src="$url('staticcfg/bootstrap/js/bootstrap.min.js', v=$cache_buster)"></script>
<script type="text/javascript">
var csrfToken = "$csrf_token";
$.ajaxSetup({
headers: { "X-SABnzbd-CSRF": csrfToken }
});
</script>
</head>
<body>
<div id="logo">
+8 -5
View File
@@ -1,5 +1,6 @@
<!--#include $webdir + "/inc_top.tmpl"#-->
<form action="./one" method="post">
<form action="$url('wizard/one')" method="post">
<input type="hidden" name="csrf_token" value="$csrf_token" />
<div class="container">
<div id="inner">
<div id="content" class="bigger">
@@ -26,16 +27,18 @@
</div>
<hr />
<div class="row">
<div class="col-xs-4 text-center">
<a class="btn btn-danger" href="../shutdown/?apikey=$apikey&amp;pid=$pid"><span class="glyphicon glyphicon-remove"></span> $T('wizard-exit')</a>
<div class="col-md-4 text-center">
<button class="btn btn-danger" type="submit" form="shutdown-form"><span class="glyphicon glyphicon-remove"></span> $T('wizard-exit')</button>
</div>
<div class="col-xs-4 text-center">
<div class="col-md-4 text-center">
<a class="btn btn-default" href="$url('config/general#config_backup_file')"><span class="glyphicon glyphicon-open"></span> $T('restore-backup')</a>
</div>
<div class="col-xs-4 text-center">
<div class="col-md-4 text-center">
<button class="btn btn-default">$T('wizard-start') <span class="glyphicon glyphicon-chevron-right"></span></button>
</div>
</div>
</div>
</div>
</form>
<form id="shutdown-form" method="post" action="$url('shutdown')"><input type="hidden" name="csrf_token" value="$csrf_token" /></form>
<!--#include $webdir + "/inc_bottom.tmpl"#-->
+25 -12
View File
@@ -1,5 +1,6 @@
<!--#include $webdir + "/inc_top.tmpl"#-->
<form action="./two" method="post" autocomplete="off">
<form action="$url('wizard/two')" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="$csrf_token" />
<div class="container">
<div id="inner">
<div id="content" class="bigger">
@@ -7,7 +8,9 @@
<h1>$T('wizard-quickstart')</h1>
<hr />
<script type="text/javascript">
var txtTestServer = "$T('wizard-server-text')";
var txtChecking = "$T('srv-testing')";
var txtTestRequired = "$T('wizard-test-server-required')";
<!--#include raw $webdir + "/static/javascript/checkserver.js"#-->
</script>
<h3>$T('wizard-server')</h3>
@@ -15,12 +18,14 @@
<br /><br />
<input type="hidden" name="server" value="$server" />
<div class="row">
<div class="col-md-7 form-horizontal">
<div class="form-group">
<label for="host" class="col-sm-4 control-label">$T('srv-host')</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="host" id="host" value="$host" placeholder="$T('wizard-example') news.newshosting.com" />
<input type="text" class="form-control" name="host" id="host" value="$host" placeholder="$T('wizard-example') news.newshosting.com" required />
</div>
</div>
<div class="form-group">
@@ -46,7 +51,7 @@
<div class="form-group">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<a href="#" onclick="\$('#server-hidden-settings').removeClass('hidden');\$(this).parent().parent().hide()">
<a href="#" class="wizard-advanced-settings" onclick="\$('#server-hidden-settings').removeClass('hidden');\$(this).parent().parent().hide()">
<span class="glyphicon glyphicon-cog"></span> $T('button-advanced')
</a>
</div>
@@ -55,32 +60,40 @@
<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' #-->" min="0" max="65535" required />
</div>
</div>
<div class="form-group">
<label for="connections" class="col-sm-4 control-label">$T('srv-connections')</label>
<div class="col-sm-8">
<input type="number" class="form-control" name="connections" id="connections" value="<!--#if $connections then $connections else '8'#-->" data-toggle="tooltip" data-placement="right" title="$T('wizard-server-con-explain') $T('wizard-server-con-eg')" />
<input type="number" class="form-control" name="connections" id="connections" value="<!--#if $connections then $connections else '16'#-->" min="1" max="500" data-toggle="tooltip" data-placement="right" title="$T('wizard-server-con-explain') $T('wizard-server-con-eg')" required />
</div>
</div>
<div class="form-group">
<label for="pipelining_requests" class="col-sm-4 control-label">$T('srv-pipelining_requests')</label>
<div class="col-sm-8">
<input type="number" class="form-control" name="pipelining_requests" id="pipelining_requests" value="$pipelining_requests" min="1" max="20" required />
</div>
</div>
<div class="form-group">
<label for="ssl_verify" class="col-sm-4 control-label">$T('opt-ssl_verify')</label>
<div class="col-sm-8">
<select name="ssl_verify" id="ssl_verify" class="form-control" <!--#if int($certificate_validation) == 0 then "disabled=\"disabled\"" else ""#-->>
<option value="2" <!--#if $ssl_verify == 2 then 'selected="selected"' else ""#--> >$T('ssl_verify-strict')</option>
<option value="1" <!--#if $ssl_verify == 1 then 'selected="selected"' else ""#--> >$T('ssl_verify-normal')</option>
<select name="ssl_verify" id="ssl_verify" class="form-control">
<option value="3" <!--#if $ssl_verify == 3 then 'selected="selected"' else ""#--> >$T('ssl_verify-strict')</option>
<option value="2" <!--#if $ssl_verify == 2 then 'selected="selected"' else ""#--> >$T('ssl_verify-medium')</option>
<option value="1" <!--#if $ssl_verify == 1 then 'selected="selected"' else ""#--> >$T('ssl_verify-minimal')</option>
<option value="0" <!--#if $ssl_verify == 0 then 'selected="selected"' else ""#--> >$T('ssl_verify-disabled')</option>
</select>
<span class="desc">$T('explain-ssl_verify').replace('-', '<br/>-')</span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<button id="serverTest" class="btn btn-default"><span class="glyphicon glyphicon-sort"></span> $T('wizard-button-testServer')</button>
<button id="serverTest" class="btn btn-default" data-toggle="tooltip" data-placement="left" aria-busy="false"><span class="glyphicon glyphicon-sort" aria-hidden="true"></span> $T('wizard-button-testServer')</button>
</div>
<div class="col-sm-8">
<div id="serverResponse" class="well well-sm">$T('wizard-server-text')</div>
<div id="serverResponse" class="well well-sm" role="status" aria-live="polite" aria-atomic="true">$T('wizard-server-text')</div>
</div>
</div>
@@ -90,12 +103,12 @@
<iframe style="float: right; width: 325px; height: 325px;" frameborder="0" src="https://sabnzbd.org/wizard#$active_lang"></iframe>
</div>
</div>
<input type="hidden" name="apikey" value="$apikey" />
<input type="hidden" name="enable" value="1">
</div>
<hr />
<div class="row">
<div class="col-xs-4 text-center">
<a class="btn btn-default" href="./index"><span class="glyphicon glyphicon-chevron-left"></span> $T('wizard-previous')</a>
<a class="btn btn-default" href="$url('wizard')"><span class="glyphicon glyphicon-chevron-left"></span> $T('wizard-previous')</a>
</div>
<div class="col-xs-4 text-center">
</div>
@@ -1,9 +1,31 @@
// Variable to track server test results
var serverTestSuccessful = false;
function resetTestResult() {
serverTestSuccessful = false;
$('#serverResponse').html(txtTestServer);
checkRequired();
}
function setTestResult(success) {
serverTestSuccessful = success;
checkRequired();
}
function checkRequired() {
if ($("#host").val() && $("#connections").val()) {
// Check if form is valid using HTML5 validation and if server test passed
if ($("form").get(0).checkValidity() && serverTestSuccessful) {
$("#next-button").removeClass('disabled')
$("#next-button").removeAttr('data-toggle')
$("#next-button").removeAttr('title')
$("#next-button").tooltip('destroy')
return true;
} else {
$("#next-button").addClass('disabled')
$("#next-button").attr('data-toggle', 'tooltip')
$("#next-button").attr('data-placement', 'left')
$("#next-button").attr('title', txtTestRequired)
$("#next-button").tooltip()
return false;
}
}
@@ -12,67 +34,61 @@ $(document).ready(function() {
// Add tooltips
$('[data-toggle="tooltip"]').tooltip()
// On form-submit
// On server test button click
$("#serverTest").click(function() {
// Check HTML5 form validation before testing server
if (!$("form").get(0).reportValidity()) {
return false;
}
$('#serverTest').attr('aria-busy', 'true');
$('#serverResponse').html(txtChecking);
$.getJSON(
"../api?mode=config&name=test_server&output=json",
$("form").serialize(),
function(result) {
$.ajax({
type: 'POST',
url: "../api?mode=config&name=test_server&output=json",
data: $("form").serialize(),
success: function(result) {
if (result.value.result) {
r = '<span class="success"><span class="glyphicon glyphicon-ok"></span> ' + result.value.message + '</span>';
r = '<span class="success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> ' + result.value.message + '</span>';
setTestResult(true);
} else {
r = '<span class="failed"><span class="glyphicon glyphicon-minus-sign"></span> ' + result.value.message + '</span>';
r = '<span class="failed"><span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> ' + result.value.message + '</span>';
setTestResult(false);
}
r = r.replace('https://sabnzbd.org/certificate-errors', '<a href="https://sabnzbd.org/certificate-errors" class="failed" target="_blank">https://sabnzbd.org/certificate-errors</a>')
$('#serverResponse').html(r);
$('#serverTest').attr('aria-busy', 'false');
}
);
});
return false;
});
$("#port, #connections").bind('keyup blur', function() {
if (this.value > 0) {
$(this).removeClass("incorrect");
$(this).addClass("correct");
} else {
$(this).removeClass("correct");
$(this).addClass("incorrect");
}
checkRequired()
});
$("#host, #username, #password").bind('keyup blur', function() {
if (this.value) {
$(this).removeClass("incorrect");
$(this).addClass("correct");
} else {
$(this).removeClass("correct");
$(this).addClass("incorrect");
}
checkRequired();
// Reset test result when any form field changes
$("#host, #username, #password, #port, #connections, #ssl_verify").bind('input change', function() {
resetTestResult();
});
$('#ssl').click(function() {
if(this.checked) {
// Enabled SSL change port when not already a custom port
if($('#port').val() == '119') {
if($('#port').val() === '119') {
$('#port').val('563')
}
} else {
// Remove SSL port
if($('#port').val() == '563') {
if($('#port').val() === '563') {
$('#port').val('119')
}
}
resetTestResult();
})
checkRequired()
$('form').submit(function(event) {
// Double check
if(!checkRequired()) {
// Check if server test passed (HTML5 validation is automatic)
if(!serverTestSuccessful) {
event.preventDefault();
}
})
});
});
+175 -54
View File
@@ -1,16 +1,50 @@
:root {
/* Border radius scale */
--radius-sm: 4px; /* small elements: progress bars */
--radius-md: 6px; /* search bar, multi-edit toolbar, file controls */
--radius-lg: 8px; /* cards, modals, notification box */
/* Follow the OS by default (Auto); forced by data-color-scheme below */
color-scheme: light dark;
/* Color palette — light-dark(light value, dark value) */
--clr-page-bg: light-dark(#E4E4E4, black);
--clr-surface: light-dark(#FFFFFF, #303030);
--clr-surface-alt: light-dark(#F5F5F5, #444444);
--clr-surface-hover: light-dark(#E4E4E4, #666666);
--clr-border: light-dark(rgba(0, 0, 0, 0.2), #555555);
--clr-text: light-dark(#000000, #EBEBEB);
--clr-text-muted: light-dark(#777777, #c7c7c7);
--clr-link: light-dark(#555555, #63a7e1);
--clr-input-bg: light-dark(#FFFFFF, #555555);
--clr-input-border: light-dark(#cccccc, #252525);
--clr-toggle-active: #f9ca33;
--clr-toggle-inactive: light-dark(#aaaaaa, #666666);
}
/* The server renders the configured scheme into this attribute; empty/unknown = Auto */
html[data-color-scheme="light" i] {
color-scheme: light;
}
html[data-color-scheme="night" i] {
color-scheme: dark;
}
body {
background-color: #E4E4E4;
background-color: var(--clr-page-bg);
color: var(--clr-text);
text-align: center;
}
.container {
max-width: 1000px;
border: 1px solid rgba(0, 0, 0, 0.2);
background-color: #fff;
text-align: left;
}
#inner {
background-color: #fff;
padding: 4px 32px 20px 32px;
border: 1px solid var(--clr-border);
border-radius: var(--radius-lg);
background-color: var(--clr-surface);
}
#content {
min-height: 550px;
@@ -33,7 +67,7 @@ body {
float: left;
}
.language:hover {
background-color: #E4E4E4;
background-color: var(--clr-surface-hover);
}
.float {
float: left;
@@ -51,7 +85,7 @@ body {
padding: 12px;
margin-top: 1px;
margin-bottom: 15px;
background-color: #f5f5f5;
background-color: var(--clr-surface-alt);
}
.quoteBlock a,
a[target="_blank"] {
@@ -62,10 +96,10 @@ a[target="_blank"] {
color: #00cc22;
}
.failed {
color: red !important;
color: light-dark(red, #ff3333) !important;
}
#rightGreyText {
color: #ccc;
color: light-dark(#cccccc, #c7c7c7);
width: 100%;
text-align: right;
padding-top: 3px;
@@ -80,6 +114,39 @@ label {
.input-checkbox {
padding-top: 7px !important;
}
/* Toggle switch */
input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
display: inline-block;
vertical-align: middle;
margin: 0;
width: 36px;
height: 20px;
background-color: var(--clr-toggle-inactive);
background-image:
radial-gradient(circle at 10px 10px, #ffffff 6.5px, rgba(255,255,255,0) 7px),
radial-gradient(circle at 11px 11px, rgba(0,0,0,0.30) 6.5px, transparent 9.5px);
background-size: 20px 20px;
background-repeat: no-repeat;
background-position: 0px center;
border-radius: 10px;
border: none;
cursor: pointer;
transition: background-color 0.2s, background-position 0.15s;
}
input[type="checkbox"]:checked {
background-color: var(--clr-toggle-active);
background-position: 16px center;
background-image:
radial-gradient(circle at 10px 10px, #ffffff 6.5px, rgba(255,255,255,0) 7px),
radial-gradient(circle at 10.5px 10.5px, rgba(0,0,0,0.30) 6.5px, transparent 9.5px);
}
input[type="checkbox"]:focus-visible {
outline: 2px solid var(--clr-toggle-active);
outline-offset: 2px;
border-radius: 10px;
}
.input-checkbox input+.help-block {
display: none;
}
@@ -88,49 +155,25 @@ label {
float: right;
margin: 0;
}
.desc {
font-size: 12px;
font-style: italic;
}
.align-right {
text-align: right;
}
.align-center {
text-align: center;
}
.unselected,
.selected {
display: inline-block;
}
.unselected {
padding: 6px 10px 6px 10px;
border: 1px solid #636363;
margin-left: 8px;
margin-right: 8px;
color: #636363;
}
.selected {
padding: 6px 10px 6px 10px;
color: white;
background-color: #636363;
border: 1px solid #636363;
margin-left: 8px;
margin-right: 8px;
}
.bigger {
font-size: 14px;
}
.bigger input {
font-size: 16px;
}
.required-star {
color: red;
}
.full-width {
width: 100%;
}
.correct {
border: 2px solid #00cc22;
}
.incorrect {
border: 2px solid red;
}
.hidden {
display: none !important;
}
@@ -146,20 +189,12 @@ label {
.input-group-bw {
width: 150px;
}
.disabled-text {
text-decoration: line-through;
color: #ccc;
}
#serverResponse {
padding: 6px 10px;
}
#host-tip {
margin-bottom: 5px;
}
.error-text {
display: inline;
color: red;
}
#bandwidth {
display: inline-block;
}
@@ -168,24 +203,110 @@ label {
Bootstrap overwrites
***/
* {
border-radius: 0 !important;
}
#content a,
#content a:hover,
#content a:active,
#content a:visited,
a,
a:hover,
a:active,
a:visited,
#serverResponse {
color: #555;
color: var(--clr-link);
}
.btn {
box-shadow: 1px 1px 1px rgba(0, 0, 0, .1) !important;
min-width: 150px;
box-shadow: 1px 0px 1px light-dark(rgba(0,0,0,.1), rgba(255,255,255,.1));
}
.btn-default,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
background-color: var(--clr-input-bg);
color: var(--clr-text);
border-color: var(--clr-input-border);
}
::placeholder {
color: var(--clr-text) !important;
opacity: 0.5;
}
.btn .glyphicon,
a .glyphicon {
top: 2px;
}
small {
color: #777;
color: var(--clr-text-muted);
}
/***
Dark-mode structural rules
Colors live in the light-dark() tokens above; these are the rules that cannot
be expressed as a color value. The two blocks below MUST stay identical:
the first applies when Night is forced, the second when the OS is dark and Light is not forced.
***/
html[data-color-scheme="night" i] {
.language:hover,
.quoteBlock,
.server-disabled,
#serverResponse {
background-color: var(--clr-surface-alt) !important;
color: var(--clr-text) !important;
}
.quoteBlock a,
.help-block,
a.wizard-advanced-settings {
color: var(--clr-text);
}
#inner {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Focus / active border */
.btn-default:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
border-color: #707070 !important;
outline: initial !important;
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
}
}
@media (prefers-color-scheme: dark) {
html:not([data-color-scheme="light" i]) {
.language:hover,
.quoteBlock,
.server-disabled,
#serverResponse {
background-color: var(--clr-surface-alt) !important;
color: var(--clr-text) !important;
}
.quoteBlock a,
.help-block,
a.wizard-advanced-settings {
color: var(--clr-text);
}
#inner {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Focus / active border */
.btn-default:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
border-color: #707070 !important;
outline: initial !important;
box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
}
}
}
+6 -7
View File
@@ -12,8 +12,8 @@
<p>$T('wizard-tip4')</p>
<div class="quoteBlock">
<!--#for $url in $urls#-->
<a href="$url">$url</a><br />
<!--#for $access_url in $urls#-->
<a href="$access_url">$access_url</a><br />
<!--#end for#-->
</div>
@@ -22,24 +22,23 @@
<p><strong>$T('opt-complete_dir')</strong></p>
<div class="quoteBlock">
$complete_dir
<a href="${access_url}/config/folders#complete_dir" class="indented"><span class="glyphicon glyphicon-cog"></span></a>
<a href="$url('config/folders#complete_dir')" class="indented"><span class="glyphicon glyphicon-cog"></span></a>
</div>
<p><strong>$T('opt-download_dir')</strong></p>
<div class="quoteBlock">
$download_dir
<a href="${access_url}/config/folders#complete_dir" class="indented"><span class="glyphicon glyphicon-cog"></span></a>
<a href="$url('config/folders#complete_dir')" class="indented"><span class="glyphicon glyphicon-cog"></span></a>
</div>
<hr/>
<p>$T('wizard-tip-wiki') <a target="_blank" href="$helpuri">$T('menu-wiki')</a> <span class="glyphicon glyphicon-info-sign"></span></p>
<p>$T('wizard-tip-wiki') <a target="_blank" href="https://sabnzbd.org/wiki/">$T('menu-wiki')</a> <span class="glyphicon glyphicon-info-sign"></span></p>
</div>
<hr />
<div class="row">
<div class="col-xs-12 text-center">
<input type="hidden" name="apikey" id="apikey" value="$apikey"/>
<a class="btn btn-success" href="$access_url">$T('wizard-goto') <span class="glyphicon glyphicon-chevron-right"></span></a>
<a class="btn btn-success" href="$url()">$T('wizard-goto') <span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
</div>
</div>
+1 -1
View File
@@ -1,5 +1,5 @@
Kronos.py is written by Irmen de Jong.
Retreived from:
Retrieved from:
http://www.razorvine.net/download/kronos.py
Quote from the module:
+237
View File
@@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022-2026 by The SABnzbd-Team (sabnzbd.org) -->
<component type="desktop-application">
<id>org.sabnzbd.sabnzbd</id>
<metadata_license>MIT</metadata_license>
<name>SABnzbd</name>
<summary>Free and easy binary newsreader</summary>
<summary xml:lang="fr">Lecteur de news binaire libre et facile à utiliser</summary>
<summary xml:lang="tr">Özgür ve kullanımı kolay Usenet ikili okuyucu</summary>
<branding>
<color type="primary" scheme_preference="light">#e7e7e7</color>
<color type="primary" scheme_preference="dark">#444444</color>
</branding>
<description>
<p>
SABnzbd is a free and Open Source web-based binary newsreader,
with support for the popular nzb file format. It greatly simplifies
the process of downloading from Usenet, thanks to a friendly
web-based user interface and advanced built-in post-processing
options including the ability to automatically verify, repair,
extract and clean up downloaded posts. It runs anywhere, comes in
over a dozen languages, and integrates with a host of tools, apps
and services that help automate the download process.
</p>
<p xml:lang="fr">
SABnzbd est un lecteur binaire de newsgroups libre et gratuit prenant
en charge le format nzb très répandu. Il simplifie grandement le processus
de téléchargement depuis Usenet grâce à une interface web conviviale
et à des options avancées de post-traitement intégrées qui comprennent
la capacité à vérifier, réparer, extraire et nettoyer automatiquement
les messages téléchargés. Il fonctionne partout, est fourni avec une
douzaine de traductions et s'intègre avec de nombreux outils, applications
et services qui aident à automatiser le processus de téléchargement.
</p>
<p xml:lang="tr">
SABnzbd, popüler nzb biçimini destekleyen özgür ve ücretsiz bir ikili
haber grupları okuyucusudur. Kullanıcı dostu Web tabanlı arayüzü ve
indirilen mesajları otomatik olarak doğrulama, tamir etme, çıkarma ve
temizleme kabiliyetine sahip gelişmiş yerleşik son işlem seçenekleri
sayesinde Usenet ağından indirmeyi büyük ölçüde kolaylaştırır. Her yerde
çalışabilir, bir düzineden fazla dil desteği sunar ve indirme sürecini
otomatik hâle getirmeye yardımcı olan birçok araç, uygulama ve hizmet ile
birlikte çalışabilir.
</p>
</description>
<keywords>
<keyword>usenet</keyword>
<keyword>nzb</keyword>
<keyword>download</keyword>
<keyword>newsreader</keyword>
<keyword>binary</keyword>
<keyword xml:lang="fr">usenet</keyword>
<keyword xml:lang="fr">nzb</keyword>
<keyword xml:lang="fr">téléchargement</keyword>
<keyword xml:lang="fr">binaires</keyword>
<keyword xml:lang="tr">usenet</keyword>
<keyword xml:lang="tr">nzb</keyword>
<keyword xml:lang="tr">indirme</keyword>
</keywords>
<categories>
<category>Network</category>
<category>FileTransfer</category>
</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="contribute">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://sabnzbd.org/live-chat.html</url>
<releases>
<release version="5.1.0" date="2026-08-01" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.1.0</url>
</release>
<release version="5.0.4" date="2026-06-11" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.0.4</url>
</release>
<release version="5.0.3" date="2026-05-15" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.0.3</url>
</release>
<release version="5.0.2" date="2026-05-14" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.0.2</url>
</release>
<release version="5.0.1" date="2026-05-01" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.0.1</url>
</release>
<release version="5.0.0" date="2026-05-01" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/5.0.0</url>
</release>
<release version="4.5.5" date="2025-10-24" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.5</url>
</release>
<release version="4.5.4" date="2025-10-22" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.4</url>
</release>
<release version="4.5.3" date="2025-08-25" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.3</url>
</release>
<release version="4.5.2" date="2025-07-09" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.2</url>
</release>
<release version="4.5.1" date="2025-04-11" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.1</url>
</release>
<release version="4.5.0" date="2025-04-01" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.5.0</url>
</release>
<release version="4.4.1" date="2024-12-23" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.4.1</url>
</release>
<release version="4.4.0" date="2024-12-09" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.4.0</url>
</release>
<release version="4.3.3" date="2024-08-01" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.3.3</url>
</release>
<release version="4.3.2" date="2024-05-30" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.3.2</url>
</release>
<release version="4.3.1" date="2024-05-03" type="stable">
<url type="details">https://github.com/sabnzbd/sabnzbd/releases/tag/4.3.1</url>
</release>
</releases>
<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">640</display_length>
<internet>always</internet>
</recommends>
<project_license>GPL-2.0-or-later</project_license>
<developer id="org.sabnzbd">
<name>The SABnzbd-Team</name>
</developer>
<screenshots>
<screenshot type="default">
<image>https://sabnzbd.org/images/landing/screenshots/interface.png</image>
<caption>Intuitive interface</caption>
<caption xml:lang="fr">Interface intuitive</caption>
<caption xml:lang="tr">Sezgisel arayüz</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/night-mode.png</image>
<caption>Also comes in Night-mode</caption>
<caption xml:lang="fr">Fourni également avec le mode nuit</caption>
<caption xml:lang="tr">Gece kipi ile de sunulur</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/add-nzb.png</image>
<caption>Add NZB's or use drag-and-drop!</caption>
<caption xml:lang="fr">Ajoutez des fichiers NZB ou utilisez le glisser - déposer !</caption>
<caption xml:lang="tr">NZB dosyaları ekleyin veya kaydır - bırak kullanın!</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/phone-interface.png</image>
<caption>Scales to any screen size</caption>
<caption xml:lang="fr">S'adapte à toutes les tailles d'écran</caption>
<caption xml:lang="tr">Her ekran boyutuna uyum sağlar</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/history-details.png</image>
<caption>Easy overview of all history details</caption>
<caption xml:lang="fr">Vue d'ensemble aisée de tous les détails de l'historique</caption>
<caption xml:lang="tr">Tarihçenin tüm ayrıntıları için kolay genel bakış</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/phone-extra.png</image>
<caption>Every option, on every screen size</caption>
<caption xml:lang="fr">Toutes les options, quelle que soit la taille d'écran</caption>
<caption xml:lang="tr">Ekran boyutu ne olursa olsun, tüm seçenekler elinizin altında</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/file-lists.png</image>
<caption>Manage a job's individual files</caption>
<caption xml:lang="fr">Gérez les fichiers individuels d'une tâche</caption>
<caption xml:lang="tr">Herhangi bir görevin dosyalarını tek tek yönetin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/set-speedlimit.png</image>
<caption>Easy speed limiting</caption>
<caption xml:lang="fr">Limitation facile du débit</caption>
<caption xml:lang="tr">Kolay hız sınırlaması</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/set-options.png</image>
<caption>Quickly change settings</caption>
<caption xml:lang="fr">Changement rapide des réglages</caption>
<caption xml:lang="tr">Ayarları hızlıca değiştirin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/dashboard.png</image>
<caption>Easy system check</caption>
<caption xml:lang="fr">Vérification facile du système</caption>
<caption xml:lang="tr">Sistemi kolayca kontrol edin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/connections-overview.png</image>
<caption>See active connections</caption>
<caption xml:lang="fr">Voyez les connexions actives</caption>
<caption xml:lang="tr">Etkin bağlantıları görüntüleyin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/skin-settings.png</image>
<caption>Customize the interface</caption>
<caption xml:lang="fr">Personnalisez l'interface</caption>
<caption xml:lang="tr">Arayüzü kişiselleştirin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/tabbed.png</image>
<caption>Tabbed-mode</caption>
<caption xml:lang="fr">Mode avec onglets</caption>
<caption xml:lang="tr">Sekmeli kip</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/set-custom-pause.png</image>
<caption>Specify any pause duration</caption>
<caption xml:lang="fr">Spécifiez une durée de pause quelconque</caption>
<caption xml:lang="tr">Herhangi bir duraklama süresi belirtin</caption>
</screenshot>
<screenshot>
<image>https://sabnzbd.org/images/landing/screenshots/config.png</image>
<caption>Easy configuration</caption>
<caption xml:lang="fr">Configuration facile</caption>
<caption xml:lang="tr">Kolay yapılandırma</caption>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"/>
</component>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-compressed-nzb">
<sub-class-of type="application/x-nzb"/>
<comment>NewzBin Usenet index (compressed)</comment>
<glob pattern="*.nzb.gz"/>
<glob pattern="*.nzb.bz2"/>
</mime-type>
</mime-info>
Loaded 100 of 449 files, more files were not shown because too many files have changed in this diff. Show more