Logo Search packages:      
Sourcecode: transmission version File versions  Download package

void TRWindow::RescanTorrents (  ) 

Rescans the active Torrents folder, and will add all the torrents there to the engine. Called during initial Application Start & Stop.

Definition at line 124 of file TRWindow.cpp.

References AddEntry().

                              {
      if (Lock()) {
            TRApplication *app = dynamic_cast<TRApplication*>(be_app);
            BEntry *torrentEntry = new BEntry();
            status_t err;
            
            if (app->TorrentDir()->InitCheck() == B_OK) {
                  err = app->TorrentDir()->Rewind();
                  while (err == B_OK) {
                        err = app->TorrentDir()->GetNextEntry(torrentEntry, true);
                        if (err != B_ENTRY_NOT_FOUND) {
                              AddEntry(torrentEntry);
                        }
                  }
            }
            delete torrentEntry;
            Unlock();
      }
}


Generated by  Doxygen 1.6.0   Back to index