feat(dl): add --repack flag to insert REPACK tag in output filenames

This commit is contained in:
Andy
2026-02-22 11:42:35 -07:00
parent 8a4399665e
commit 8b63be4f3e
4 changed files with 14 additions and 0 deletions

View File

@@ -406,6 +406,7 @@ class dl:
@click.option( @click.option(
"--tag", type=str, default=None, help="Set the Group Tag to be used, overriding the one in config if any." "--tag", type=str, default=None, help="Set the Group Tag to be used, overriding the one in config if any."
) )
@click.option("--repack", is_flag=True, default=False, help="Add REPACK tag to the output filename.")
@click.option( @click.option(
"--tmdb", "--tmdb",
"tmdb_id", "tmdb_id",
@@ -508,6 +509,7 @@ class dl:
no_proxy: bool, no_proxy: bool,
profile: Optional[str] = None, profile: Optional[str] = None,
proxy: Optional[str] = None, proxy: Optional[str] = None,
repack: bool = False,
tag: Optional[str] = None, tag: Optional[str] = None,
tmdb_id: Optional[int] = None, tmdb_id: Optional[int] = None,
tmdb_name: bool = False, tmdb_name: bool = False,
@@ -897,6 +899,9 @@ class dl:
config=self.service_config, cdm=self.cdm, proxy_providers=self.proxy_providers, profile=self.profile config=self.service_config, cdm=self.cdm, proxy_providers=self.proxy_providers, profile=self.profile
) )
if repack:
config.repack = True
if tag: if tag:
config.tag = tag config.tag = tag

View File

@@ -156,6 +156,9 @@ class Episode(Title):
name=self.name or "", name=self.name or "",
).strip() ).strip()
if getattr(config, "repack", False):
name += " REPACK"
if primary_video_track: if primary_video_track:
resolution_token = _get_resolution_token(primary_video_track) resolution_token = _get_resolution_token(primary_video_track)
if resolution_token: if resolution_token:

View File

@@ -91,6 +91,9 @@ class Movie(Title):
# Name (Year) # Name (Year)
name = str(self).replace("$", "S") # e.g., Arli$$ name = str(self).replace("$", "S") # e.g., Arli$$
if getattr(config, "repack", False):
name += " REPACK"
if primary_video_track: if primary_video_track:
resolution_token = _get_resolution_token(primary_video_track) resolution_token = _get_resolution_token(primary_video_track)
if resolution_token: if resolution_token:

View File

@@ -100,6 +100,9 @@ class Song(Title):
# NN. Song Name # NN. Song Name
name = str(self).split(" / ")[1] name = str(self).split(" / ")[1]
if getattr(config, "repack", False):
name += " REPACK"
# Service (use track source if available) # Service (use track source if available)
if show_service: if show_service:
source_name = None source_name = None