@@ -649,6 +649,9 @@ public async Task<bool> DownloadSinglePack(string url, RedumpSystem? system, str
649649
650650 // Make the call to get the pack
651651 string ? remoteFileName = await DownloadFile ( packUri , tempfile ) ;
652+ if ( remoteFileName == null )
653+ return false ;
654+
652655 MoveOrDelete ( tempfile , remoteFileName , outDir ! , subfolder ) ;
653656 return true ;
654657 }
@@ -785,27 +788,27 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
785788
786789 // CUE
787790 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /cue/\" ") )
788- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . CueExt , Path . Combine ( paddedIdDir , paddedId + " .cue") ) ;
791+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . CueExt , Path . Combine ( paddedIdDir , $ " { paddedId } .cue") ) ;
789792
790793 // Edit disc
791794 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /edit/\" ") )
792795 _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . EditExt , Path . Combine ( paddedIdDir , "edit.html" ) ) ;
793796
794797 // GDI
795798 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /gdi/\" ") )
796- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . GdiExt , Path . Combine ( paddedIdDir , paddedId + " .gdi") ) ;
799+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . GdiExt , Path . Combine ( paddedIdDir , $ " { paddedId } .gdi") ) ;
797800
798801 // KEYS
799802 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /key/\" ") )
800- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . KeyExt , Path . Combine ( paddedIdDir , paddedId + " .key") ) ;
803+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . KeyExt , Path . Combine ( paddedIdDir , $ " { paddedId } .key") ) ;
801804
802805 // LSD
803806 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /lsd/\" ") )
804- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . LsdExt , Path . Combine ( paddedIdDir , paddedId + " .lsd") ) ;
807+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . LsdExt , Path . Combine ( paddedIdDir , $ " { paddedId } .lsd") ) ;
805808
806809 // MD5
807810 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /md5/\" ") )
808- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . Md5Ext , Path . Combine ( paddedIdDir , paddedId + " .md5") ) ;
811+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . Md5Ext , Path . Combine ( paddedIdDir , $ " { paddedId } .md5") ) ;
809812
810813 // Review WIP entry
811814 if ( Constants . NewDiscRegex . IsMatch ( discPage ) )
@@ -816,15 +819,15 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
816819
817820 // SBI
818821 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sbi/\" ") )
819- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . SbiExt , Path . Combine ( paddedIdDir , paddedId + " .sbi") ) ;
822+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . SbiExt , Path . Combine ( paddedIdDir , $ " { paddedId } .sbi") ) ;
820823
821824 // SFV
822825 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sfv/\" ") )
823- await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . SfvExt , Path . Combine ( paddedIdDir , paddedId + " .sfv") ) ;
826+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . SfvExt , Path . Combine ( paddedIdDir , $ " { paddedId } .sfv") ) ;
824827
825828 // SHA1
826829 if ( discPage . Contains ( $ "<a href=\" /disc/{ id } /sha1/\" ") )
827- _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . Sha1Ext , Path . Combine ( paddedIdDir , paddedId + " .sha1") ) ;
830+ _ = await DownloadFile ( string . Format ( Constants . DiscPageUrl , + id ) + Constants . Sha1Ext , Path . Combine ( paddedIdDir , $ " { paddedId } .sha1") ) ;
828831
829832 // HTML (Last in case of errors)
830833 using ( var discStreamWriter = File . CreateText ( Path . Combine ( paddedIdDir , "disc.html" ) ) )
0 commit comments