Compare commits
5 commits
3e76fc49b0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f600541ab | - | |
|
|
4748def178 | - | |
|
|
c6a2961ba3 | - | |
|
|
262e6916a9 | ||
|
|
9599a76490 |
2 changed files with 5 additions and 3 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
archives/
|
||||
previews/
|
||||
|
|
@ -8,8 +8,8 @@ check_dependencies() {
|
|||
if ! mkdir -p "$preview_dir"; then
|
||||
echo "ERROR: Unable to create preview directory"
|
||||
exit 1
|
||||
elif ! command -v ffmpeg 2>&1 >/dev/null; then
|
||||
echo "ERROR: FFmpeg must be installed"
|
||||
elif ! command -v ffmpeg xargs 2>&1 >/dev/null; then
|
||||
echo "ERROR: FFmpeg and xargs must be installed"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ check_input() {
|
|||
|
||||
# Search for videos recursively using the MIME type
|
||||
find_videos() {
|
||||
video_list=$(find "${search_dir}" -type f -exec file -i {} \; | grep -oP '.*(?=: video/)')
|
||||
video_list=$(find ${search_dir} -type f -print0 | xargs -0 file -i | grep -oP '.*(?=:\s+video/)')
|
||||
|
||||
echo "${video_list}" >&2
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue