This commit is contained in:
2026-01-11 18:56:26 -08:00
parent e70db8d8a6
commit 6076ea307b
7 changed files with 773 additions and 1476 deletions

14
CLI.py
View File

@@ -3731,18 +3731,32 @@ class PipelineExecutor:
if emits:
try:
from cmdlet import _shared as sh
from SYS import models
# 1. Apply -path persistence (moves temp files to final destination)
emits = sh.apply_output_path_from_pipeobjects(
cmd_name=cmd_name,
args=list(stage_args),
emits=emits,
)
# 2. METADATA STICKINESS / PROPAGATION
# We normalize all emitted items and merge metadata/tags from the previous stage.
# This ensures info like track titles/lyrics survive downloads/conversions.
# See cmdlet._shared.propagate_metadata for the merge logic.
prev_items = piped_result
if not isinstance(prev_items, (list, tuple)):
prev_items = [prev_items] if prev_items else []
emits = sh.propagate_metadata(prev_items, emits)
try:
pipeline_ctx.emits = list(emits)
except Exception:
pass
except Exception:
pass
if emits:
# If the cmdlet already installed an overlay table (e.g. get-tag),
# don't overwrite it: set_last_result_items_only() would clear the