Aniworld/src/server/README.md

4.1 KiB

AniWorld Web Manager

A modern Flask-based web application for managing anime downloads with a beautiful Fluent UI design.

Features

Anime Search

  • Real-time search with auto-suggest
  • Easy addition of series from search results
  • Clear search functionality

Series Management

  • Grid layout with card-based display
  • Shows missing episodes count
  • Multi-select with checkboxes
  • Select all/deselect all functionality

Download Management

  • Background downloading with progress tracking
  • Pause, resume, and cancel functionality
  • Real-time status updates via WebSocket

Modern UI

  • Fluent UI design system (Windows 11 style)
  • Dark and light theme support
  • Responsive design for desktop and mobile
  • Smooth animations and transitions

Localization

  • Support for multiple languages (English, German)
  • Easy to add new languages
  • Resource-based text management

Real-time Updates

  • WebSocket connection for live updates
  • Toast notifications for user feedback
  • Status panel with progress tracking

Setup

  1. Install Dependencies

    pip install Flask Flask-SocketIO eventlet
    
  2. Environment Configuration Set the ANIME_DIRECTORY environment variable to your anime storage path:

    # Windows
    set ANIME_DIRECTORY="Z:\media\serien\Serien"
    
    # Linux/Mac
    export ANIME_DIRECTORY="/path/to/your/anime/directory"
    
  3. Run the Application

    cd src/server
    python app.py
    
  4. Access the Web Interface Open your browser and navigate to: http://localhost:5000

Usage

Searching and Adding Anime

  1. Use the search bar to find anime
  2. Browse search results
  3. Click "Add" to add series to your collection

Managing Downloads

  1. Select series using checkboxes
  2. Click "Download Selected" to start downloading
  3. Monitor progress in the status panel
  4. Use pause/resume/cancel controls as needed

Theme and Language

  • Click the moon/sun icon to toggle between light and dark themes
  • Language is automatically detected from browser settings
  • Supports English and German out of the box

Configuration

  • Click the "Config" button to view current settings
  • Shows anime directory path, series count, and connection status

File Structure

src/server/
├── app.py                 # Main Flask application
├── templates/
│   └── index.html        # Main HTML template
├── static/
│   ├── css/
│   │   └── styles.css    # Fluent UI styles
│   └── js/
│       ├── app.js        # Main application logic
│       └── localization.js # Multi-language support

API Endpoints

  • GET / - Main web interface
  • GET /api/series - Get all series with missing episodes
  • POST /api/search - Search for anime
  • POST /api/add_series - Add series to collection
  • POST /api/download - Start downloading selected series
  • POST /api/rescan - Rescan anime directory
  • GET /api/status - Get application status
  • POST /api/download/pause - Pause current download
  • POST /api/download/resume - Resume paused download
  • POST /api/download/cancel - Cancel current download

WebSocket Events

  • connect - Client connection established
  • scan_started - Directory scan initiated
  • scan_progress - Scan progress update
  • scan_completed - Scan finished successfully
  • download_started - Download initiated
  • download_progress - Download progress update
  • download_completed - Download finished
  • download_paused - Download paused
  • download_resumed - Download resumed
  • download_cancelled - Download cancelled

Security Features

  • Input validation on all API endpoints
  • No exposure of internal stack traces
  • Secure WebSocket connections
  • Environment-based configuration

Browser Compatibility

  • Modern browsers with ES6+ support
  • WebSocket support required
  • Responsive design works on mobile devices

Development Notes

  • Uses existing SeriesApp class without modifications
  • Maintains compatibility with original CLI application
  • Thread-safe download management
  • Proper error handling and user feedback