Lukas 4895e487c0 feat: Add NFO metadata infrastructure (Task 3 - partial)
- Created TMDB API client with async requests, caching, and retry logic
- Implemented NFO XML generator for Kodi/XBMC format
- Created image downloader for poster/logo/fanart with validation
- Added NFO service to orchestrate metadata creation
- Added NFO-related configuration settings
- Updated requirements.txt with aiohttp, lxml, pillow
- Created unit tests (need refinement due to implementation mismatch)

Components created:
- src/core/services/tmdb_client.py (270 lines)
- src/core/services/nfo_service.py (390 lines)
- src/core/utils/nfo_generator.py (180 lines)
- src/core/utils/image_downloader.py (296 lines)
- tests/unit/test_tmdb_client.py
- tests/unit/test_nfo_generator.py
- tests/unit/test_image_downloader.py

Note: Tests need to be updated to match actual implementation APIs.
Dependencies installed: aiohttp, lxml, pillow
2026-01-11 20:33:33 +01:00
2025-10-12 22:39:51 +02:00
2025-11-01 19:23:32 +01:00
2025-12-15 14:07:04 +01:00
2025-10-12 18:05:31 +02:00
2025-05-31 20:46:30 +02:00
2025-11-15 16:56:12 +01:00
2025-11-15 09:11:02 +01:00
2025-12-15 14:07:04 +01:00

Aniworld Download Manager

A web-based anime download manager with REST API, WebSocket real-time updates, and a modern web interface.

Features

  • Web interface for managing anime library
  • REST API for programmatic access
  • WebSocket real-time progress updates
  • Download queue with priority management
  • Automatic library scanning for missing episodes
  • JWT-based authentication
  • SQLite database for persistence

Quick Start

Prerequisites

  • Python 3.10+
  • Conda (recommended) or virtualenv

Installation

  1. Clone the repository:
git clone https://github.com/your-repo/aniworld.git
cd aniworld
  1. Create and activate conda environment:
conda create -n AniWorld python=3.10
conda activate AniWorld
  1. Install dependencies:
pip install -r requirements.txt
  1. Start the server:
python -m uvicorn src.server.fastapi_app:app --host 127.0.0.1 --port 8000
  1. Open http://127.0.0.1:8000 in your browser

First-Time Setup

  1. Navigate to http://127.0.0.1:8000/setup
  2. Set a master password (minimum 8 characters, mixed case, number, special character)
  3. Configure your anime directory path
  4. Login with your master password

Documentation

Document Description
docs/API.md REST API and WebSocket reference
docs/ARCHITECTURE.md System architecture and design
docs/CONFIGURATION.md Configuration options
docs/DATABASE.md Database schema
docs/DEVELOPMENT.md Developer setup guide
docs/TESTING.md Testing guidelines

Project Structure

src/
+-- cli/                # CLI interface (legacy)
+-- config/             # Application settings
+-- core/               # Domain logic
|   +-- SeriesApp.py    # Main application facade
|   +-- SerieScanner.py # Directory scanning
|   +-- entities/       # Domain entities
|   +-- providers/      # External provider adapters
+-- server/             # FastAPI web server
    +-- api/            # REST API endpoints
    +-- services/       # Business logic
    +-- models/         # Pydantic models
    +-- database/       # SQLAlchemy ORM
    +-- middleware/     # Auth, rate limiting

API Endpoints

Endpoint Description
POST /api/auth/login Authenticate and get JWT token
GET /api/anime List anime with missing episodes
GET /api/anime/search?query= Search for anime
POST /api/queue/add Add episodes to download queue
POST /api/queue/start Start queue processing
GET /api/queue/status Get queue status
WS /ws/connect WebSocket for real-time updates

See docs/API.md for complete API reference.

Configuration

Environment variables (via .env file):

Variable Default Description
JWT_SECRET_KEY (random) Secret for JWT signing
DATABASE_URL sqlite:///./data/aniworld.db Database connection
ANIME_DIRECTORY (empty) Path to anime library
LOG_LEVEL INFO Logging level

See docs/CONFIGURATION.md for all options.

Running Tests

# Run all tests
conda run -n AniWorld python -m pytest tests/ -v

# Run unit tests only
conda run -n AniWorld python -m pytest tests/unit/ -v

# Run integration tests
conda run -n AniWorld python -m pytest tests/integration/ -v

Technology Stack

  • Web Framework: FastAPI 0.104.1
  • Database: SQLite + SQLAlchemy 2.0
  • Auth: JWT (python-jose) + passlib
  • Validation: Pydantic 2.5
  • Logging: structlog
  • Testing: pytest + pytest-asyncio

License

MIT License

Description
No description provided
Readme 181 MiB
Languages
Python 81.6%
JavaScript 13.2%
HTML 3.2%
CSS 1.6%
Shell 0.4%