mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 12:50:09 +00:00
Add Transmission/NZBGet and per-client paths and much more
Extend multi-download-client support to include Transmission and NZBGet and introduce per-client custom download paths. Adds protocol mapping and new client types, Transmission/NZBGet integration services, API CRUD and validation changes, UI components/modal updates and live path previews, and manager routing by protocol. Includes DB migrations (download_path on download_history, interactive_search_access on users), schema updates, and related processor/service fixes and tests to ensure backward compatibility and proper path resolution.
This commit is contained in:
@@ -11,6 +11,8 @@ import {
|
||||
getChildIds,
|
||||
getParentId,
|
||||
isParentCategory,
|
||||
getAllStandardCategoryIds,
|
||||
isStandardCategory,
|
||||
} from '@/lib/utils/torrent-categories';
|
||||
|
||||
describe('torrent categories', () => {
|
||||
@@ -39,4 +41,22 @@ describe('torrent categories', () => {
|
||||
expect(DEFAULT_CATEGORIES).toEqual([3030]);
|
||||
expect(TORRENT_CATEGORIES.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('returns all standard category IDs including parents and children', () => {
|
||||
const ids = getAllStandardCategoryIds();
|
||||
expect(ids.has(3000)).toBe(true); // parent
|
||||
expect(ids.has(3030)).toBe(true); // child
|
||||
expect(ids.has(7020)).toBe(true); // child
|
||||
expect(ids.has(8000)).toBe(true); // parent with no children
|
||||
expect(ids.has(99999)).toBe(false); // not a standard category
|
||||
});
|
||||
|
||||
it('identifies standard vs custom categories', () => {
|
||||
expect(isStandardCategory(3000)).toBe(true);
|
||||
expect(isStandardCategory(3030)).toBe(true);
|
||||
expect(isStandardCategory(7020)).toBe(true);
|
||||
expect(isStandardCategory(8000)).toBe(true);
|
||||
expect(isStandardCategory(12345)).toBe(false);
|
||||
expect(isStandardCategory(0)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user