Closed slew06 closed 2 years ago
I'm hitting this issue as well. Working fine for single clips but batch of clips by folder not working as expected?
Ok i've never scripted in Python but had to take a look because this thing is too awesome. Looks like videogrep.py's get_subtitle_files method wasn't set up to parse folders for SRT files at all, just error if passed a folder, even tho the documentation said its supported?
I found silence.py had a shallow folder check so I referenced that and created a more powerful recursive folder check for vieogrep.py's get_subtitle_files method. It's working great for me so I'll create a pull request.
Pull request created: #49 #
thank you fishmonger! works like a charm
Hello,
This may be a super silly question. Videogrep works fine when the path points to a file but not a whole folder of clips/.srts.
videogrep --input /Users/test/Documents/python\ scripts/donaldtrump/ --search 'have' --search-type word [!] No subtitle files were found. Traceback (most recent call last): File "/usr/local/bin/videogrep", line 5, in
videogrep.main()
File "/usr/local/lib/python2.7/site-packages/videogrep/videogrep.py", line 339, in main
videogrep(args.inputfile, args.outputfile, args.search, args.searchtype, args.maxclips, args.padding, args.demo, args.randomize, args.sync, args.use_transcript)
File "/usr/local/lib/python2.7/site-packages/videogrep/videogrep.py", line 281, in videogrep
composition = compose_from_srts(srts, search, searchtype, padding=padding, sync=sync)
File "/usr/local/lib/python2.7/site-packages/videogrep/videogrep.py", line 178, in compose_from_srts
for srt in srts:
TypeError: 'bool' object is not iterable
Am I missing something? I've tried with and without the backslash after the folder name.
Thanks!