toys/missingtags: skip text and image files

This commit is contained in:
Vincent Riquer 2013-05-02 03:40:24 +02:00
parent 1fa431cc5f
commit 9c2f765f5c

View File

@ -99,10 +99,10 @@ for check in ${!checks[@]}
do do
case $check in case $check in
tracktotal) tracktotal)
whereclause+="${whereclause+ OR }NOT tags.track LIKE \"%/%\"" whereclause+="${whereclause+OR }NOT tags.track LIKE \"%/%\""
;; ;;
*) *)
whereclause+="${whereclause+ OR }tags.$check IS NULL" whereclause+="${whereclause+OR }tags.$check IS NULL"
;; ;;
esac esac
whereclause+=' whereclause+='
@ -124,8 +124,15 @@ cat >&3 <<-EOSelect
FROM tags FROM tags
INNER JOIN source_files INNER JOIN source_files
ON tags.source_file=source_files.id ON tags.source_file=source_files.id
WHERE $whereclause INNER JOIN mime_types
AND NOT tags.tagreader LIKE "unknown-%"; ON source_files.mime_type=mime_types.id
WHERE (
$whereclause
)
AND NOT tags.tagreader LIKE "unknown-%"
AND NOT mime_types.mime_text LIKE "text/%"
AND NOT mime_types.mime_text LIKE "image/%"
;
SELECT "AtOM:NoMoreFiles"; SELECT "AtOM:NoMoreFiles";
EOSelect EOSelect