351 Commits

Author SHA1 Message Date
883f89b113 Add series key metadata to callback contexts 2025-11-23 20:02:11 +01:00
41a53bbf8f docs: clean up completed tasks from instructions.md
Removed detailed implementation for completed Phase 1 and Task 2.1:
- Task 1.1: Update Serie Class to Enforce Key as Primary Identifier
- Task 1.2: Update SerieList to Use Key for Lookups
- Task 1.3: Update SerieScanner to Use Key Consistently
- Task 1.4: Update Provider Classes to Use Key
- Task 1.5: Update Provider Factory to Use Key
- Task 2.1: Update SeriesApp to Use Key for All Operations

Replaced with completion markers for cleaner task list.
All implementation details are preserved in git history.
2025-11-23 19:56:20 +01:00
5c08bac248 style: reorder imports in SeriesApp.py
Minor formatting change - imports reordered alphabetically
2025-11-23 19:54:19 +01:00
8443de4e0f feat(core): standardize SeriesApp to use key as primary identifier
Task 2.1 - Update SeriesApp to Use Key for All Operations

Changes:
- Added 'key' field to DownloadStatusEventArgs and ScanStatusEventArgs
- Updated download() method docstrings to clarify key vs folder usage
- Implemented _get_serie_by_key() helper method for series lookups
- Updated all event emissions to include both key (identifier) and folder (metadata)
- Enhanced logging to show both key and folder for better debugging
- Fixed test mocks to include new key and item_id fields

Benefits:
- Consistent series identification throughout core application layer
- Clear separation between identifier (key) and metadata (folder)
- Better debugging with comprehensive log messages
- Type-safe lookups with Optional[Serie] return types
- Single source of truth for series lookups

Test Results:
- All 16 SeriesApp tests pass
- All 562 unit tests pass with no regressions
- No breaking changes to existing functionality

Follows:
- PEP 8 style guidelines (max 79 chars per line)
- PEP 257 docstring standards
- Project coding standards (type hints, error handling, logging)
2025-11-23 19:51:26 +01:00
51cd319a24 Task 1.5: Update Provider Factory documentation for key usage
- Added comprehensive module-level docstring explaining provider vs series keys
- Enhanced Loaders class docstring with purpose and attributes documentation
- Added detailed docstring to GetLoader() method with Args/Returns/Raises sections
- Added type hints: Dict[str, Loader] for self.dict and -> None for __init__
- Clarified distinction between provider keys (e.g., 'aniworld.to') and series keys
- No functional changes - existing implementation already correct
- All 34 provider tests pass
- All 16 SeriesApp tests pass
- Updated instructions.md to mark Task 1.5 as completed
- Follows PEP 8 and PEP 257 standards
2025-11-23 19:45:22 +01:00
c4ec6c9f0e Task 1.1: Fix PEP 8 compliance in Serie class
- Fixed line length issues (max 79 chars)
- Added UTF-8 encoding to file operations
- Fixed blank line formatting
- Improved code formatting in __str__, to_dict, from_dict methods
- All docstrings now comply with PEP 8
- All 16 Serie class tests pass
- All 5 anime model tests pass
- No functional changes, only style improvements
2025-11-23 19:38:26 +01:00
aeb1ebe7a2 Task 1.4: Update provider classes to use key as primary identifier
- Enhanced download() method docstring in aniworld_provider.py
- Enhanced Download() method docstring in enhanced_provider.py
- Clarified that 'key' is the series unique identifier from provider
- Clarified that 'serie_folder'/'serieFolder' is filesystem folder name (metadata only)
- Added comprehensive Args, Returns, and Raises sections to docstrings
- Fixed PEP 8 line length issue in logging statement
- Verified existing code already uses 'key' for identification and logging
- All 34 provider-related tests pass successfully
- No functional changes required, documentation improvements only
2025-11-23 17:51:32 +01:00
920a5b0eaf feat(core): Standardize SerieScanner to use 'key' as primary identifier
Task 1.3: Update SerieScanner to Use Key Consistently

Changes:
- Renamed self.folderDict to self.keyDict for clarity and consistency
- Updated internal storage to use serie.key as dictionary key
- Modified scan() method to store series by key
- Enhanced logging to show both key (identifier) and folder (metadata)
- Added debug logging when storing series
- Updated error contexts to include both key and folder in metadata
- Updated completion statistics to use keyDict
- Enhanced docstrings to clarify identifier vs metadata usage
- Fixed import formatting to comply with PEP 8 line length

Success criteria met:
 Scanner stores series by 'key'
 Progress callbacks use 'key' for identification
 Error messages reference both 'key' and 'folder' appropriately
 All 554 unit tests pass

