613 Commits

Author SHA1 Message Date
d5116e378e chore: release v0.1.0 v0.1.0 2026-05-16 21:41:40 +02:00
50a7083ce5 fix(vpn): support AllowedIPs=0.0.0.0/0 and multi-DNS configs
- Parse AllowedIPs dynamically from WireGuard config instead of hardcoding routes
- Remove auto-created default route by wg setconf to prevent breaking endpoint connection
- Fix DNS parsing: write comma-separated DNS servers as separate nameserver lines
- Add test for AllowedIPs route verification and DNS configuration
- Update test to skip container runtime tests when not running as root
2026-05-16 21:41:27 +02:00
52c0ff2337 chore(docs): remove temporary planning file docs/bla 2026-05-16 21:22:44 +02:00
a5fd88e224 chore(vpn): update WireGuard endpoint and credentials
- Rotate to new VPN endpoint (91.148.236.64)
- Update private/public keys and client address
- Switch DNS to 198.18.0.1/0.2
- Add local network route preservation via PostUp/PostDown
- Align nl.conf and wg0.conf configurations
2026-05-16 21:22:04 +02:00
98d4edad14 feat(vpn): dynamic AllowedIPs routing and improved test coverage
- Parse AllowedIPs from WireGuard config in entrypoint.sh
- Add/remove routes dynamically instead of hardcoded 0.0.0.0/1 split
- Handle both 0.0.0.0/0 and custom AllowedIPs
- Add route cleanup on VPN stop (endpoint + AllowedIPs)
- Update test_vpn.py with AllowedIPs route verification
- Allow non-root build-only tests with automatic runtime skip
2026-05-16 21:21:56 +02:00
bc8059b453 feat(docker): add release script and enhance push script
- Add release.sh for automated versioning and image pushing
- Enhance push.sh with target selection (app/vpn/all)
- Add docker/podman engine auto-detection
- Improve usage docs and error handling
2026-05-16 21:21:45 +02:00
815a4f1520 chore: release v0.0.1 v0.0.1 2026-05-16 21:20:20 +02:00
e3509f5c8f feat(scanner): add DB fallback for series key resolution
When SerieScanner encounters a folder without a local key or data file,
it now optionally falls back to a database lookup by folder name. This
prevents newly-added series from being silently skipped on rescan when
their metadata only lives in the DB.

Changes:
- SerieScanner accepts an optional db_lookup callable
- SeriesApp forwards db_lookup to SerieScanner
- AnimeSeriesService adds get_by_folder_sync() helper
- dependencies.py wires a sync DB lookup into get_series_app()
- Unit tests cover fallback hit, miss, and exception paths
2026-05-14 19:28:43 +02:00
69c2fd01f9 chore: bump version to 1.0.1 2026-05-14 17:30:13 +02:00
0f36afd88c refactor: move NFO repair from initialization_service to folder_scan_service
Moves perform_nfo_repair_scan and its helpers (_repair_one_series,
_NFO_REPAIR_SEMAPHORE) into folder_scan_service.py so NFO repair runs
during the scheduled folder scan instead of on startup.

- Removes NFO repair code from initialization_service.py
- Updates all test imports and patch targets
- Updates docs/NFO_GUIDE.md and docs/CHANGELOG.md references

All 174 related tests pass.
2026-05-14 17:01:01 +02:00
ceac22fc34 test: fix NFO workflow and background loader tests
- Add missing TMDB async mock methods (_ensure_session, close)
  to all TMDB mocks in test_nfo_workflow.py
- Refactor test_anime_add_nfo_isolation.py to mock get_nfo_factory()
  instead of asserting on series_app.nfo_service directly
- Patch get_nfo_factory in test_background_loader_service.py
  to align with factory-based NFOService creation

Fixes test failures caused by NFOService refactoring that introduced
explicit TMDB session lifecycle and NFO factory pattern.
2026-05-13 12:41:22 +02:00
9c0f7ce08d test: add tests for scheduled folder scan and startup NFO repair removal
Add comprehensive test coverage for Tasks 1.1–1.5 and 2.1:

- test_scheduler_config_model.py: folder_scan_enabled defaults, explicit
  values, backward compatibility with old configs, serialization roundtrip
