Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Dead torrents (http://www.bvlist.com/showthread.php?t=836)

trilious 13th August 2008 23:09

Dead torrents
 
hey guys can anyone get teh mod that deletes all dead torrents at once please and thanx in advance

GaBoNtZ 14th August 2008 00:09

Quote:

Originally Posted by trilious (Post 3425)
hey guys can anyone get teh mod that deletes all dead torrents at once please and thanx in advance

"do cleanup" ? or "cleanup" ?

trilious 14th August 2008 01:04

hi
 
yeah thats not working i know tsse has a mod to delete all dead torrents at once

Krypto 14th August 2008 08:32

Save this as dead.php

Code:


require_once("include/bittorrent.php");

// delete dead torrents
        $res = mysql_query("SELECT id, name FROM torrents WHERE seeders=0 AND leechers=0 ");
        while ($arr = mysql_fetch_assoc($res))
        {
                @unlink("$torrent_dir/$arr[id].torrent");
                mysql_query("DELETE FROM torrents WHERE id=$arr[id]");
                mysql_query("DELETE FROM peers WHERE torrent=$arr[id]");
                mysql_query("DELETE FROM comments WHERE torrent=$arr[id]");
                mysql_query("DELETE FROM files WHERE torrent=$arr[id]");
                write_log("Torrent $arr[id] ($arr[name]) was deleted by system, torrent dead");
        }

?>

Or just add the highlighted parts in to your cleanup file.

Not Tested, but should work

trilious 14th August 2008 13:33

hi
 
nope dead.php just brings up The page cannot be displayed


All times are GMT +2. The time now is 13:38.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.