transmission icon indicating copy to clipboard operation
transmission copied to clipboard

Change the Tracker URL

Open htschannerl opened this issue 6 years ago • 2 comments

Hello,

I'm trying to change de URL of trackers. But doesn't work. Anyone knows how can I do it?

htschannerl avatar Jul 15 '18 22:07 htschannerl

Can you show your code?

cyrusdavid avatar Jul 16 '18 04:07 cyrusdavid

Follow the code.

$transmission = new Vohof\Transmission($config);

$trackers = ($transmission->get(1, array('trackers')));
$trackers = $trackers['torrents'][0];
//print_r($trackers);

foreach ($trackers['trackers']as $tracker){
    //print_r($tracker);
    
    $tracker['announce'] = str_replace("......", "......", $tracker['announce']);
    $tracker['scrape'] = str_replace("....", "....", $tracker['scrape']);
    
    $newtracker['trackers'][0] = $tracker;
    //print_r($newtracker);
}

print_r($transmission->get(1,array('name')));
$transmission->set(1, $newtracker);

htschannerl avatar Jul 24 '18 22:07 htschannerl