Skip to content

Commit

Permalink
Improve launch script and remove usage of the deprecated library pipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuchulain committed Dec 28, 2023
1 parent 983a47a commit 4a4746b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions recode_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import json
import os
import pipes
from shlex import quote
import platform
import subprocess
import sys
Expand Down Expand Up @@ -207,7 +207,7 @@ def get_command(command, file_path):
if str(platform.system()) == 'Windows':
cmd = command.split(' ').append(file_path)
else:
cmd = [command + ' ' + pipes.quote(file_path)]
cmd = [command + ' ' + quote(file_path)]

return cmd

Expand Down
7 changes: 6 additions & 1 deletion recode_video.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
script_path=$(readlink -f "$0")
dir=$(dirname "$script_path")

"$dir/venv/bin/python3" "$dir/recode_video.py" "$@"
interpret="$dir/venv/bin/python3"
if [ ! -f "$interpret" ]; then
interpret="python3"
fi

"$interpret" "$dir/recode_video.py" "$@"

0 comments on commit 4a4746b

Please sign in to comment.