Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Free Torrent Source (http://www.bvlist.com/forumdisplay.php?f=25)
-   -   Torrent ... was deleted by system (older than 128 days) (http://www.bvlist.com/showthread.php?t=4230)

xxx2008 13th January 2010 12:28

Torrent ... was deleted by system (older than 128 days)
 
source and remove torrents that are not dead and are still active

How do I change the number of days???

thx

elvira 13th January 2010 17:26

Try this one

Code:

////////auto-delete old torrents////////   
$days = 5;
$dt = sqlesc(get_date_time(gmtime() - ($days * 86400)));
$days_la = 7;
$dt_la = sqlesc(get_date_time(gmtime() - ($days_la * 86400)));
$res = sql_query("SELECT id, name FROM torrents WHERE added < $dt AND seeders=0 AND leechers=0 AND last_action < $dt_la ");
while ($arr = mysql_fetch_assoc($res))
{
@unlink("$torrent_dir/$arr[id].torrent");
sql_query("DELETE FROM torrents WHERE id=$arr[id]");
sql_query("DELETE FROM peers WHERE torrent=$arr[id]");
sql_query("DELETE FROM snatched WHERE torrent=$arr[id]");
sql_query("UPDATE avps SET value_d='0000-00-00 00:00:00', value_s='' WHERE arg='bestfilmofweek' AND value_s=".$arr["id"]);
sql_query("DELETE FROM comments WHERE torrent=$arr[id]");
sql_query("DELETE FROM files WHERE torrent=$arr[id]");
write_log("Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days and no seeders or leechers in 7 day's)");
$message = "Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days and no seeders or leechers in 7 day's)";
autoshout($message);
}


xxx2008 14th January 2010 12:32

what file find it?
use FTS1.1

thx

Edgein 14th January 2010 20:19

Here you can find it

Go to /include/libs/cron/cron_class.php

Find there

PHP Code:

            // delete old torrents
    
$days 128 ;
    
$dt sqlescget_date_time(gmtime() - ($days 86400)) ) ;
    
$res mysql_query"SELECT id, name FROM torrents WHERE added < $dt) ;
    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 snatched WHERE torrentid =$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 (older than $days days)" ) ;
    } 

grtzz edgein

xxx2008 15th January 2010 09:10

thx m8

Quote:

Originally Posted by elvira (Post 19458)
Try this one


no work, give an error docleanup.php

elvira 15th January 2010 21:20

Witch error you have

xxx2008 20th January 2010 11:19

Code:

Warning: fopen(/var/www/datashare.com/admin/2010-01-20.log) [function.fopen]: failed to open stream: Permission denied in /var/www/datashare.ro/include/class_logger.php on line 111
[0] in function fopen in /var/www/datashare.com/include/class_logger.php on line 111
[1] in function Logger->Save in /var/www/datashare.com/include/class_sql.php on line 303
[2] in function SQL->err in /var/www/datashare.com/include/class_sql.php on line 103
[3] in function SQL->query in /var/www/datashare.com/include/functions.php on line 46
[4] in function sql_query in /var/www/datashare.com/include/libs/cron/cron_class.php on line 164
[5] in function cron::torrentscron in /var/www/datashare.com/include/cron-main.php on line 46
[6] in function docleanup in /var/www/datashare.com/admin/docleanup.php on line 10

Warning: fopen(/var/www/datashare.com/admin/2010-01-20.log) [function.fopen]: failed to open stream: Permission denied in /var/www/datashare.com/include/class_logger.php on line 111
[0] in function fopen in /var/www/datashare.com/include/class_logger.php on line 111
[1] in function Logger->Save


elvira 20th January 2010 17:36

you must add in yours include/class_logger.php to the permission on 777

xxx2008 20th January 2010 22:37

I put 777 but still not working, I changed the 5 to 160 and so wants to go without error docleanup.php

westerfield 16th March 2010 15:01

fix
 
Go to /include/libs/cron/cron_class.php


look for this in / delete old torrents
$days = 128 ;
that it :drink:


All times are GMT +2. The time now is 12:10.

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