Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 129a948f02 | |||
| 34a99fdec0 | |||
| 15db01096f | |||
| 588fa17eb2 |
+2
-1
@@ -243,6 +243,7 @@ def play_clips(clips, ending_mode, mpv_options):
|
||||
with open(pipe_name, "wb", 0) as f_pipe:
|
||||
for clip_filename, clip_start, clip_end in clips:
|
||||
clip_filename = clip_filename.replace("\\","/")
|
||||
clip_filename = clip_filename.replace("\"", "\\\"")
|
||||
|
||||
cmd = ["loadfile", '"' + clip_filename + '"']
|
||||
if ending_mode:
|
||||
@@ -282,7 +283,7 @@ def main(media_dir, search_phrase, phrase_mode, phrases_gap, padding, limit, out
|
||||
|
||||
rg = shutil.which('rg')
|
||||
if rg:
|
||||
cmd = ["rg", "--no-heading", "--null-data", "-N", "-o", "-i", "-g", "*.txt", "-P", search_phrase_in_grep, media_dir]
|
||||
cmd = ["rg", "--sort-files", "--no-heading", "--null-data", "-N", "-o", "-i", "-g", "*.txt", "-P", search_phrase_in_grep, media_dir]
|
||||
else:
|
||||
cmd = ["grep", "-r", "-z", "-o", "-i", "--include", "*.txt", "-P", search_phrase_in_grep, media_dir]
|
||||
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, bufsize=-1)
|
||||
|
||||
Reference in New Issue
Block a user