Commit Graph

13 Commits

Author SHA1 Message Date
Matthieu B
73c29458fe fix: resolve all test failures, linting errors, and type errors
- Fix 55 test failures caused by missing request contexts and incorrect
  session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
  classes, add None guards for fetchone()/datetime, widen dict type
  annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
2026-03-29 16:20:23 +02:00
Matthieu B
da8d008398 feat: revamp activity measurement and display 2025-11-04 18:55:11 +01:00
Matthieu B
d8bdc832c9 test: add assertions to ensure WizardStep retrieval after edits 2025-11-03 17:45:10 +01:00
Matthieu B
6a3632ec66 refactor: update type hints for better clarity and consistency across multiple files 2025-10-23 19:49:58 +02:00
Matthieu B
6ab5e024db Revert "Merge pull request #925 from wizarrrr/chore/python-3.14-upgrade"
This reverts commit 35dde7c19a, reversing
changes made to c8cf9905ba.
2025-10-19 14:05:59 +02:00
Matthieu B
294194eca7 Refactor code structure for improved readability and maintainability 2025-10-18 17:51:32 +02:00
Matthieu B
45053f041f Refactor historical data import service
- Moved utility functions for datetime parsing, tick conversion, and session building from `historical_data.py` to a new module `utils.py`.
- Deleted the `historical_data.py` file as its functionality is now encapsulated in the new utility module.
- Updated the `build_activity_session` function to utilize the new utility functions for improved readability and maintainability.
2025-10-18 15:37:48 +02:00
Matthieu B
456f209204 Potential fix for code scanning alert no. 69: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-18 13:00:28 +02:00
Matthieu B
76f9480ada feat: Add support for AudiobookShelf in historical data import functionality 2025-10-17 15:48:10 +02:00
Matthieu B
01b67cda52 Enhance Activity Settings and Historical Data Import Functionality
- Redesigned the Activity Settings page for improved user experience, including better organization of sections and updated alert messages.
- Added functionality to import historical data from Jellyfin and Emby servers, allowing users to specify the number of days back and a result limit for imports.
- Updated the HistoricalDataService to support importing history from Jellyfin and Emby, including detailed logging and error handling.
- Improved the UI for historical data import, including form validation and user feedback during the import process.
- Cleaned up completed historical import jobs from the database to prevent indefinite persistence.
2025-10-17 15:26:43 +02:00
Matthieu B
77a1112d62 feat: Add historical import job functionality
- Introduced the HistoricalImportJob model to track historical data import jobs.
- Implemented asynchronous job processing for importing historical activity data from media servers.
- Enhanced the activity settings page to allow users to specify the number of days back for historical imports.
- Added a new route to display recent historical import jobs.
- Updated the import_historical_activity function to create and manage import jobs.
- Improved UI components for displaying success and error messages related to historical imports.
- Added migration script to create the historical_import_job table in the database.
2025-10-17 13:14:37 +02:00
Matthieu B
8361144972 feat(activity): Enhance activity monitoring with historical data import and management features 2025-10-17 11:00:33 +02:00
Matthieu B
0ac98355dd feat(activity): Implement activity ingestion, identity resolution, and maintenance services
- Added `identity_resolution.py` for resolving Wizarr users and identities.
- Created `ingestion.py` to handle recording and updating activity events.
- Introduced `maintenance.py` for cleanup and session management tasks.
- Developed `queries.py` for read-oriented operations on activity sessions.
- Implemented background tasks in `activity.py` for scheduled maintenance.
- Added tests for activity services and blueprint to ensure functionality.
2025-10-16 15:18:31 +02:00