- test_folder_scan_service.py (new): prerequisites, NFO repair integration,
  folder rename integration, poster check/download, semaphore values,
  NFO thumb URL extraction, full end-to-end scan flow
- test_scheduler_service.py: scheduler _perform_rescan integration with
  folder_scan_enabled (called when enabled, skipped when disabled, error
  handling and broadcasting), folder_scan_enabled in get_status output
- test_nfo_repair_startup.py: verify perform_nfo_repair_scan is NOT called
  during FastAPI lifespan startup and IS called from FolderScanService

All 90 tests pass.
2026-05-13 09:43:34 +02:00
756731cd5d feat: remove startup NFO repair, update docs and tests
- Remove NFO repair scan step from ARCHITECTURE.md startup sequence
- Update CHANGELOG.md: rephrase perform_nfo_repair_scan as scheduled scan
- Add test verifying perform_nfo_repair_scan is NOT called in lifespan
- Keep existing folder scan wiring tests and unit tests intact
- NFO_GUIDE.md already correctly describes scheduled scan behavior
2026-05-13 09:23:21 +02:00
eb0e6e8ccb fix: task 1.5 poster check + fix stuck tests
- Fix structlog format string in folder_scan_service (%(key)d -> kwargs)
- Add nfo_download_poster setting check before poster download
- Create missing NFO fixture files (tvshow.nfo.bad/good) for repair tests
- Fix test_context_used_in_logging to check all call args not format string
- Fix test_system_settings_integration isolation via reset_all_scans
2026-05-13 08:07:16 +02:00
eb2fc3c5ab feat: integrate NFO repair into scheduled folder scan
- Add FolderScanService.run_folder_scan() calling perform_nfo_repair_scan()
- Remove startup-time NFO repair from fastapi_app lifespan
- Update docs/NFO_GUIDE.md: repair now runs as part of daily scan
- Update tests to verify integration wiring
- Update ARCHITECTURE.md and scheduler_service for scan scheduling
2026-05-12 20:15:32 +02:00
c39ae9d0fc feat(scheduler): add folder_scan_enabled toggle to SchedulerConfig
- Add folder_scan_enabled boolean field (default false) to SchedulerConfig
- Update data/config.json example with new field
- Add checkbox to setup.html and include in JS payload
- Handle field in auth.py setup endpoint
- Expose field in scheduler API response
- Log and return field in scheduler_service.py
- Update docs/CONFIGURATION.md and docs/ARCHITECTURE.md
- Update index.html UI, app.js and scheduler-config.js handlers
- Verified backward compatibility: old configs load with default False
2026-05-11 21:02:05 +02:00
079f1f99e3 backup 2026-04-19 19:00:05 +02:00
9373f500d3 Commit remaining tracked changes 2026-04-19 18:57:26 +02:00
2274403899 Fix NFO plot fallback by using en-US search overview when German result is empty 2026-04-19 18:53:11 +02:00
6ad14c03b5 Task 3: remove non-reentrant TMDB context in NFOService and mark task done 2026-04-19 18:49:21 +02:00
b10cce0489 Task 2: guard SeriesApp NFOService init on NFOServiceFactory fallback and document config-only TMDB API key support 2026-04-19 18:46:30 +02:00
2aa184c870 Mark Task 1 done for NFOService per-task isolation 2026-04-19 18:41:04 +02:00
92bd55ada1 chore: apply pending code updates 2026-03-17 11:39:27 +01:00
e5fae0a0a2 docs: add logging instruction reference to tasks 2026-03-17 11:38:57 +01:00
151a08e033 fix: support missing/no-episodes library filters (API, UI, docs, tests) 2026-03-16 21:01:59 +01:00
e44a8190d0 chore: update gitignore and vscode settings for venv, clean up instructions 2026-03-14 09:37:30 +01:00
94720f2d61 fix: use worker_tasks list instead of non-existent worker_task attribute 2026-03-14 09:33:32 +01:00
0ec120e08f fix: reset queue progress flag after queue completes
- Reset _queue_progress_initialized after each queue run so the next
  run re-creates the 'download_queue' progress entry
- Handle 'already exists' ProgressServiceError in _init_queue_progress
  as a no-op success to cover concurrent-start edge cases
