Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Yuna Scatari Edition (YSE) (http://www.bvlist.com/forumdisplay.php?f=22)
-   -   Freeleech (http://www.bvlist.com/showthread.php?t=8010)

mat22 6th June 2012 13:25

Freeleech
 
Hello!

So I have 3 types of torrents - golden ones (freeleech), silver ones (half torrent size counts to download) and normal ones. The problem is - if I set freeleech manually to any torrent that isn't in the automatic range (4,5GB and up) it just goes back to silver or normal when the cleanup happens. I know that it's because of cleanup.php function but I can't think of any way to make it stay golden when I set it manually and cleanup happens. Everything I tried just gives me an error and nothing else.

Here's freeleech and silver part from cleanup.php:
Code:

        /** all files that are bigger than x GB get freeleech, except XXX, using new function - POWER **/
       
        $izmeers = 4.5; // GB count
        mysql_query("UPDATE torrents SET free_new = '2' WHERE size >= POWER(1024,3) * $izmeers AND category <> '32'") or sqlerr(__FILE__,__LINE__);
        /***** end *****/

        /** all files that are smaller than x GB get silver, except XXX, using new function - POWER **/
        $izmeers2 = 4.5; // GB count
        mysql_query("UPDATE torrents SET free_new = '1' WHERE size < POWER(1024,3) * $izmeers2 AND category <> '32'") or sqlerr(__FILE__,__LINE__);       
       
        /** Normal torrents**/
        $izmeers1 = 1.49; // GB count
        mysql_query("UPDATE torrents SET free_new = '0' WHERE size < POWER(1024,3) * $izmeers1 AND category <> '32'") or sqlerr(__FILE__,__LINE__);       
        /***** end *****/

I know that there are better ways to do it but this one works. lol :D

So in a few words - I need to modify this so the torrents I make gold (or silver) manually, stay like that not change back whenever cleanup starts.


All times are GMT +2. The time now is 16:23.

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