tags scanning progress
This commit is contained in:
parent
0ad3fbac61
commit
bed67cc8f6
17
atom
17
atom
@ -586,6 +586,7 @@ getFiles() {
|
|||||||
)
|
)
|
||||||
echo 'COMMIT;' >&3
|
echo 'COMMIT;' >&3
|
||||||
echo -e "\r$count files found, ${new:=0} new or changed."
|
echo -e "\r$count files found, ${new:=0} new or changed."
|
||||||
|
unset count
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMimes() {
|
updateMimes() {
|
||||||
@ -760,6 +761,19 @@ updateMimes
|
|||||||
removeObsoleteFiles
|
removeObsoleteFiles
|
||||||
|
|
||||||
# get files
|
# get files
|
||||||
|
echo '
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM source_files,
|
||||||
|
destinations,
|
||||||
|
destination_files,
|
||||||
|
mime_type_actions
|
||||||
|
WHERE destination_files.last_change < source_files.last_change
|
||||||
|
AND destinations.id = destination_files.destination_id
|
||||||
|
AND mime_type_actions.destination_id = destinations.id
|
||||||
|
AND mime_type_actions.id = source_files.mime_type
|
||||||
|
AND source_files.id = destination_files.source_file_id
|
||||||
|
AND mime_type_actions.action = 1;' >&3
|
||||||
|
read -u4 filecount
|
||||||
echo '
|
echo '
|
||||||
SELECT
|
SELECT
|
||||||
destinations.name,
|
destinations.name,
|
||||||
@ -781,16 +795,19 @@ while read -u4 line
|
|||||||
do
|
do
|
||||||
if [[ $line = AtOM:NoMoreFiles ]]
|
if [[ $line = AtOM:NoMoreFiles ]]
|
||||||
then
|
then
|
||||||
|
echo -e "\r$count files to create or update."
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
destination=${line%%|*}
|
destination=${line%%|*}
|
||||||
rest=${line#*|}
|
rest=${line#*|}
|
||||||
mimetype=${rest%%|*}
|
mimetype=${rest%%|*}
|
||||||
filename=${rest#*|}
|
filename=${rest#*|}
|
||||||
|
echo -en "\rTags: $((++count*100/filecount))%"
|
||||||
getTags
|
getTags
|
||||||
#createTask
|
#createTask
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
unset count
|
||||||
closeDatabase
|
closeDatabase
|
||||||
|
|
||||||
# vim:set ts=8 sw=8:
|
# vim:set ts=8 sw=8:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user