mkvdts2ac3 icon indicating copy to clipboard operation
mkvdts2ac3 copied to clipboard

Show the actual values of gathered data when testing/debugging

Open LukasKnuth opened this issue 12 years ago • 4 comments

Currently, when using --test or --debug, we don't see the actual values of the "Gathering data"-section, but only debugging things:

RESULT:DTSLANG=DTSLANG

I think it makes more sense to execute the "Gathering Data"-section (and only it) as you normally would and print the actual values.

Collecting information doesn't change the source-file.

LukasKnuth avatar Jan 28 '13 18:01 LukasKnuth

Yeah, I see a bug where someone misplaced the quotes: DTSLANG=$"DTSLANG" #Value for debugging should be: DTSLANG="$DTSLANG" #Value for debugging

The intention is to show the value of DTSLANG as you wish and one would expect. Merely a typo that can be fixed easily to return this to normal working order.

choekstr avatar Jan 28 '13 19:01 choekstr

It seems you're wrong:

DTSLANG="$DTSLANG" #Value for debugging
dopause
if [ $EXECUTE = 1 ]; then
    DTSLANG=$(echo "$INFO" | grep -m 1 "Language" | cut -d " " -f 5)
    if [ -z "$DTSLANG" ]; then
        DTSLANG=$"eng"
    fi
fi
doprint "RESULT:DTSLANG=$DTSLANG"

The real population of the $DTSLANG is never done when --test is used, because $EXECUTE is set to 0 in this case.

LukasKnuth avatar Jan 28 '13 19:01 LukasKnuth

The population of $DTSTRACK, $VALID, $INFO, $DTSLANG, $DTSNAME & $DELAY is only done when --debug is used, because $EXECUTE is set to 1 in this case.

LukasKnuth is suggesting to execute the "GATHER DATA"-section (and only it) when $PRINT is set to 1. The population of $DTSTRACK, $VALID, $INFO, $DTSLANG & $DTSNAME will then be done when --test or --debug is used.

1951FDG avatar Jan 28 '13 23:01 1951FDG

Opened pull request (https://github.com/JakeWharton/mkvdts2ac3/pull/87)

1951FDG avatar Jan 29 '13 00:01 1951FDG