File: comments

package info (click to toggle)
ytfzf 2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,872 kB
  • sloc: sh: 3,978; python: 135; makefile: 59; perl: 7
file content (30 lines) | stat: -rwxr-xr-x 628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

get_search_from_EXT_comments (){
    _search="${selected_url}"
}

set +f
instances=$(printf "%s\n" "${YTFZF_TEMP_DIR}"/*)
set -f

instance_count=$(echo "$instances" | wc -l)

if [ "$instance_count" -gt 1 ]; then
    printf "%s\n" "More than 1 ytfzf instance is running, please select one"
    echo "$instances" | sed 's/.*\///' | nl
    read -r num

    instance="$(echo "$instances" | sed -n "${num}p")"
else
    instance="$instances"
fi

read -r selected_url < "${instance}/ids"

[ -z "$selected_url" ] && {
    printf "%s\n" "This instance is not playing a video"
}

scrape="comments"
search_source="EXT_comments"