wip on android
This commit is contained in:
parent
32df13b2dd
commit
a6abdc45ea
@ -147,9 +147,23 @@ function file_size() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function file_add() {
|
function file_add() {
|
||||||
echo "dumy func file_add [rel. path]
|
echo 2DO
|
||||||
#chek if path still esist chek usw...
|
local relrevpath="$(echo $1 | sed 's|^/||g' | sed 's|/$||g' | rev | sed "s/'/''/g")" #last statement set ' as '' so it wont have an evect in the sql statement
|
||||||
#chek if size ->md5 exist -> not new MV !!!
|
local name="$(echo $relrevpath | cut -d '/' -f 1 | rev)"
|
||||||
|
local folder="$(echo $relrevpath | cut -d '/' -f 2- | rev)"
|
||||||
|
local FILE="$moviedir/$(echo $relrevpath | rev)"
|
||||||
|
[ -f "$FILE" ] || return 1 #errer file not exist
|
||||||
|
local MD5_new=$(md5sum "$FILE" | cut -c -32)
|
||||||
|
local SIZE_new="$(file_size "$FILE")"
|
||||||
|
|
||||||
|
#db path exist && md5 same -> update this entry
|
||||||
|
#db path exist && ttsync=exist/backup && md5 !same -> ttsync=del + new db entry
|
||||||
|
#or new db entry
|
||||||
|
|
||||||
|
#db entry is{
|
||||||
|
# chek if size ->md5 exist -> update path&name (MV)
|
||||||
|
# else complete new entry
|
||||||
|
#}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user