quietvoid / dovi_tool

dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.
MIT License
620 stars 59 forks source link

Invalid value error when trying to export data #284

Closed Dendraspis closed 7 months ago

Dendraspis commented 7 months ago

Hello,

when the --data parameter gets a path name, that includes a comma, you get a error: invalid value for '--data <data>' message. This becomes a huge issue, when you try to pass the full path, for example because you call dovi_tool from a script or so:

dovi_tool.exe export --data "level5=MetaL5.json" --input Meta.bin ✔️ dovi_tool.exe export --data "level5=Meta, only L5.json" --input Meta.bindovi_tool.exe export --data "level5=A.\Path\To\MetaL5.json" --input "A.\Path\To\Meta.bin ✔️ dovi_tool.exe export --data "level5=A.\Glorious, Path\To\MetaL5.json" --input "A.\Glorious, Path\To\Meta.bin

Could be related to the usage of , as separator between keys.

quietvoid commented 7 months ago

I don't think there's anything I can do about it. It's handled by clap's parser and it doesn't seem to support escaping inside values.

The easiest solution is to avoid using commas in paths. Otherwise it wouldn't be possible to use --data level5,scenes if the delimiter was removed/changed.