mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2026-02-28 20:00:36 +05:30
Added another dependency
This commit is contained in:
4
download
4
download
@@ -73,6 +73,7 @@ send_matrix_msg() {
|
|||||||
#main
|
#main
|
||||||
link="$1"
|
link="$1"
|
||||||
yt_dlp_logs="${TMPDIR:-/tmp}/${0##*/}-logs"
|
yt_dlp_logs="${TMPDIR:-/tmp}/${0##*/}-logs"
|
||||||
|
process_file="${TMPDIR:-/tmp}/processed.mp4"
|
||||||
|
|
||||||
case $(uname -o) in
|
case $(uname -o) in
|
||||||
*ndroid*)
|
*ndroid*)
|
||||||
@@ -96,7 +97,6 @@ truncate -s0 "$yt_dlp_logs" # truncate file if exists, creates if doesn't exists
|
|||||||
yt-dlp -S "filesize:10M" -t mp4 "$link" -o "$download_dir/%(title)s.%(ext)s" | tee "$yt_dlp_logs"
|
yt-dlp -S "filesize:10M" -t mp4 "$link" -o "$download_dir/%(title)s.%(ext)s" | tee "$yt_dlp_logs"
|
||||||
|
|
||||||
filepath=$(sed -nE "s|.*($download_dir.*\.mp4).*|\1|p" "$yt_dlp_logs" | head -1)
|
filepath=$(sed -nE "s|.*($download_dir.*\.mp4).*|\1|p" "$yt_dlp_logs" | head -1)
|
||||||
process_file="${TMPDIR:-/tmp}/processed.mp4"
|
|
||||||
|
|
||||||
#shellcheck disable=SC1091
|
#shellcheck disable=SC1091
|
||||||
. "$HOME"/.config/.env
|
. "$HOME"/.config/.env
|
||||||
@@ -114,5 +114,5 @@ matrix_creds "unload"
|
|||||||
|
|
||||||
notify_$os "Video Sent to Matrix"
|
notify_$os "Video Sent to Matrix"
|
||||||
|
|
||||||
rm -f "$filepath" "$process_file"
|
rm -f "$filepath" "$process_file" "$yt_dlp_logs"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user