X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Fbin%2Fvideo_catalog_update;fp=home%2Fbin%2Fvideo_catalog_update;h=8a1acc348aca024924100391f7824ec9bdbde44a;hb=f7352c489dce80fbc3a1ae532b205726098f8ab4;hp=0000000000000000000000000000000000000000;hpb=5fd6cb5cf3cd50337b55b5c78dc8b64e13f0e625;p=khome.git diff --git a/home/bin/video_catalog_update b/home/bin/video_catalog_update new file mode 100755 index 0000000..8a1acc3 --- /dev/null +++ b/home/bin/video_catalog_update @@ -0,0 +1,14 @@ +#! /bin/sh + +set -e + +find "$DIR_VIDEO" \ + -type f \ + -print0 \ +| xargs \ + -0 \ + -P "$(nproc)" \ + -I{} \ + sh -c 'printf "%s %s\n" $(mimetype -b "{}") "{}"' \ +| awk '/^video/ {sub($1 " +", ""); print}' \ +> "$FILE_VIDEO_CATALOG"