Welcome to Ace-Pace, your ultimate companion for organizing and managing your One-Pace library with precision and ease! Whether you're a casual viewer who wants a neat collection or a hardcore fan aiming for the perfect sync between episodes and the official One-Pace releases, Ace-Pace is designed to make your life simpler, your library cleaner, and your watching experience smoother.
One-Pace is a fantastic fan project that trims the One Piece anime down to its essential story arcs, removing filler and pacing issues to deliver a tighter, more engaging narrative. However, managing your One-Pace episodes, ensuring you have all the latest releases can be a daunting task. That's where Ace-Pace comes in β it automates the heavy lifting, letting you focus on enjoying the adventure.
To get started with Ace-Pace, you'll need to have Python installed on your system. We recommend using Python 3.6 or higher. You can download Python from the official website.
Once Python is installed, you need to install the required Python libraries. Run this command in the Ace-Pace directory:
pip install -r requirements.txt
This will install all necessary packages to ensure Ace-Pace runs smoothly.
Ace-Pace can also be run using Docker, which simplifies deployment and ensures consistent execution across different environments.
You can run Ace-Pace using docker run with environment variables and volume mounts:
docker run --rm \
-v /path/to/OnePaceLibrary:/media:rw \
-v /path/to/config:/config:rw \
-e TZ=Europe/London \
-e DB=true \
-e EPISODES_UPDATE=true \
-e DOWNLOAD=false \
-e DRY_RUN=false \
-e TORRENT_CLIENT=transmission \
-e TORRENT_HOST=127.0.0.1 \
-e TORRENT_PORT=9091 \
-e NYAA_URL=https://nyaa.si/?f=0&c=0_0&q=one+pace&o=asc \
-e DEBUG=true \
timothe/ace-pace:latestFor easier management, you can use the provided docker-compose.yml file. First, edit the compose file to match your setup:
-
Update the volume paths:
volumes: - /path/to/OnePaceLibrary:/media:rw - /path/to/config:/config:rw
-
Configure environment variables as needed (Torrent client settings, Nyaa URL, etc.)
-
Run with:
docker-compose up
Or run in detached mode:
docker-compose up -dThe following environment variables can be used to configure Ace-Pace in Docker:
NYAA_URL- Nyaa.si search URL (optional, default:https://nyaa.si/?f=0&c=0_0&q=one+pace&o=asc)- When not set, uses default URL without quality filter. Quality filtering (1080p only) is always applied in code.
DB- Set totrueto generate CSV database export on container start (default:false)EPISODES_UPDATE- Set totrueto update episodes metadata from Nyaa on container start (default:false)DOWNLOAD- Set totrueto automatically download missing episodes after generating report (default:false)RENAME- Set totrueto rename local files in the media folder to match One-Pace episode titles from the episodes index (default:false)- Non-interactive: no confirmation prompt; use
DRY_RUN=trueto simulate renaming without changing files - Before renaming, ensures CRC32 cache is complete for the media folder (calculates missing CRC32s if needed)
- Non-interactive: no confirmation prompt; use
ACEPACE_MEDIA_DIR_DOCKER- Media/library folder in Docker (default:"/media"). Entrypoint passes this as--folder.ACEPACE_CONFIG_DIR_DOCKER- Config/data directory in Docker (default:"/config"). Not set in entrypoint; override if you mount config elsewhere.DRY_RUN- WhenDOWNLOAD=true: test BitTorrent client without adding torrents. WhenRENAME=true: show rename plan without renaming (default:false)- With download: validates magnet links and checks existing torrents but does not add any downloads
- With rename: prints which files would be renamed without modifying the filesystem
TORRENT_CLIENT- BitTorrent client type:transmissionorqbittorrent(default:transmission)TORRENT_HOST- BitTorrent client host address (default:localhost)TORRENT_PORT- BitTorrent client port (default:9091for Transmission,8080for qBittorrent)TORRENT_USER- BitTorrent client username (optional)TORRENT_PASSWORD- BitTorrent client password (optional)DEBUG- Enable debug output for troubleshooting (default:false)- Set to
true,1,yes, oronto enable detailed debug information - When enabled, shows troubleshooting info, sample CRC32s, comparison details, and processing statistics
- Useful for diagnosing issues with missing episode detection or data processing
- Set to
TZ- Timezone (default:Europe/London)
The following volumes should be mounted for persistent data:
- Media folder (default
/media) - Mount your One-Pace library here (read-write). Override withACEPACE_MEDIA_DIR_DOCKER. - Config folder (default
/config) - Mount a directory for persistent configuration and data files (read-write). Override withACEPACE_CONFIG_DIR_DOCKER.- Contains:
crc32_files.db,episodes_index.db,Ace-Pace_Missing.csv,Ace-Pace_DB.csv episodes_index.dbnow stores magnet links for all episodes, reducing the need to fetch them repeatedly
- Contains:
When the container starts, it executes the following steps in order:
- Episodes Update (if
EPISODES_UPDATE=true): Updates the episodes metadata database from Nyaa, including magnet links for all episodes - Database Export (if
DB=true): Exports the CRC32 database to CSV - Missing Episodes Report: Always runs to generate/update
Ace-Pace_Missing.csv(unless only DB export was requested) - Rename (if
RENAME=true): Ensures CRC32 cache is complete for the media folder, then renames local files to match One-Pace episode titles (no confirmation). UseDRY_RUN=trueto simulate only. - Download (if
DOWNLOAD=true): Automatically downloads missing episodes via the configured BitTorrent client- If
DRY_RUN=true, tests connection and validates magnet links without adding torrents
- If
- In Docker mode, the default media folder is
/media(setACEPACE_MEDIA_DIR_DOCKERto override); config/data default is/config(setACEPACE_CONFIG_DIR_DOCKERto override) - The container runs non-interactively, so all configuration must be provided via environment variables
- All data files (databases, CSV exports) are stored in the config directory
- Quality filtering (1080p only) is applied in code regardless of the URL used
- When
NYAA_URLis not set, the default URL searches for all "one pace" episodes without quality filter, then filters for 1080p in code - Make sure your BitTorrent client is accessible from within the Docker network (use host network mode or configure networking appropriately)
If you're running Ace-Pace through a VPN container (such as Gluetun), you may encounter 429 (Too Many Requests) errors when querying Nyaa.si. This is because multiple requests from the same VPN exit node can trigger rate limiting.
Recommendation: It's perfectly fine to run Ace-Pace without a VPN. Instead, keep your BitTorrent client behind the VPN to protect your downloads while allowing Ace-Pace to query Nyaa.si directly without rate limiting issues.
To run the test suite with coverage:
# Install test dependencies
pip install -r requirements.txt
# Run tests with coverage
pytest
# Or explicitly generate coverage report
pytest --cov=. --cov-report=xml --cov-report=html --cov-report=term-missingThis will generate:
coverage.xml- Used by SonarQube for test coverage analysishtmlcov/- HTML coverage report (openhtmlcov/index.htmlin a browser)- Terminal output showing coverage summary
Ace-Pace includes a debug mode that provides detailed troubleshooting information. This is useful when diagnosing issues with missing episode detection or data processing.
In Python (local execution):
DEBUG=true python acepace.py --folder /path/to/videosIn Docker:
docker run --rm \
-v /path/to/OnePaceLibrary:/media:rw \
-v /path/to/config:/config:rw \
timothe/ace-pace:latestIn Docker Compose:
Add to your docker-compose.yml:
environment:
- DEBUG=trueWhen debug mode is enabled, you'll see additional information including:
- Episode fetching progress and page counts
- CRC32 normalization and comparison details
- Sample CRC32s from both Nyaa and local sources
- File processing statistics (cached vs calculated)
- Mapping issues and comparison mismatches
- Intersection and difference analysis
- Processing statistics for each operation
All debug output is prefixed with "DEBUG:" for easy filtering.
Note: Debug mode defaults to false (disabled). Set DEBUG to true, 1, yes, or on to enable. The value is case-insensitive.
Run the script using Python with the following command:
python acepace.py [-h] [--url URL] [--folder FOLDER] [--db] [--client {transmission,qbittorrent}] [--download] [--host HOST] [--port PORT] [--username USERNAME] [--password PASSWORD] [--download-folder DOWNLOAD_FOLDER] [--tag TAG]... [--category CATEGORY]
-
--folder <path>(required for most cases) Specify the path to your local One-Pace video library. Ace-Pace will scan this directory recursively to identify and analyze your existing episodes. -
--url <website_url>Define the Nyaa URL used for the query to get episodes metadata and download links. Defaults tohttps://nyaa.si/?f=0&c=0_0&q=one+pace&o=asc. Note: Quality filtering (1080p only) is always applied in code. -
--db(standalone flag) Create a CSV file with the existing local file paths and CRC32 checksums. Useful to check what's detected and debugging. -
--rename(standalone flag) Rename local files based on matching titles from One-Pace episodes index. Requires--folderto be specified. Optionally use--urlto specify a custom Nyaa.si search URL. -
--episodes_update(standalone flag) Update the episodes metadata database from Nyaa.si. Optionally use--urlto specify a custom Nyaa.si search URL. This command forces an update even if episodes were recently updated (within the last 10 minutes).
-
--client <client_name>Specify the BitTorrent client to use for downloading missing episodes. Supported clients:transmission,qbittorrent. -
--download(standalone flag) Enable downloading of missing episodes using the specified BitTorrent client. -
--host <host>The BitTorrent client host (default:localhost). -
--port <port>The BitTorrent client port. -
--username <username>The BitTorrent client username. -
--password <password>The BitTorrent client password. -
--download-folder <path>The folder to download the torrents to. -
--tag <tag>...Tag to add to the torrent in qBittorrent (can be used multiple times). -
--category <category>Category to add to the torrent in qBittorrent. -
--dry-run(standalone flag) With--download: test BitTorrent client without adding torrents. With--rename: show rename plan without renaming files.
python acepace.py --folder "/volume42/media/One Piece/" --url https://nyaa.si/?f=0&c=0_0&q=one+pace+1080p&o=asc
python acepace.py --folder "/volume42/media/One Piece/"
python acepace.py --client transmission --download
python acepace.py --client qbittorrent --download --host 192.168.1.100 --port 8080 --username myuser --password mypassword --download-folder /downloads/onepace --tag onepace --tag 'one pace' --category 'anime'
python acepace.py --client transmission --download --dry-run
python acepace.py --client qbittorrent --download --dry-run --host 192.168.1.100 --port 8080
python acepace.py --db
python acepace.py --folder "/volume42/media/One Piece/" --rename
python acepace.py --episodes_update --url https://nyaa.si/?f=0&c=0_0&q=one+pace+1080p&o=asc
-
Scanning: Ace-Pace begins by scanning your specified folder, computing CRC32 checksums for each video file to build an accurate inventory of your current collection and store it locally.
-
Missing Detection: It then queries the One-Pace website to retrieve the latest episode list and compares it against your local inventory using the stored checksums and metadata.
-
Reporting: A detailed report is generated, highlighting which episodes you already have, which are missing, and any discrepancies.
-
Optional Downloading: After that, Ace-Pace will propose to download any missing episodes directly on your BitTorrent client.
Ace-Pace is proudly inspired by and built to support the incredible work of the One-Pace team. Their dedication to crafting a seamless and engaging One Piece viewing experience has allowed me to discover and share this legendary series. I salute their passion, creativity, and commitment.
Since the start of this project, not unlinke Luffy, a few people joined me to build or support it, namely @Staubgeborener & @thekoma who implemented the multi-clients functionality. Check them out!