I uploaded a torrent from isohunt.com with many peers to test my torrent field with, but when I upload the .torrent file to my field and run cron, it does not detect any seeds/leeches.

Have I misunderstood what this module does? Will it only track people who have download from my site? Shouldn't it display all peers associated with that torrent across the net?

Comments

mchelen’s picture

Here are some trouble shooting steps to try:
Make sure the uploaded file can be downloaded (if not, check directory permissions)
Disable clean URLs
Disable appending or overwriting tracker
Increase tracker scrape timeout

tiato’s picture

All these troubleshooting steps do not work.. It seems to be an issue with bt_tracker and how it gets the info from the db - i'm not 100% sure but with bt_tracker disabled I have noticed the db updates this info sometimes - and sometimes it does not - but never does it properly get the info from the db - instead it returns null values even when there is info from the scrape in the db - i'll be playing with this over the next few months

mitylite’s picture

Yeah, the steps didn't work for me either. Thanks for trying to figure this out tiato. For now I've simply removed the line that prints that information from the module so it doesn't mislead users.

chefarov’s picture

Component: User interface » Code

Same problem here. Clean drupal 6.22 installation (with cron running every 2 minutes) everything works fine, just seeders and leechers are always 0 in bt_torrent table of database. So I think the problem is how the database values are updated.

I think that the controversial code is in bt_torrent.module file in bt_torrent_cron() function:

function bt_torrent_cron() {

  // Scrape our local tracker (if enabled) for the locally tracked torrents
  if (module_exists('bt_tracker')) {
    $torrent_result = db_query("SELECT DISTINCT info_hash FROM {bt_torrents} bt WHERE announce_url = '%s'", setting_get('bt_torrent', 'override_announce_url'));

    while ($torrent = db_fetch_object($torrent_result)) {
      $scrape_info = module_invoke('bt_tracker', 'scrape', $torrent->info_hash);
      db_query("UPDATE {bt_torrents} SET seeders = %d, leechers = %d, downloaded = %d WHERE info_hash = '%s'", $scrape_info['complete'], $scrape_info['incomplete'], $scrape_info['downloaded'], $info_hash);
    }
  }
...

I don't know what's going on with info_hash and I am not sure I understand the way this code works.
If someone could examine the code to see if the problem is here or before that could be a good start.

Thanks for your time, I hope this helps somehow.

Hamulus’s picture

same problem