Clean up output for vainfo and ffprobe

This commit is contained in:
Nick Mowen 2023-02-24 14:38:05 -07:00
parent 9621b4b9a1
commit a0b6fcb73c

View File

@ -56,7 +56,7 @@ export default function System() {
};
const onCopyFfprobe = async () => {
copy(JSON.stringify(state.ffprobe, null, 2));
copy(JSON.stringify(state.ffprobe, jsonCleaner, 2));
setState({ ...state, ffprobe: '', showFfprobe: false });
};
@ -75,7 +75,7 @@ export default function System() {
};
const onCopyVainfo = async () => {
copy(JSON.stringify(state.vainfo, null, 2));
copy(JSON.stringify(state.vainfo, jsonCleaner, 2));
setState({ ...state, vainfo: '', showVainfo: false });
};
@ -298,3 +298,7 @@ export default function System() {
</div>
);
}
function jsonCleaner(key, value) {
return value.replace(/[\\n]+/gi, '');
}