Pad season folders

This commit is contained in:
Dymas
2026-05-11 13:03:28 +02:00
parent 6260138286
commit 5f0c8c81b1
4 changed files with 10 additions and 6 deletions
+4
View File
@@ -1,5 +1,9 @@
# 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
- Replaced JSON queue storage with SQLite-backed queue persistence.
+2 -2
View File
@@ -2,7 +2,7 @@
A small local web UI for a system-wide `ani-cli` install.
Current version: `0.2.0`
Current version: `0.2.1`
## 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:
```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
+1 -1
View File
@@ -1 +1 @@
0.2.0
0.2.1
+3 -3
View File
@@ -21,7 +21,7 @@ from uuid import uuid4
PROJECT_ROOT = Path(__file__).resolve().parent
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
APP_NAME = "ani-cli-web"
VERSION = "0.2.0"
VERSION = "0.2.1"
ALLANIME_BASE = "allanime.day"
ALLANIME_API = f"https://api.{ALLANIME_BASE}"
ALLANIME_REFERER = "https://allmanga.to"
@@ -547,7 +547,7 @@ def normalize_season(value):
def job_output_dir(job):
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):
@@ -1309,7 +1309,7 @@ INDEX_HTML = r"""<!doctype html>
item.querySelector(".job-title").textContent = job.title;
const libraryName = job.anime_name || job.title;
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}`;
item.querySelector(".job-head .muted").textContent =
`${libraryName} · S${season} · ${job.mode} · ${job.quality} · episodes ${job.episodes} · ${target}`;