Pad season folders
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.2.1 - 2026-05-11
|
||||||
|
|
||||||
|
- Padded season folder numbers to two digits, such as `Season 01` and `Season 02`.
|
||||||
|
|
||||||
## 0.2.0 - 2026-05-11
|
## 0.2.0 - 2026-05-11
|
||||||
|
|
||||||
- Replaced JSON queue storage with SQLite-backed queue persistence.
|
- Replaced JSON queue storage with SQLite-backed queue persistence.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
A small local web UI for a system-wide `ani-cli` install.
|
A small local web UI for a system-wide `ani-cli` install.
|
||||||
|
|
||||||
Current version: `0.2.0`
|
Current version: `0.2.1`
|
||||||
|
|
||||||
## Project Layout
|
## Project Layout
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ The queue is stored in SQLite, shown 10 jobs at a time, and includes bulk action
|
|||||||
Downloads are staged in the web app state directory first. After `ani-cli` finishes, the wrapper moves them into a Plex/Jellyfin-friendly layout:
|
Downloads are staged in the web app state directory first. After `ani-cli` finishes, the wrapper moves them into a Plex/Jellyfin-friendly layout:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
ANI_CLI_DOWNLOAD_DIR/anime_name/Season <season>/anime_name - S01E01.mp4
|
ANI_CLI_DOWNLOAD_DIR/anime_name/Season 01/anime_name - S01E01.mp4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ from uuid import uuid4
|
|||||||
PROJECT_ROOT = Path(__file__).resolve().parent
|
PROJECT_ROOT = Path(__file__).resolve().parent
|
||||||
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
|
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
|
||||||
APP_NAME = "ani-cli-web"
|
APP_NAME = "ani-cli-web"
|
||||||
VERSION = "0.2.0"
|
VERSION = "0.2.1"
|
||||||
ALLANIME_BASE = "allanime.day"
|
ALLANIME_BASE = "allanime.day"
|
||||||
ALLANIME_API = f"https://api.{ALLANIME_BASE}"
|
ALLANIME_API = f"https://api.{ALLANIME_BASE}"
|
||||||
ALLANIME_REFERER = "https://allmanga.to"
|
ALLANIME_REFERER = "https://allmanga.to"
|
||||||
@@ -547,7 +547,7 @@ def normalize_season(value):
|
|||||||
|
|
||||||
def job_output_dir(job):
|
def job_output_dir(job):
|
||||||
anime_name = sanitize_path_component(job.get("anime_name") or job.get("title"))
|
anime_name = sanitize_path_component(job.get("anime_name") or job.get("title"))
|
||||||
return Path(job["download_dir"]).expanduser() / anime_name / f"Season {job.get('season') or '1'}"
|
return Path(job["download_dir"]).expanduser() / anime_name / f"Season {season_label(job)}"
|
||||||
|
|
||||||
|
|
||||||
def job_staging_dir(job):
|
def job_staging_dir(job):
|
||||||
@@ -1309,7 +1309,7 @@ INDEX_HTML = r"""<!doctype html>
|
|||||||
item.querySelector(".job-title").textContent = job.title;
|
item.querySelector(".job-title").textContent = job.title;
|
||||||
const libraryName = job.anime_name || job.title;
|
const libraryName = job.anime_name || job.title;
|
||||||
const season = String(job.season || "1").padStart(2, "0");
|
const season = String(job.season || "1").padStart(2, "0");
|
||||||
const seasonFolder = `Season ${job.season || "1"}`;
|
const seasonFolder = `Season ${season}`;
|
||||||
const target = job.target_dir || `${job.download_dir}/${libraryName}/${seasonFolder}`;
|
const target = job.target_dir || `${job.download_dir}/${libraryName}/${seasonFolder}`;
|
||||||
item.querySelector(".job-head .muted").textContent =
|
item.querySelector(".job-head .muted").textContent =
|
||||||
`${libraryName} · S${season} · ${job.mode} · ${job.quality} · episodes ${job.episodes} · ${target}`;
|
`${libraryName} · S${season} · ${job.mode} · ${job.quality} · episodes ${job.episodes} · ${target}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user