mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
Compare commits
No commits in common. "d2611e6e337fcd1d109e8b5699a8b942f665f19b" and "90dec870e071d656350cc465708abe8c7addbfc7" have entirely different histories.
d2611e6e33
...
90dec870e0
4
ani-cli
4
ani-cli
@ -167,7 +167,7 @@ generate_span() {
|
|||||||
#####################
|
#####################
|
||||||
|
|
||||||
run_stmt() {
|
run_stmt() {
|
||||||
printf "%s\n" "$1" | sqlite3 -noheader -list "$HISTORY_DB"
|
printf "%s\n" "$1" | sqlite3 -noheader "$HISTORY_DB"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return number of matches for anime/episode in db
|
# Return number of matches for anime/episode in db
|
||||||
@ -207,7 +207,7 @@ update_date() {
|
|||||||
stmt=""
|
stmt=""
|
||||||
case "$1" in
|
case "$1" in
|
||||||
directory)
|
directory)
|
||||||
stmt="UPDATE file_history SET watch_date = '$datetime' WHERE directory = '$2' and filename = 'DIRECTORY';"
|
stmt="UPDATE file_history SET watch_date = '$datetime' WHERE directory = '$2' and filename = '$3';"
|
||||||
;;
|
;;
|
||||||
file)
|
file)
|
||||||
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 = '$3';"
|
||||||
|
11
aniwrapper
11
aniwrapper
@ -352,14 +352,9 @@ main() {
|
|||||||
lg "Play from file selected"
|
lg "Play from file selected"
|
||||||
IS_PLAY_FROM_FILE=1
|
IS_PLAY_FROM_FILE=1
|
||||||
span=$(printf '%s\n%s\n' "$(generate_span "Provide a valid path to a directory or leave blank to go with the default: $HOME/Videos/sauce/")" "$(generate_span "The program will begin searching for media files from the supplied directory")")
|
span=$(printf '%s\n%s\n' "$(generate_span "Provide a valid path to a directory or leave blank to go with the default: $HOME/Videos/sauce/")" "$(generate_span "The program will begin searching for media files from the supplied directory")")
|
||||||
play_dir=$(
|
play_dir=$(rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
|
||||||
rofi -dpi "$DPI" -dmenu -config "$CFG_FILE" \
|
-theme-str 'listview {columns: 1;} window {width: 45%;}' \
|
||||||
-l 12 -mesg "$span" -p "Enter path to starting directory:" \
|
-l 1 -mesg "$span" -p "Enter path to starting directory:")
|
||||||
-async-pre-read 24 < <(sqlite3 -noheader -list "$CFG_DIR/history.sqlite3" <<< "SELECT directory FROM file_history WHERE filename = 'DIRECTORY' ORDER BY WATCH_DATE DESC;")
|
|
||||||
)
|
|
||||||
# trim trailing whitespace
|
|
||||||
play_dir="${play_dir%% }"
|
|
||||||
lg "Play dir: $play_dir"
|
|
||||||
if [ -z "$play_dir" ]; then
|
if [ -z "$play_dir" ]; then
|
||||||
mkdir -p "$DEFAULT_DOWNLOAD" || seppuku "error creating default download directory"
|
mkdir -p "$DEFAULT_DOWNLOAD" || seppuku "error creating default download directory"
|
||||||
run -f"$DEFAULT_DOWNLOAD"
|
run -f"$DEFAULT_DOWNLOAD"
|
||||||
|
Loading…
Reference in New Issue
Block a user