- Guard stop_downloads() progress update to avoid crashing when the
  entry was never created
2026-03-11 16:41:12 +01:00
db58ea9396 docs: mark NFO plot fix task as done 2026-03-06 21:20:37 +01:00
69b409f42d fix: ensure all NFO properties are written on creation
- Add showtitle and namedseason to mapper output
- Add multi-language fallback (en-US, ja-JP) for empty overview
- Use search result overview as last resort fallback
- Add tests for new NFO creation behavior
2026-03-06 21:20:17 +01:00
b34ee59bca fix: remove missing episode from DB and memory after download completes
- Fixed _remove_episode_from_missing_list to also update in-memory
  Serie.episodeDict and refresh series_list
- Added _remove_episode_from_memory helper method
- Enhanced logging for download completion and episode removal
- Added 5 unit tests for missing episode removal
2026-02-26 21:02:08 +01:00
624c0db16e Remove per-card NFO action buttons; add bulk NFO refresh for selected 2026-02-26 20:52:21 +01:00
e6d9f9f342 feat: add English fallback for empty German TMDB overview in NFO creation
When TMDB returns an empty German (de-DE) overview for anime (e.g.
Basilisk), the NFO plot tag was missing. Now both create and update
paths call _enrich_details_with_fallback() which fetches the English
(en-US) overview as a fallback.

Additionally, the <plot> XML element is always written (even when
empty) via the always_write parameter on _add_element(), ensuring
consistent NFO structure regardless of creation path.

Changes:
- nfo_service.py: add _enrich_details_with_fallback() method, call it
  in create_tvshow_nfo and update_tvshow_nfo
- nfo_generator.py: add always_write param to _add_element(), use it
  for <plot> tag
- test_nfo_service.py: add TestEnrichDetailsWithFallback with 4 tests
2026-02-26 20:48:47 +01:00
fc8cdc538d fix(docker): add missing Python deps, fix VPN routing and healthcheck
- Add missing packages to requirements.txt: requests, beautifulsoup4,
  fake-useragent, yt-dlp, urllib3
- Fix entrypoint.sh: replace grep -oP (GNU) with awk (BusyBox compat)
- Fix entrypoint.sh: add policy routing so LAN clients get responses
  via eth0 instead of through the WireGuard tunnel
- Change healthcheck from ping to curl (VPN provider blocks ICMP)
- Add start_period and increase retries for healthcheck
- Change external port mapping to 2000:8000
- Add podman-compose.prod.yml and push.sh to version control
2026-02-24 19:21:53 +01:00
d8248be67d Finalize Docker setup for Aniworld app 2026-02-22 19:57:46 +01:00
6c7dc66c5d Remove unused scripts and config files 2026-02-22 19:56:49 +01:00
d951963d87 docker part 1 2026-02-22 19:47:29 +01:00
f6000b1fff backup 2026-02-22 17:43:48 +01:00
ddf10327c7 Remove deprecated legacy interval field from setup and settings UI 2026-02-22 17:42:01 +01:00
747e1acc21 docs: document Temp cleanup in CHANGELOG and ARCHITECTURE 2026-02-22 17:39:18 +01:00
1885fed4bd clean Temp files after download and on server start 2026-02-22 17:32:40 +01:00
dd45494717 Setup page: add full scheduler config (time, days, auto-download) 2026-02-22 17:25:11 +01:00
4ac51a789a style: reformat imports in fastapi_app.py 2026-02-22 17:08:30 +01:00
1712dfd776 fix: isolate NFO repair sessions to prevent connector-closed errors 2026-02-22 17:06:21 +01:00
ddcac5a96d test: add live TMDB integration tests for NFO creation and repair 2026-02-22 17:01:31 +01:00
c186e0d4f7 fix: always repair NFO via update_tvshow_nfo so plot is written 2026-02-22 16:55:54 +01:00
759cd09ded fix: isolate startup steps so repair scan always runs 2026-02-22 12:29:17 +01:00
bbf0a0815a fix: handle missing anime directory gracefully on startup 2026-02-22 12:15:31 +01:00
87bf0d71cd style: apply formatter cleanup (import order, whitespace) 2026-02-22 11:26:06 +01:00
8e262c947c docs: document NFO repair feature 2026-02-22 11:21:57 +01:00