File tree 1 file changed +14
-21
lines changed
core/src/com/biglybt/pifimpl/local/utils/resourcedownloader
1 file changed +14
-21
lines changed Original file line number Diff line number Diff line change 514
514
@ Override
515
515
public void
516
516
stateChanged (
517
- final Download download ,
517
+ Download download ,
518
518
int old_state ,
519
519
int new_state )
520
520
{
524
524
525
525
download .removeListener ( this );
526
526
527
- PluginInitializer .getDefaultInterface ().getUtilities ().createThread (
528
- "resource complete event dispatcher" ,
529
- new Runnable ()
530
- {
531
- @ Override
532
- public void
533
- run ()
534
- {
535
- downloadSucceeded ( download , torrent_file , data_dir );
536
- }
537
- });
538
-
527
+ AEThread2 .createAndStartDaemon ( "resource complete event dispatcher" , ()->{
528
+
529
+ downloadSucceeded ( download , torrent_file , data_dir );
530
+
531
+ });
539
532
}
540
533
}
541
534
576
569
577
570
578
571
int state = download .getState ();
579
-
580
- if ( state == Download .ST_STOPPED ){
581
-
582
- // might have been added-stopped, start if so
583
-
584
- download .start ();
585
-
586
- }else if ( state == Download .ST_SEEDING || download .isComplete ()){
572
+
573
+ if ( state == Download .ST_SEEDING || download .isComplete ()){
587
574
588
575
// its possible that the d/l has already occurred and it is seeding!
589
576
590
577
downloadSucceeded ( download , torrent_file , data_dir );
578
+
579
+ }else if ( state == Download .ST_STOPPED ){
580
+
581
+ // might have been added-stopped, start if so
582
+
583
+ download .start ();
591
584
}
592
585
}catch ( Throwable e ){
593
586
You can’t perform that action at this time.
0 commit comments