fix updating datetime and enforce list mode on sqlite3

This commit is contained in:
ksyasuda 2022-02-15 01:26:19 -08:00
parent 41c40bbd38
commit d2611e6e33

View File

@ -167,7 +167,7 @@ generate_span() {
#####################
run_stmt() {
printf "%s\n" "$1" | sqlite3 -noheader "$HISTORY_DB"
printf "%s\n" "$1" | sqlite3 -noheader -list "$HISTORY_DB"
}
# Return number of matches for anime/episode in db
@ -207,7 +207,7 @@ update_date() {
stmt=""
case "$1" in
directory)
stmt="UPDATE file_history SET watch_date = '$datetime' WHERE directory = '$2' and filename = '$3';"
stmt="UPDATE file_history SET watch_date = '$datetime' WHERE directory = '$2' and filename = 'DIRECTORY';"
;;
file)
stmt="UPDATE file_history SET watch_date = '$datetime' WHERE directory = '$2' and filename = '$3';"