mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
aac6367e5c
commit
1d118971c9
@ -107,17 +107,16 @@
|
|||||||
}
|
}
|
||||||
$SQL .= "ELSE 100 END AS Rank,
|
$SQL .= "ELSE 100 END AS Rank,
|
||||||
t.GroupID,
|
t.GroupID,
|
||||||
|
t.ID,
|
||||||
t.Media,
|
t.Media,
|
||||||
t.Format,
|
t.Format,
|
||||||
t.Encoding,
|
t.Encoding,
|
||||||
tg.ReleaseType,
|
tg.ReleaseType,
|
||||||
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
||||||
tg.Name,
|
tg.Name,
|
||||||
t.Size,
|
t.Size
|
||||||
f.File
|
|
||||||
FROM torrents AS t
|
FROM torrents AS t
|
||||||
JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1' AND tg.ID IN (".implode(',',$GroupIDs).")
|
JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1' AND tg.ID IN (".implode(',',$GroupIDs).")
|
||||||
LEFT JOIN torrents_files AS f ON t.ID=f.TorrentID
|
|
||||||
ORDER BY t.GroupID ASC, Rank DESC, t.$Preference";
|
ORDER BY t.GroupID ASC, Rank DESC, t.$Preference";
|
||||||
|
|
||||||
$DB->query($SQL);
|
$DB->query($SQL);
|
||||||
@ -126,18 +125,26 @@
|
|||||||
$Skips = array();
|
$Skips = array();
|
||||||
$TotalSize = 0;
|
$TotalSize = 0;
|
||||||
|
|
||||||
|
if(count($Downloads)) {
|
||||||
|
foreach($Downloads as $Download) {
|
||||||
|
$TorrentIDs[] = $Download[2];
|
||||||
|
}
|
||||||
|
$DB->query("SELECT TorrentID, file FROM torrents_files WHERE TorrentID IN (".implode(',', $TorrentIDs).")");
|
||||||
|
$Torrents = $DB->to_array('TorrentID',MYSQLI_ASSOC,false);
|
||||||
|
}
|
||||||
|
|
||||||
require(SERVER_ROOT.'/classes/class_torrent.php');
|
require(SERVER_ROOT.'/classes/class_torrent.php');
|
||||||
require(SERVER_ROOT.'/classes/class_zip.php');
|
require(SERVER_ROOT.'/classes/class_zip.php');
|
||||||
$Zip = new ZIP(file_string($ArtistName));
|
$Zip = new ZIP(file_string($ArtistName));
|
||||||
foreach($Downloads as $Download) {
|
foreach($Downloads as $Download) {
|
||||||
list($Rank, $GroupID, $Media, $Format, $Encoding, $ReleaseType, $Year, $Album, $Size, $Contents) = $Download;
|
list($Rank, $GroupID, $TorrentID, $Media, $Format, $Encoding, $ReleaseType, $Year, $Album, $Size) = $Download;
|
||||||
$Artist = display_artists($Artists[$GroupID],false,true,false);
|
$Artist = display_artists($Artists[$GroupID],false,true,false);
|
||||||
if ($Rank == 100) {
|
if ($Rank == 100) {
|
||||||
$Skips[] = $Artist.$Album.' '.$Year;
|
$Skips[] = $Artist.$Album.' '.$Year;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$TotalSize += $Size;
|
$TotalSize += $Size;
|
||||||
$Contents = unserialize(base64_decode($Contents));
|
$Contents = unserialize(base64_decode($Torrents[$TorrentID]['file']));
|
||||||
$Tor = new TORRENT($Contents, true);
|
$Tor = new TORRENT($Contents, true);
|
||||||
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
||||||
unset($Tor->Val['announce-list']);
|
unset($Tor->Val['announce-list']);
|
||||||
|
@ -103,13 +103,13 @@
|
|||||||
}
|
}
|
||||||
$SQL .= "ELSE 100 END AS Rank,
|
$SQL .= "ELSE 100 END AS Rank,
|
||||||
t.GroupID,
|
t.GroupID,
|
||||||
|
t.ID,
|
||||||
t.Media,
|
t.Media,
|
||||||
t.Format,
|
t.Format,
|
||||||
t.Encoding,
|
t.Encoding,
|
||||||
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
|
||||||
tg.Name,
|
tg.Name,
|
||||||
t.Size,
|
t.Size
|
||||||
f.File
|
|
||||||
FROM torrents AS t
|
FROM torrents AS t
|
||||||
INNER JOIN collages_torrents AS c ON t.GroupID=c.GroupID AND c.CollageID='$CollageID'
|
INNER JOIN collages_torrents AS c ON t.GroupID=c.GroupID AND c.CollageID='$CollageID'
|
||||||
INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1'
|
INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID AND tg.CategoryID='1'
|
||||||
@ -122,18 +122,26 @@
|
|||||||
$Skips = array();
|
$Skips = array();
|
||||||
$TotalSize = 0;
|
$TotalSize = 0;
|
||||||
|
|
||||||
|
if(count($Downloads)) {
|
||||||
|
foreach($Downloads as $Download) {
|
||||||
|
$TorrentIDs[] = $Download[2];
|
||||||
|
}
|
||||||
|
$DB->query("SELECT TorrentID, file FROM torrents_files WHERE TorrentID IN (".implode(',', $TorrentIDs).")");
|
||||||
|
$Torrents = $DB->to_array('TorrentID',MYSQLI_ASSOC,false);
|
||||||
|
}
|
||||||
|
|
||||||
require(SERVER_ROOT.'/classes/class_torrent.php');
|
require(SERVER_ROOT.'/classes/class_torrent.php');
|
||||||
require(SERVER_ROOT.'/classes/class_zip.php');
|
require(SERVER_ROOT.'/classes/class_zip.php');
|
||||||
$Zip = new ZIP(file_string($CollageName));
|
$Zip = new ZIP(file_string($CollageName));
|
||||||
foreach($Downloads as $Download) {
|
foreach($Downloads as $Download) {
|
||||||
list($Rank, $GroupID, $Media, $Format, $Encoding, $Year, $Album, $Size, $Contents) = $Download;
|
list($Rank, $GroupID, $TorrentID, $Media, $Format, $Encoding, $Year, $Album, $Size) = $Download;
|
||||||
$Artist = display_artists($Artists[$GroupID],false,true,false);
|
$Artist = display_artists($Artists[$GroupID],false,true,false);
|
||||||
if ($Rank == 100) {
|
if ($Rank == 100) {
|
||||||
$Skips[] = $Artist.$Album.' '.$Year;
|
$Skips[] = $Artist.$Album.' '.$Year;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$TotalSize += $Size;
|
$TotalSize += $Size;
|
||||||
$Contents = unserialize(base64_decode($Contents));
|
$Contents = unserialize(base64_decode($Torrents[$TorrentID]['file']));
|
||||||
$Tor = new TORRENT($Contents, true);
|
$Tor = new TORRENT($Contents, true);
|
||||||
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
|
||||||
unset($Tor->Val['announce-list']);
|
unset($Tor->Val['announce-list']);
|
||||||
|
@ -45,7 +45,9 @@
|
|||||||
$RequestVotes = get_votes_array($RequestID);
|
$RequestVotes = get_votes_array($RequestID);
|
||||||
|
|
||||||
if ($RequestVotes['TotalBounty'] > $Uploaded) {
|
if ($RequestVotes['TotalBounty'] > $Uploaded) {
|
||||||
$DB->query("UPDATE users_main SET Downloaded = Downloaded + ".$RequestVotes['TotalBounty']." WHERE ID = ".$FillerID);
|
// If we can't take it all out of upload, zero that out and add whatever is left as download.
|
||||||
|
$DB->query("UPDATE users_main SET Uploaded = 0 WHERE ID = ".$FillerID);
|
||||||
|
$DB->query("UPDATE users_main SET Downloaded = Downloaded + ".($RequestVotes['TotalBounty']-$Uploaded)." WHERE ID = ".$FillerID);
|
||||||
} else {
|
} else {
|
||||||
$DB->query("UPDATE users_main SET Uploaded = Uploaded - ".$RequestVotes['TotalBounty']." WHERE ID = ".$FillerID);
|
$DB->query("UPDATE users_main SET Uploaded = Uploaded - ".$RequestVotes['TotalBounty']." WHERE ID = ".$FillerID);
|
||||||
}
|
}
|
||||||
|
@ -924,7 +924,9 @@ function next_hour() {
|
|||||||
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
if($BiWeek != next_biweek() || $_GET['runbiweek']) {
|
if($BiWeek != next_biweek() || $_GET['runbiweek']) {
|
||||||
|
|
||||||
echo "Ran bi-weekly functions\n";
|
echo "Ran bi-weekly functions\n";
|
||||||
|
|
||||||
//------------- Cycle auth keys -----------------------------------------//
|
//------------- Cycle auth keys -----------------------------------------//
|
||||||
|
Loading…
Reference in New Issue
Block a user