Fix #29: validate --container against known containers #30
@@ -32,6 +32,7 @@ from .defaults import (
|
||||
DEFAULT_SKIP_EXISTING,
|
||||
DEFAULT_DELETE_ORIGINAL,
|
||||
)
|
||||
from .constants import CONTAINER_NAMES
|
||||
from .core import split_audio
|
||||
from .tracklist import read_tracklist, parse_format
|
||||
from .ffmpeg import has_cover_or_video, validate_cover_images
|
||||
@@ -196,6 +197,12 @@ def main():
|
||||
print(f"Error: Tracklist file not found: {args.tracklist_file}")
|
||||
sys.exit(1)
|
||||
|
||||
# Validate container if provided
|
||||
if args.container and args.container not in CONTAINER_NAMES:
|
||||
print(f"Error: Invalid container '{args.container}'. "
|
||||
f"Valid containers: {', '.join(sorted(CONTAINER_NAMES))}.")
|
||||
sys.exit(1)
|
||||
|
||||
# Check FFmpeg
|
||||
try:
|
||||
subprocess.run(['ffmpeg', '-version'], capture_output=True, check=True)
|
||||
|
||||
Reference in New Issue
Block a user