File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/modules/webtoon/webtoon Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,17 @@ export class DownloadManagerService{
9797 if ( ! this . downloadQueue . getCurrentDownload ( ) ) // If current download is cleared, stop downloading
9898 break ;
9999 this . downloadGatewayService . onDownloadProgress ( i / epList . length * 100 ) ;
100- const epImageLinks : string [ ] = await this . webtoonParserService . getEpisodeLinks ( this . downloadQueue . getCurrentDownload ( ) , epList [ i ] ) ;
100+ let epImageLinks : string [ ] ;
101+ let error = false ;
102+ while ( ! error ) {
103+ try {
104+ epImageLinks = await this . webtoonParserService . getEpisodeLinks ( this . downloadQueue . getCurrentDownload ( ) , epList [ i ] ) ;
105+ error = false ;
106+ } catch ( _ : any ) {
107+ this . logger . warn ( `Error fetching episode ${ epList [ i ] . number } of ${ this . downloadQueue . getCurrentDownload ( ) . title } . Retrying...` ) ;
108+ error = true ;
109+ }
110+ }
101111 let downloaded = false ;
102112 let episodeData : EpisodeDataModel ;
103113 while ( ! downloaded ) {
You can’t perform that action at this time.
0 commit comments