@@ -204,11 +204,11 @@ func (c Slskd) searchStatus(ID, trackDetails string, count int) (bool, error) {
204204 } else if queryResult .IsComplete && (queryResult .FileCount == 0 || queryResult .FileCount == queryResult .LockedFileCount ) {
205205 return false , fmt .Errorf ("search complete, did not find any available files for %s" , trackDetails )
206206 } else if count >= c .Cfg .Retry {
207- debug .Debug (fmt .Sprintf ("search not completed for ID: %s" , ID ))
207+ slog .Debug (fmt .Sprintf ("failed to remove %s" , ID ), debug . RuntimeAttr ( "" ))
208208 return false , fmt .Errorf ("search wasn't completed after %d retries, skipping %s" , count , trackDetails )
209209 }
210210
211- debug .Debug (fmt .Sprintf ("[%d/%d] Searching for %s" , count , c .Cfg .Retry , trackDetails ))
211+ slog .Debug (fmt .Sprintf ("[%s] (% d/%d) Searching for %s" , "slskd " , count , c .Cfg .Retry , trackDetails ))
212212 time .Sleep (20 * time .Second )
213213 return c .searchStatus (ID , trackDetails , count + 1 )
214214}
@@ -336,7 +336,7 @@ func (c Slskd) queueDownload(files []File, track *models.Track) error {
336336 continue
337337 }
338338 if err := c .deleteSearch (track .ID ); err != nil {
339- debug .Debug (fmt . Sprintf ( "failed to delete search: %s " , err .Error ()))
339+ slog .Debug ("failed to delete search" , debug . RuntimeAttr ( err .Error ()))
340340 }
341341 return fmt .Errorf ("couldn't download track: %s - %s" , track .CleanTitle , track .Artist )
342342}
@@ -400,10 +400,10 @@ func (c Slskd) deleteDownload(user, ID string) error {
400400
401401func (c * Slskd ) Cleanup (track models.Track , fileID string ) error {
402402 if err := c .deleteSearch (track .ID ); err != nil {
403- debug .Debug (fmt . Sprintf ( "failed to delete search request: %v " , err ))
403+ slog .Debug ("failed to delete search request" , debug . RuntimeAttr ( err . Error () ))
404404 }
405405 if err := c .deleteDownload (track .MainArtistID , fileID ); err != nil {
406- debug .Debug (fmt . Sprintf ( "failed to delete download: %v " , err ))
406+ slog .Debug ("failed to delete download" , debug . RuntimeAttr ( err . Error () ))
407407 }
408408 return nil
409409}
0 commit comments