Ignore:
Timestamp:
Jul 16, 2013, 12:50:45 AM (9 years ago)
Author:
jordan
Message:

when a torrent finishes downloading, first rename/move the files (if there's a temp directory or .part suffix), then check to fire the completeness callback, then check to fire the ratio limit callback, then check to fire the done callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r14123 r14125  
    21582158              /* clear interested flag on all peers */
    21592159              tr_peerMgrClearInterest (tor);
    2160 
     2160            }
     2161
     2162          if (tor->currentDir == tor->incompleteDir)
     2163            tr_torrentSetLocation (tor, tor->downloadDir, true, NULL, NULL);
     2164        }
     2165
     2166      fireCompletenessChange (tor, completeness, wasRunning);
     2167
     2168      if (tr_torrentIsSeed (tor))
     2169        {
     2170          if (wasLeeching && wasRunning)
     2171            {
    21612172              /* if completeness was TR_LEECH then the seed limit check will have been skipped in bandwidthPulse */
    21622173              tr_torrentCheckSeedLimit (tor);
    21632174            }
    21642175
    2165           if (tor->currentDir == tor->incompleteDir)
    2166             tr_torrentSetLocation (tor, tor->downloadDir, true, NULL, NULL);
    2167        }
    2168 
    2169       fireCompletenessChange (tor, completeness, wasRunning);
    2170 
    2171       if (tr_torrentIsSeed (tor))
    2172         {
    21732176          if (tr_sessionIsTorrentDoneScriptEnabled (tor->session))
    21742177            torrentCallScript (tor, tr_sessionGetTorrentDoneScript (tor->session));
Note: See TracChangeset for help on using the changeset viewer.