- 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
- 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.
- 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.
- 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.
- 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.