fixing mktemp calls, with 6 'X' rather than 5.
This commit is contained in:
parent
fb510dc980
commit
7c637d1ac9
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
interactive_mode=0
|
||||
channel_file="/tmp/$(mktemp -u yt-channel_XXXXX)"
|
||||
channel_file="/tmp/$(mktemp -u yt-channel_XXXXXX)"
|
||||
|
||||
# I really need to work out a better way to take flags.
|
||||
# This is just awful.
|
||||
|
@ -82,7 +82,7 @@ function get_input() {
|
|||
row=0
|
||||
|
||||
# Now for displaying the search results
|
||||
temp_file="/tmp/$(mktemp -u yt-channel_XXXXX)"
|
||||
temp_file="/tmp/$(mktemp -u yt-channel_XXXXXX)"
|
||||
|
||||
grep "href=\"\/watch?v=" $channel_file | grep "title=" | grep -v \
|
||||
"<span class=\"yt-thumb-simple\"" > $temp_file
|
||||
|
|
|
@ -21,7 +21,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
video_file="/tmp/$(mktemp -u yt-video_XXXXX)"
|
||||
video_file="/tmp/$(mktemp -u yt-video_XXXXXX)"
|
||||
if type "wget" &> /dev/null
|
||||
then
|
||||
wget -q https://youtube.com/watch?v=$id -O $video_file
|
||||
|
|
|
@ -55,12 +55,12 @@ function get_input() {
|
|||
# layout, this script'll break immediately, haha.
|
||||
# ... But at least we aren't using their API, right?
|
||||
|
||||
search_file="/tmp/$(mktemp -u yt-search_XXXXX)"
|
||||
search_file="/tmp/$(mktemp -u yt-search_XXXXXX)"
|
||||
|
||||
st-download https://youtube.com/results?search_query=$query $search_file
|
||||
|
||||
# Now for displaying the search results
|
||||
temp_file="/tmp/$(mktemp -u yt-result_XXXXX)"
|
||||
temp_file="/tmp/$(mktemp -u yt-result_XXXXXX)"
|
||||
grep "<a href=\"\/watch?v=" $search_file | grep -v "<span class=\"yt-thumb-simple\"" > $temp_file
|
||||
item_num=0
|
||||
cat $temp_file | while IFS='' read -r CUR_LINE
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
# [ ] Cli args as commands
|
||||
|
||||
search() {
|
||||
output="$(mktemp /tmp/yt-XXXXXX)"
|
||||
output="$(mktemp -u /tmp/yt_XXXXXX)"
|
||||
yt-search -i "$1" "$output"
|
||||
selected_video="$(cat "$output")"
|
||||
yt-meta "$selected_video"
|
||||
}
|
||||
|
||||
channel() {
|
||||
output="$(mktemp -u /tmp/yt-channel-XXXXXXX)"
|
||||
output="$(mktemp -u /tmp/yt-channel_XXXXXX)"
|
||||
case "$1" in
|
||||
UC* )
|
||||
yt-channel -ic "$1" "$output"
|
||||
|
|
Reference in New Issue