Commit Graph
36 Commits
Author SHA1 Message Date
mnightingale c3f6b2d582 Keep pytest-playwright out of the pytest session tavern nests inside a test 2026-08-30 17:01:15 +02:00
mnightingale f7513c05b9 Stop the nested tavern session collecting the xdist worker cache dirs (#3599) 2026-08-30 10:11:14 +02: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
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
Safihre 0950393b82 Correctly format tests based on new rules and remove star imports 2026-06-05 14:34:17 +02:00
Safihre 2122503762 Update copyright to 2026 2026-02-09 16:44:38 +01:00
Safihre 80f57a2b9a Drop support for Python 3.8 2025-11-21 10:00:09 +01:00
thezoggy dd0122865a bump copyright year (#3034) 2025-02-17 14:06:12 +01:00
Safihre 7c607a6bf6 Simplify file and folder name sanitization 2024-12-30 22:15:14 +01:00
Safihre 335ae82a3d Remove text output formatting from API
Closes #2785
2024-01-26 16:20:44 +01:00
thezoggy 9f6a9f9912 normalize and update copyright year 2024-01-02 09:42:17 +01: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 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 62a057dbfb Remove undocumented detection of password=XX from job name 2023-11-06 14:35:17 +01:00
Safihre 1513664b5f Lock all config dict operations
Closes #2685
2023-10-27 12:19:12 +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
Safihre 8643c6b260 Add debug information to failing test_api_watched_now 2023-09-12 23:08:37 +02:00
Safihre 7cbbff727f Remove (almost) all references to unused team@sabnzbd.org 2023-07-21 11:33:51 +02: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 6492cfb430 Update copyright year to 2023 2023-01-25 22:39:49 +01:00
Safihre dbfa7cc4eb Refactor Downloader.bandwidth_perc and bandwidth_limit usage 2022-09-21 22:49:41 +02:00
Safihre d03eabe4d5 Black formatting update 2022-01-30 09:25:54 +01:00
Safihre 9c7b61070b Update copyright year to 2022 2022-01-07 09:29:32 +01:00
Safihre ece0d7fabe Clear test-queue before running move_nzf_bulk test 2021-05-29 21:21:51 +02:00
Safihre 152029c85b Remove Plush-related code 2021-05-29 09:21:54 +02:00
Safihre faf1a44944 Black formatting update 2021-04-26 10:52:11 +02:00
Safihre a482bb7acc Add unittests for secured_expose 2021-04-22 21:36:13 +02:00
jcfp d491eb1af0 fix use of dir (#1855) 2021-04-16 16:25:20 +02:00
jcfp 29c727319d Test adding nzbs (#1760)
* add tests for adding nzbs

* restore clean_cache_dir fixture, unbreak utils tests

* include tests for partial and malformed nzbs

* test handling of prio from nzb metadata category

* update params of test_adding_nzbs_malformed

* add metadata to sabnews nzb creator

* also test with size_limit

* test prio with dupe detection

* remove leftover todo entry

* move pause and cleanup to fixture; rename functions
2021-02-02 22:58:20 +01:00
jcfp 794a6f4454 fix another script validation issue (#1774)
* fix another script validation issue

* add test for changing script to str None

* cleanup change_script tests
2021-01-30 14:25:53 +01:00
jcfp 67581bf3f6 Validate input value for scripts (#1765)
* verify input values for scripts

* update and parametrise test_api_queue_change_job_script

* fortify cfg with script validation, fix test

* add typing to is_valid_script function :)

* move list_scripts function to filesystem

* also move windows-specific pathext stuff
2021-01-25 07:36:41 +01:00
Safihre f04f6684e0 Correct refactor of database.py
Sending invalid nzo_id's resulted in crashes.
https://forums.sabnzbd.org/viewtopic.php?f=11&t=25163
2021-01-23 16:18:26 +01:00
Safihre f0bfb08c2e Update copyright year to 2021 2021-01-03 20:43:19 +01:00
jcfpandSafihre 8b5494d0a6 add selecting by nzo_id(s) for api queue and history output (#1718)
* add select by nzo_id to history api

* add select by nzo_id to queue api

* add tests for selecting by nzo_ids

* Do not run codesign step on pull requests

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-12-26 13:42:42 +01:00
Safihre 9f2a9c32c0 Switch to GitHub Actions for CI
Removed the par2 files for the unicode job, they caused too much problems. It's a bad "fix" for #1509.
2020-12-12 16:52:43 +01:00
jcfpandSafihre 5ea6a31bc2 Api tests (#1668)
* fix deprecation warning in sabnews regex

* enable text, xml returns from get_api_result

* add api tests

* add functional api tests

* add tavern.yaml files to test data

* explicitly add lxml to work around pip dependency issues

* prevent pytest from picking up the tavern files

* Revert "fix deprecation warning in sabnews regex"

This reverts commit 4f0b7131e7.

* address minor issues

* integrate fixtures into conftest

* black :/

* harden queue repair test

* try a workaround for extremely slow test runs on windoze

* Correct server detection in functional tests

* move scripts dir inside SAB_CACHE_DIR

* also relocate the generated script

Co-authored-by: Safihre <safihre@sabnzbd.org>
2020-11-08 18:37:48 +01:00