Browse code

notify: wenn keine neuen Daten, dann kein popup

dewomser authored on19/03/2020 13:37:32
Showing2 changed files

... ...
@@ -1,3 +1,3 @@
1
- 
1
+*~ 
2 2
 /output/*
3 3
 
... ...
@@ -9,8 +9,11 @@
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
+if [ -z "$f" ]
13
+then exit
14
+else
12 15
 folder1="$(echo $dl_folder|sed "s/\//\\\\\//g")"
13 16
 sedarg="sed s/$folder1/\n/g"
14 17
 f=$(echo "$f"|$sedarg)
15 18
 notify-send "Neue Videos": "$f" --icon=video-x-generic
16
-
19
+fi