File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " queueget" ,
3- "version" : " 0.5.15 " ,
3+ "version" : " 0.5.16 " ,
44 "description" : " Download links from a queue file" ,
55 "bin" : {
66 "qget" : " ./bin/cli.js" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const newFilestack = (filepath) => {
1919 const unflush = async ( ) => {
2020 try {
2121 const data = ( await readFile ( filepath ) ) . toString ( )
22- return data . split ( "\n" ) . map ( ( line ) => line . trim ( ) )
22+ return data . length === 0 ? [ ] : data . split ( "\n" ) . map ( ( line ) => line . trim ( ) )
2323 } catch ( err ) {
2424 if ( err . code !== "ENOENT" ) {
2525 throw err
Original file line number Diff line number Diff line change @@ -114,7 +114,8 @@ const commonload = async ({
114114 contentLoaded += chunk . length
115115
116116 // Console update
117- if ( ( contentLoaded / contentLength ) * MAX_DOTS > dots ) {
117+ const contentLoadedDots = ( contentLoaded / contentLength ) * MAX_DOTS
118+ while ( contentLoadedDots > dots ) {
118119 dots ++
119120 process . stdout . write ( "." )
120121 }
You can’t perform that action at this time.
0 commit comments