Browse code

minor improvements, aria2 extern Download tested , script is shellchecked now

dewomser authored on22/05/2018 08:00:10
Showing1 changed files

... ...
@@ -11,7 +11,7 @@
11 11
 # Variables #
12 12
 #firefox manages bookmarks from database. 
13 13
 #save all your Youtube playlists in $favdir
14
-favdir="gestof"
14
+favdir="bestof"
15 15
 echo $favdir
16 16
 #Download folder
17 17
 dl_folder="/home/foo/Downloads/youtube-dl/"
... ...
@@ -20,6 +20,8 @@ echo  $dl_folder
20 20
 datum=$(date -d "1 day ago" '+%Y%m%d')
21 21
 # Videos per day in each playlist
22 22
 perday=4
23
+#if aria2 is installed example :--external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M"
24
+aria2=''
23 25
 
24 26
 # from Firefox bookmarks
25 27
 # switch to the default firefox folder with sqlite databases.
... ...
@@ -46,7 +48,7 @@ cd  $dl_folder || exit
46 48
 # let youtube-dl do the work  and download brandnew videos
47 49
 # 
48 50
 for i in "${dbarray[@]}"; do
49
-youtube-dl --external-downloader aria2c  --external-downloader-args "-j 8 -s 8 -x 8 -k 5M" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
51
+youtube-dl "$aria2" --dateafter "$datum" --playlist-end "$perday" --max-downloads "$perday" "$i"
50 52
 # echo $i
51 53
 done
52 54