Skip to content

feature request: exit status codes #229

Description

@brnco

I'd like to be able to evaluate the execution of the MediaConch CLI through the use of exit status codes. Using return codes would simplify Bash implementations of the MediaConch CLI by allowing the execution of MediaConch to be part of a conditional statement directly, e.g. if mediaconch -p policy.xml file.mkv; then...

Currently, MediaConch returns the same code, 0, for pass, fail, and error. To evaluate the pass/ fail/ error status of the execution, we have to parse the output text.

I think the following exit codes would suit my needs just fine:
0 = file passes validation
1 = file fails validation
2 = error in execution of MediaConch

You all are the best, thank you!

Activity

  1. JeromeMartinez commented on Jun 4, 2022

    @JeromeMartinez
    Member

    Currently, MediaConch returns the same code, 0, for pass, fail, and error.

    No more since MediaArea/MediaConch_SourceCode#717 but globally true.
    At the beginning we were thinking to use status code only for feedback of error in execution of MediaConch, but having an error code also for failures makes also sense.

  2. jens-st commented on Oct 23, 2023

    @jens-st

    I ran into this issue as well on automated archiving processes with file validation tasks.
    I'd like to request this feature too.
    Maybe not by default but would it be possible to add a pure optional argument for the CLI version that can reflect the validation status of the checked file in any way in the return code?

  3. JeromeMartinez commented on Oct 23, 2023

    @JeromeMartinez
    Member

    @jens-st something doable, and right it may be better that it is an option in order to avoid incompatibility with previous version, or an option for previous behavior.

    Still on our free support todo-list, no ETA.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions