Skip to content

Commit

Permalink
fix(ytdl-mpv): sed double quotes with single quotes (#10)
Browse files Browse the repository at this point in the history
inside `_cacheQuery` function

Fix issue #9

[skip ci]
  • Loading branch information
andros21 authored May 3, 2022
1 parent f320e17 commit a55ca50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/ytdl-mpv
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ _cacheQuery() {
query="$1"
# create main table and cache items
sqlite3 "${DB}" "create table if not exists main (query str, id str, title str)"
sed "s/;//g" "$CACHEDIR/$query" | sed -E "N;s/(.*)\n(.*)/${query};\2;\1/" \
| sqlite3 -separator ';' "${DB}" ".import /dev/stdin main" 2> /dev/null
sed "s/;//g" "$CACHEDIR/$query" | sed "s/\"/\'/g" | sed -E "N;s/(.*)\n(.*)/${query};\2;\1/" \
| sqlite3 -separator ';' "${DB}" ".import /dev/stdin main"
}

# Delete a cached query inside main table
Expand Down

0 comments on commit a55ca50

Please sign in to comment.