Skip to content

Commit

Permalink
mpvc: Update mpvc
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt4 committed Jan 7, 2025
1 parent 05318e3 commit 03c7682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpvc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ mpvc_ytquery_json() {
result=$(mpvc_curl_cache_json "$filename")
;;
*) # otherwise, assume its a local file
result="{ \"title\":\"${filename##*/}\", }" # basenamed
result='{ "title":"'"${filename##*/}"'","request_id":0 }' # basenamed
;;
esac
printf "$result\n"
Expand All @@ -270,7 +270,7 @@ mpvc_ytquery() { mpvc_ytquery_field 'title' "$@"; }

mpvc_getjson() {
#awk '/'"$1"'/{ sub(".*'"$1"'\":\"?",""); sub("\"?,\".+\".*",""); sub(", }$", ""); print }'
while read -r l1; do l1=${l1##*'"'$1'":'}; l1=${l1%%'",'*}; l1=${l1##'"'}; l1=${l1%%'"'}; echo "$l1"; done
while read -r l1; do l1=${l1##*'"'$1'":'}; l1=${l1%%',"'*}; l1=${l1##'"'}; l1=${l1%%'"'}; echo "$l1"; done
}

mpvc_socklist() {
Expand Down

0 comments on commit 03c7682

Please sign in to comment.