Browse code

generalüberholte yt-dl-send-notify.sh

dewomser authored on18/03/2020 15:47:05
Showing1 changed files

... ...
@@ -3,16 +3,14 @@
3 3
 #This schows new Viedoclips. Script is tested with Kubuntu 19.10 and uses notify-send Popup-Window
4 4
 #dl_folder should be the same as in youtube-dl.sh
5 5
 #if you use the default,you need not edit this script.
6
-#If you want to be noticed regulary there is a line for your user crontab
6
+#If you want to be remembered regulary there is a line for your user crontab
7 7
 
8 8
 #0 *  * * *  XDG_RUNTIME_DIR=/run/user/$(id -u) /home/foo/bin/yt-dl-send-notify.sh
9 9
 
10 10
 dl_folder=~/Downloads/youtube-dl/
11 11
 f=$(find $dl_folder -mtime 0 -type f -regex '.*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\)')
12
+folder1="$(echo $dl_folder|sed "s/\//\\\\\//g")"
13
+sedarg="sed s/$folder1/\n/g"
14
+f=$(echo "$f"|$sedarg)
15
+notify-send "Neue Videos": "$f" --icon=video-x-generic
12 16
 
13
-## comment f1=$f and uncomment next 2 lines. Reason,these lines are not shellcheck compatible.
14
-#folder1=$(echo $dl_folder|sed "s/\//\\\\\//g")
15
-#f1=$(echo "$f"|sed "s/$folder1/\n/g")
16
-f1=$f
17
-
18
-notify-send "Neue Videos": "$f1" --icon=video-x-generic