Announce tracker

  • 13 Replies
  • 2139 Views
*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Announce tracker
« on: September 26, 2017, 01:58:30 pm »
Hi everybody,

Is there a possibility to add directly the "PID" of the uploader on the * url of the tracker in the page of the upload?

Thank you

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #1 on: September 26, 2017, 04:27:06 pm »
Is there a possibility to add directly the "PID" of the uploader on the * url of the tracker in the page of the upload?

do you want it like:
If a new torrent is uploaded, the uploader doesn't have to re-download the torrent?. Yes, possible.
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #2 on: September 27, 2017, 08:02:55 am »
Yes, I want this  :)

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #3 on: September 27, 2017, 01:50:41 pm »
I'll get back to you on that
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #4 on: September 27, 2017, 02:38:03 pm »
Many thanks, I have send you an message

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #5 on: September 27, 2017, 11:22:21 pm »
To allow creating and uploading a torrent with an uploader's pid; and helping the system to recognize the torrent as an internal torrent, here's what you have to do.

Code: (php) [Select]
<?php
##upload.php:##

#find:
if (isset($_FILES["torrent"]))

#add before:

// pid code begin
$row =get_result("SELECT pid FROM {$TABLE_PREFIX}users WHERE id=".$CURUSER['uid'],true,$btit_settings['cache_duration']);
$pid=$row[0]["pid"];
if (!
$pid)
{
    
$pid=md5(uniqid(rand(),true));
    
do_sqlquery("UPDATE {$TABLE_PREFIX}users SET pid='".$pid."' WHERE id='".$CURUSER['uid']."'");
    if (
$XBTT_USE)
        
do_sqlquery("UPDATE xbt_users SET torrent_pass='".$pid."' WHERE uid='".$CURUSER['uid']."'");
}
foreach (
$TRACKER_ANNOUNCEURLS as $taurl)
   
$announcePlus[]= $taurl"?pid=$pid";
   
//------------------------------------------------------------------------------------------

#find:
if (in_array($array["announce"],$TRACKER_ANNOUNCEURLS) && $DHT_PRIVATE)
   
#replace:
if ( (in_array($array["announce"],$TRACKER_ANNOUNCEURLS) || in_array($array["announce"],$announcePlus)) && $DHT_PRIVATE )
   
//------------------------------------------------------------------------------------------

#find:
if (!in_array($announce,$TRACKER_ANNOUNCEURLS) && $EXTERNAL_TORRENTS==false)
   
#replace:
if ( (!in_array($announce,$TRACKER_ANNOUNCEURLS) || !in_array($announce,$announcePlus)) && $EXTERNAL_TORRENTS==false)
   
//------------------------------------------------------------------------------------------

#find:
if (in_array($announce,$TRACKER_ANNOUNCEURLS)){
   
#replace:
if (in_array($announce,$TRACKER_ANNOUNCEURLS) || in_array($announce,$announcePlus)){
      
//------------------------------------------------------------------------------------------

#find:
if (in_array($array["announce-list"][$i][0],$TRACKER_ANNOUNCEURLS))
   
#replace:
if (in_array($array["announce-list"][$i][0],$TRACKER_ANNOUNCEURLS) || in_array($array["announce-list"][$i][0],$announcePlus))
      
//------------------------------------------------------------------------------------------

#find:
if (!in_array($announce,$TRACKER_ANNOUNCEURLS))
   
#replace:
if (!in_array($announce,$TRACKER_ANNOUNCEURLS) || !in_array($announce,$announcePlus))

   
//------------------------------------------------------------------------------------------

#find:
      
foreach ($TRACKER_ANNOUNCEURLS as $taurl)
         
#replace:
      
foreach ($announcePlus as $taurl)
//------------------------------------------------------------------------------------------


Tested with xbtit beta version from github. I've attached my details.php with this reply.
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #6 on: September 28, 2017, 08:10:23 am »
Many thanks, I will test it and I'll be back to you.
But just, can you give the link of the xbtit beta on github or it is like this https://github.com/btiteam/xbtit ?

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #7 on: September 28, 2017, 09:05:19 am »
Many thanks, I will test it and I'll be back to you.
But just, can you give the link of the xbtit beta on github or it is like this https://github.com/btiteam/xbtit ?
you have the correct link.
if you want stable releases of xbtit, check:
https://github.com/btiteam/xbtit/releases
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #8 on: October 05, 2017, 11:07:59 am »
thank's for your code, it's working :)

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #9 on: October 05, 2017, 04:26:57 pm »
awesome!
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #10 on: October 19, 2017, 08:25:26 am »
Hi bhorer_alo

I need to adapt the code with xbtt as backend, can you help me?

*

Offline bhorer_alo

  • ****
  • 397
  • +0/-0
  • I'm Back!
    • OtakuBT.com
Re: Announce tracker
« Reply #11 on: October 23, 2017, 09:26:42 pm »
The idea is the same for xbtt. Please try yourself at first. I'll help you when you are stuck
I'm a novice, eager to learn.
otakubt.com

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #12 on: October 26, 2017, 09:35:07 am »
I have do this:

-before:
Code: [Select]
if (isset($_FILES["torrent"]))
I changed:
Code: [Select]
foreach ($TRACKER_ANNOUNCEURLS as $taurl)
$announcePlus[]= $taurl. "?pid=$pid";

to this:
Code: [Select]
foreach ($TRACKER_ANNOUNCEURLS as $taurl)
        if ($XBTT_USE)
                $announcePlus[] = $XBTT_URL."/$pid/announce";
        else
                $announcePlus[]= $taurl. "?pid=$pid";

and now the system work but after I upload the file on the website, I have this Mysql error (see attachment)
but I'll go back to torrent list, the file is there and I can leech the file successfully
And I checked my database, I noticed that the table "xbtit_files" was not updated the peer list (leecher, seeder and completed), it just marqued "0" (see attachment)
Or on the table "xbt_files", the peers was updated successfully (see attachment)

*

Offline tojoaijo

  • **
  • 38
  • +0/-0
Re: Announce tracker
« Reply #13 on: November 21, 2017, 08:55:48 am »
Hi bhorer_alo,
Have a new about this problem on XBTT?
Thanks

 


Powered by EzPortal