File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,22 @@ downloadFile() {
4040        ARIA)
4141            FILENAME=$( basename " ${OUTPUT} " ) 
4242            DIR=$( dirname " ${OUTPUT} " ) 
43-             aria2c --max-connection-per-server=" $ARIA_NUM_CONN " " $FILENAME " " $DIR " " $URL " &&  return  0
43+             if  aria2c -c --max-connection-per-server=" $ARIA_NUM_CONN " " ${FILENAME} .aria2" " $DIR " " $URL " ;  then 
44+                 mv -f -- " ${OUTPUT} .aria2" " ${OUTPUT} " 
45+                 return  0
46+             fi 
4447            ;;
4548        CURL)
46-             curl -o " $OUTPUT " " $URL " &&  return  0
49+             if  curl -L -C - -o " ${OUTPUT} .curl" " $URL " ;  then 
50+                 mv -f -- " ${OUTPUT} .curl" " ${OUTPUT} " 
51+                 return  0
52+             fi 
4753            ;;
4854        WGET)
49-             wget -O " $OUTPUT " " $URL " &&  return  0
55+             if  wget -O " ${OUTPUT} .wget" " $URL " ;  then 
56+                 mv -f -- " ${OUTPUT} .wget" " ${OUTPUT} " 
57+                 return  0
58+             fi 
5059            ;;
5160        esac 
5261    done 
Original file line number Diff line number Diff line change @@ -40,13 +40,22 @@ downloadFile() {
4040        ARIA)
4141            FILENAME=$( basename " ${OUTPUT} " ) 
4242            DIR=$( dirname " ${OUTPUT} " ) 
43-             aria2c --max-connection-per-server=" $ARIA_NUM_CONN " " $FILENAME " " $DIR " " $URL " &&  return  0
43+             if  aria2c -c --max-connection-per-server=" $ARIA_NUM_CONN " " ${FILENAME} .aria2" " $DIR " " $URL " ;  then 
44+                 mv -f -- " ${OUTPUT} .aria2" " ${OUTPUT} " 
45+                 return  0
46+             fi 
4447            ;;
4548        CURL)
46-             curl -L -o " $OUTPUT " " $URL " &&  return  0
49+             if  curl -L -C - -o " ${OUTPUT} .curl" " $URL " ;  then 
50+                 mv -f -- " ${OUTPUT} .curl" " ${OUTPUT} " 
51+                 return  0
52+             fi 
4753            ;;
4854        WGET)
49-             wget -O " $OUTPUT " " $URL " &&  return  0
55+             if  wget -O " ${OUTPUT} .wget" " $URL " ;  then 
56+                 mv -f -- " ${OUTPUT} .wget" " ${OUTPUT} " 
57+                 return  0
58+             fi 
5059            ;;
5160        esac 
5261    done 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments