Well, compared to the previous script, this one is a short one. It’ll find all Matroska containers lacking a corresponding thumbnail (-thumb.jpg or .tbn) file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/opt/bin/bash

# Find all episodes/movies missing a thumb file

MKV="$( find . -name "*.mkv" | sed "s,./,," | sort )"

echo "These videos are missing a thumbnail file:"
echo ""
for mkv in $MKV; do
        basename="${mkv%.*}"

        # Check if there is a <xbmc11 thumbnail file
        if [ -f "$basename.tbn" ] ; then
                :
        elif [ -f "$basename-thumb.jpg" ] ; then
                :
        else
                echo "  - $basename.mkv"
        fi
done
echo