WIP ... 2
This commit is contained in:
parent
2dc2ba05cd
commit
63c8da0e8f
@ -58,6 +58,11 @@ function main() {
|
|||||||
#cd to moviedir
|
#cd to moviedir
|
||||||
cd "$moviedir"
|
cd "$moviedir"
|
||||||
|
|
||||||
|
#clean DB from old stuff
|
||||||
|
{
|
||||||
|
db_query "DELETE From File WHERE Size=0;"
|
||||||
|
}
|
||||||
|
|
||||||
#erselle zwei dateilisten
|
#erselle zwei dateilisten
|
||||||
list_tmp=$(mktemp -d)
|
list_tmp=$(mktemp -d)
|
||||||
db_query "SELECT CONCAT('$moviedir/', Folder, '/', Name) FROM File WHERE TTSync=$TTSYNC_EXIST OR TTSync=$TTSYNC_BACKUP;" > "$list_tmp/indb"
|
db_query "SELECT CONCAT('$moviedir/', Folder, '/', Name) FROM File WHERE TTSync=$TTSYNC_EXIST OR TTSync=$TTSYNC_BACKUP;" > "$list_tmp/indb"
|
||||||
@ -67,7 +72,15 @@ function main() {
|
|||||||
grep -vf "$list_tmp/indb" "$list_tmp/exist" > "$list_tmp/new"
|
grep -vf "$list_tmp/indb" "$list_tmp/exist" > "$list_tmp/new"
|
||||||
|
|
||||||
#all IDs wich an old check date:
|
#all IDs wich an old check date:
|
||||||
#db_query "SELECT ID FROM File Where TTCheck < '$DATE' OR TTCheck IS NULL;"
|
db_query "SELECT ID FROM File Where TTCheck < '$DATE' OR TTCheck IS NULL;" | while read line; do
|
||||||
|
#for each ID with an old check date ...
|
||||||
|
ID=$line
|
||||||
|
TTSync=$(db_query "SELECT TTSync FROM File WHERE ID=$ID;")
|
||||||
|
|
||||||
|
|
||||||
|
SIZE=$(db_query "SELECT Size FROM File WHERE ID=$ID;")
|
||||||
|
MD5=$(db_query "SELECT MD5 FROM File WHERE ID=$ID;")
|
||||||
|
done
|
||||||
|
|
||||||
## dateiliste erstellen die mit DB abgeglichen wird
|
## dateiliste erstellen die mit DB abgeglichen wird
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user