Add season folder to library layout
This commit is contained in:
@@ -20,7 +20,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.1.1"
|
||||
VERSION = "0.1.2"
|
||||
ALLANIME_BASE = "allanime.day"
|
||||
ALLANIME_API = f"https://api.{ALLANIME_BASE}"
|
||||
ALLANIME_REFERER = "https://allmanga.to"
|
||||
@@ -449,7 +449,8 @@ def normalize_season(value):
|
||||
|
||||
|
||||
def job_output_dir(job):
|
||||
return Path(job["download_dir"]).expanduser() / 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'}"
|
||||
|
||||
|
||||
def job_staging_dir(job):
|
||||
@@ -1194,7 +1195,8 @@ 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 target = job.target_dir || `${job.download_dir}/${libraryName}`;
|
||||
const seasonFolder = `Season ${job.season || "1"}`;
|
||||
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}`;
|
||||
const status = item.querySelector(".status");
|
||||
|
||||
Reference in New Issue
Block a user