Related to: Series Identifier Standardization (Phase 1, Task 1.3)
2025-11-23 13:06:33 +01:00
8b5b06ca9a feat: Standardize SerieList to use key as primary identifier (Task 1.2)
- Renamed folderDict to keyDict for clarity
- Updated internal storage to use serie.key instead of serie.folder
- Optimized contains() from O(n) to O(1) with direct key lookup
- Added get_by_key() as primary lookup method
- Added get_by_folder() for backward compatibility
- Enhanced docstrings to clarify key vs folder usage
- Created comprehensive test suite (12 tests, all passing)
- Verified no breaking changes (16 SeriesApp tests pass)

This establishes key as the single source of truth for series
identification while maintaining folder as metadata for filesystem
operations only.
2025-11-23 12:25:08 +01:00
048434d49c feat: Task 1.1 - Enforce key as primary identifier in Serie class
- Add validation in Serie.__init__ to prevent empty/whitespace keys
- Add validation in Serie.key setter to prevent empty values
- Automatically strip whitespace from key values
- Add comprehensive docstrings explaining key as unique identifier
- Document folder property as metadata only (not for lookups)
- Create comprehensive test suite with 16 tests in test_serie_class.py
- All 56 Serie-related tests pass successfully
- Update instructions.md to mark Task 1.1 as completed

This is the first task in the Series Identifier Standardization effort
to establish 'key' as the single source of truth for series identification
throughout the codebase.
2025-11-23 12:12:58 +01:00
e42e223f28 refactory instructions 2025-11-23 11:45:34 +01:00
9a42442f47 removed downloaded and total mb 2025-11-20 19:34:01 +01:00
72a0455d59 download status floating point fix 2025-11-20 19:24:30 +01:00
029abb9be2 fix: progress part 1. percentage is working 2025-11-20 19:21:01 +01:00
34019b7e65 better shutdown 2025-11-20 19:11:05 +01:00
1ca105f330 shut down download thread 2025-11-20 19:03:20 +01:00
57da1f1272 fix: download status 2025-11-20 19:02:04 +01:00
cf503c8d77 fixed empty queu 2025-11-20 18:53:22 +01:00
b1f4d41b27 fix tests 2025-11-19 21:20:22 +01:00
17c7a2e295 fixed tests 2025-11-19 20:46:08 +01:00
7b07e0cfae fixed : tests 2025-11-15 17:55:27 +01:00
fac0cecf90 fixed some tests 2025-11-15 16:56:12 +01:00
f49598d82b fix tests 2025-11-15 12:35:51 +01:00
f91875f6fc fix tests 2025-11-15 09:11:02 +01:00
8ae8b0cdfb fix: test 2025-11-14 10:52:23 +01:00
4c7657ce75 fixed: removed js 2025-11-14 09:51:57 +01:00
1e357181b6 fix: add and download issue 2025-11-14 09:33:36 +01:00
2441730862 fix progress events 2025-11-07 18:40:36 +01:00
5c4bd3d7e8 fix add issue 2025-11-02 15:42:51 +01:00
5c88572ac7 fix missing list 2025-11-02 15:29:16 +01:00
a80bfba873 removed useless stuff 2025-11-02 15:25:07 +01:00
64e78bb9b8 chore: removed locks 2025-11-02 15:18:30 +01:00
ec987eff80 chore: make sure that there is only one app 2025-11-02 15:14:34 +01:00
e414a1a358 refactored callback 2025-11-02 10:34:49 +01:00
8a49db2a10 rework of SeriesApp.py 2025-11-02 10:20:10 +01:00
2de3317aee refactoring backup 2025-11-02 09:52:43 +01:00
ca4bf72fde fix progress issues 2025-11-02 08:33:44 +01:00
d5f7b1598f use of websockets 2025-11-01 19:23:32 +01:00
57c30a0156 call back logs 2025-11-01 19:03:30 +01:00
9fce617949 fix percentage 2025-11-01 18:46:53 +01:00
0b5faeffc9 fix adding issues 2025-11-01 18:22:48 +01:00
18faf3fe91 added remove all item from queue 2025-11-01 18:09:23 +01:00
4dba4db344 fix: wrong folder was created 2025-11-01 17:51:30 +01:00
b76ffbf656 fixed percentage and mb/s view 2025-11-01 16:49:12 +01:00
f0b9d50f85 fix not downloading 2025-11-01 16:43:05 +01:00
6cdb2eb1e1 added logging 2025-11-01 16:29:07 +01:00
33aeac0141 download the queue 2025-11-01 16:13:28 +01:00
eaf6bb9957 fix queue issues 2025-11-01 16:07:31 +01:00
3c6d82907d queue fix 2025-11-01 15:43:15 +01:00
3be175522f download re implemented 2025-10-30 22:06:41 +01:00