Complete Task 8: Database Support for NFO Status

- Added 5 NFO tracking fields to AnimeSeries model
- Fields: has_nfo, nfo_created_at, nfo_updated_at, tmdb_id, tvdb_id
- Added 3 service methods to AnimeService for NFO operations
- Methods: update_nfo_status, get_series_without_nfo, get_nfo_statistics
- SQLAlchemy auto-migration (no manual migration needed)
- Backward compatible with existing data
- 15 new tests added (19/19 passing)
- Tests: database models, service methods, integration queries
This commit is contained in:
2026-01-16 18:50:04 +01:00
parent 56b4975d10
commit d642234814
9 changed files with 1014 additions and 50 deletions

View File

@@ -377,6 +377,7 @@ Integrate NFO checking into the download workflow - check for tvshow.nfo before
- `tests/unit/test_series_app.py`
---
---
#### Task 5: Add NFO Management API Endpoints ✅ **COMPLETE**
@@ -644,10 +645,19 @@ Add NFO configuration options to the settings UI.
---
#### Task 8: Add Database Support for NFO Status
#### Task 8: Add Database Support for NFO Status ✅ **COMPLETE**
**Priority:** Medium
**Estimated Time:** 2-3 hours
**Estimated Time:** 2-3 hours
**Status:** Complete. See [task8_status.md](task8_status.md) for details.
**What Was Completed:**
- ✅ 5 new database fields for NFO tracking (has_nfo, nfo_created_at, nfo_updated_at, tmdb_id, tvdb_id)
- ✅ 3 new service methods in AnimeService
- ✅ 15 comprehensive tests (all passing)
- ✅ Backward compatibility maintained
- ✅ SQLAlchemy auto-migration support
Track NFO file status in the database.
@@ -672,11 +682,11 @@ Track NFO file status in the database.
**Acceptance Criteria:**
- [ ] Database schema updated (SQLAlchemy will auto-create columns)
- [ ] NFO status tracked in DB
- [ ] Queries for missing NFOs work
- [ ] Backward compatible with existing data
- [ ] Database tests pass
- [x] Database schema updated (SQLAlchemy will auto-create columns)
- [x] NFO status tracked in DB
- [x] Queries for missing NFOs work
- [x] Backward compatible with existing data
- [x] Database tests pass
**Testing Requirements:**