Skip to content

Conversation

@oidro
Copy link

@oidro oidro commented May 2, 2025

This pull request adds a --replace argument to umpv, and replaces sys.argv with argparse.

If --replace is supplied, the first file passed to umpv will be sent to the mpv instance with the replace flag (all subsequent files will still use append-play).

Unless someone out there has files named --like-this, scripts using umpv should behave the same as with the previous version.

@github-actions
Copy link

github-actions bot commented May 3, 2025

@oidro oidro force-pushed the umpv-replace-argument branch from 256cb1e to 6cacf59 Compare May 8, 2025 18:27
files = (os.path.abspath(f) if not is_url(f) else f for f in sys.argv[1:])
parser = argparse.ArgumentParser()
parser.add_argument(
"--replace",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead --replace just allow string input with that would be inserted as a flag to insert? Would be more versatile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants