mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 10:56:26 +00:00
Empty commit
This commit is contained in:
parent
a49bc32a52
commit
9291b1fd8c
@ -131,6 +131,9 @@ function encode($Val){
|
|||||||
|
|
||||||
class BENCODE_LIST extends BENCODE {
|
class BENCODE_LIST extends BENCODE {
|
||||||
function enc(){
|
function enc(){
|
||||||
|
if(empty($this->Val)) {
|
||||||
|
return 'le';
|
||||||
|
}
|
||||||
$Str = 'l';
|
$Str = 'l';
|
||||||
reset($this->Val);
|
reset($this->Val);
|
||||||
foreach ($this->Val as $Value) {
|
foreach ($this->Val as $Value) {
|
||||||
|
@ -48,16 +48,16 @@ function revision_history(){
|
|||||||
RevisionID,
|
RevisionID,
|
||||||
Summary,
|
Summary,
|
||||||
Time,
|
Time,
|
||||||
UserID,
|
UserID
|
||||||
users.Username
|
|
||||||
FROM ".$this->Table." AS wiki
|
FROM ".$this->Table." AS wiki
|
||||||
JOIN users_main AS users ON users.ID = wiki.UserID
|
|
||||||
WHERE wiki.PageID = ".$this->PageID."
|
WHERE wiki.PageID = ".$this->PageID."
|
||||||
ORDER BY RevisionID DESC");
|
ORDER BY RevisionID DESC");
|
||||||
//----------------------------------------------- ?>
|
//----------------------------------------------- ?>
|
||||||
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="border">
|
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="border">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Revision</td>
|
<td>Revision</td>
|
||||||
|
<td>Date</td>
|
||||||
|
<td>User</td>
|
||||||
<td>Summary</td>
|
<td>Summary</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? //-----------------------------------------
|
<? //-----------------------------------------
|
||||||
@ -68,11 +68,15 @@ function revision_history(){
|
|||||||
<tr class="row<?=$Row?>">
|
<tr class="row<?=$Row?>">
|
||||||
<td>
|
<td>
|
||||||
<?= "<a href='$BaseURL&revisionid=$RevisionID'>#$RevisionID</a>" ?>
|
<?= "<a href='$BaseURL&revisionid=$RevisionID'>#$RevisionID</a>" ?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong>Edited by</strong> <a href="user.php?id=<?=$UserID?>"><?=$Username ?></a>
|
<?=$Time?>
|
||||||
<strong>Reason:</strong> <?=$Summary?>
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=Users::format_username($UserID, false, false, false)?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=($Summary ? $Summary : '(empty)')?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? //---------------------------------------------------
|
<? //---------------------------------------------------
|
||||||
|
@ -56,7 +56,13 @@ if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 80) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Site settings
|
// Site settings
|
||||||
define('CRYPT_HASH_PREFIX', '$2y$07$'); // Crypt salt prefix for hash settings. See http://php.net/crypt for details
|
if (PHP_VERSION_ID < 50307) {
|
||||||
|
die("PHP version 5.3.7 or later is highly recommended for gazelle's password hashing methods.".
|
||||||
|
" Uncomment line ".__LINE__." in file ".__FILE__." if you want to continue to use this version.");
|
||||||
|
define('CRYPT_HASH_PREFIX', '$2a$07$'); // Crypt salt prefix for hash settings. See http://php.net/crypt for details
|
||||||
|
} else {
|
||||||
|
define('CRYPT_HASH_PREFIX', '$2y$07$');
|
||||||
|
}
|
||||||
define('DEBUG_MODE', false); //Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
|
define('DEBUG_MODE', false); //Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
|
||||||
define('OPEN_REGISTRATION', true); //Set to false to disable open regirstration, true to allow anyone to register
|
define('OPEN_REGISTRATION', true); //Set to false to disable open regirstration, true to allow anyone to register
|
||||||
define('USER_LIMIT', 5000); //The maximum number of users the site can have, 0 for no limit
|
define('USER_LIMIT', 5000); //The maximum number of users the site can have, 0 for no limit
|
||||||
@ -67,11 +73,10 @@ define('DONOR_INVITES', 2);
|
|||||||
|
|
||||||
// User class IDs needed for automatic promotions. Found in the 'permissions' table
|
// User class IDs needed for automatic promotions. Found in the 'permissions' table
|
||||||
// Name of class Class ID (NOT level)
|
// Name of class Class ID (NOT level)
|
||||||
|
define('ADMIN', '1');
|
||||||
define('USER', '2');
|
define('USER', '2');
|
||||||
define('MEMBER', '3');
|
define('MEMBER', '3');
|
||||||
define('POWER', '4');
|
define('POWER', '4');
|
||||||
define('ARTIST', '19');
|
|
||||||
define('DONOR', '20');
|
|
||||||
define('ELITE', '5');
|
define('ELITE', '5');
|
||||||
define('VIP', '6');
|
define('VIP', '6');
|
||||||
define('TORRENT_MASTER','7');
|
define('TORRENT_MASTER','7');
|
||||||
@ -80,8 +85,12 @@ define('CELEB', '9');
|
|||||||
define('MOD', '11');
|
define('MOD', '11');
|
||||||
define('DESIGNER', '13');
|
define('DESIGNER', '13');
|
||||||
define('CODER', '14');
|
define('CODER', '14');
|
||||||
define('ADMIN', '1');
|
|
||||||
define('SYSOP', '15');
|
define('SYSOP', '15');
|
||||||
|
define('ARTIST', '19');
|
||||||
|
define('DONOR', '20');
|
||||||
|
define('FLS_TEAM', '21');
|
||||||
|
define('POWER_TM', '22');
|
||||||
|
define('ELITE_TM', '23');
|
||||||
|
|
||||||
//Pagination
|
//Pagination
|
||||||
define('TORRENT_COMMENTS_PER_PAGE', 10);
|
define('TORRENT_COMMENTS_PER_PAGE', 10);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
JOIN torrents AS t ON t.ID=x.fid
|
JOIN torrents AS t ON t.ID=x.fid
|
||||||
WHERE t.Format='FLAC'
|
WHERE t.Format='FLAC'
|
||||||
AND ((t.LogScore = '100' AND t.Media = 'CD')
|
AND ((t.LogScore = '100' AND t.Media = 'CD')
|
||||||
OR t.Media = 'Vinyl')
|
OR t.Media != 'CD')
|
||||||
AND x.uid='$UserID'");
|
AND x.uid='$UserID'");
|
||||||
|
|
||||||
$SnatchedTorrentIDs = array_fill_keys($DB->collect('fid'), true);
|
$SnatchedTorrentIDs = array_fill_keys($DB->collect('fid'), true);
|
||||||
@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count($SnatchedGroupIDs) == 0) {
|
if (count($SnatchedGroupIDs) == 0) {
|
||||||
error(($SeedingOnly ? "You aren't seeding any 100% FLACs!" : "You haven't snatched any 100% FLACs!"));
|
error(($SeedingOnly ? "You aren't seeding any perfect FLACs!" : "You haven't snatched any perfect FLACs!"));
|
||||||
}
|
}
|
||||||
// Create hash table
|
// Create hash table
|
||||||
|
|
||||||
@ -104,6 +104,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// count how many FLAC torrents we have in this list totally (key 'total')
|
||||||
|
// how many transcodes there are missing totally (key 'miss_total')
|
||||||
|
// and for each format (keys , 'miss_V0 (VBR)', 'miss_V2 (VBR)', 'miss_320')
|
||||||
|
// the latter happens by counting the number of existing transcodes and then subtracting because that's easier
|
||||||
|
$Counter = array();
|
||||||
|
$Counter['total'] = 0;
|
||||||
|
foreach($TorrentGroups as $Editions) {
|
||||||
|
foreach($Editions as $Edition) {
|
||||||
|
if($Edition['FlacID'] == 0) { continue; } // no FLAC in this edition
|
||||||
|
$edition_miss = 0; //number of transcodes missing in this edition
|
||||||
|
foreach($Encodings as $Encoding) {
|
||||||
|
if(!isset($Edition['Formats'][$Encoding])) {
|
||||||
|
++$edition_miss;
|
||||||
|
++$Counter['miss_'.$Encoding];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$Counter['miss_total'] += $edition_miss;
|
||||||
|
$Counter['total'] += (bool)$edition_miss;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
View::show_header('Transcode Snatches');
|
View::show_header('Transcode Snatches');
|
||||||
?>
|
?>
|
||||||
@ -115,6 +135,16 @@
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
|
<h2>Transcode <?=($SeedingOnly ? 'seeding' : 'snatched')?> torrents</h2>
|
||||||
|
<h3>Stats</h3>
|
||||||
|
<div class="box pad">
|
||||||
|
<p>
|
||||||
|
Number of perfect FLACs you can transcode: <?=$Counter['total']?><br />
|
||||||
|
Number of missing transcodes: <?=$Counter['miss_total']?><br />
|
||||||
|
Number of missing V2 / V0 / 320 transcodes: <?=$Counter['miss_V2 (VBR)']?> / <?=$Counter['miss_V0 (VBR)']?> / <?=$Counter['miss_320']?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<h3>List</h3>
|
||||||
<table width="100%" class="torrent_table">
|
<table width="100%" class="torrent_table">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Torrent</td>
|
<td>Torrent</td>
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
if (isset($EncodingKeys[$Torrent['Encoding']])) {
|
if (isset($EncodingKeys[$Torrent['Encoding']])) {
|
||||||
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
|
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
|
||||||
} elseif ($TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] == 0 && $Torrent['Format'] == 'FLAC' && $Torrent['LogScore'] == 100) {
|
} elseif ($TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] == 0 && $Torrent['Format'] == 'FLAC' && ($Torrent['LogScore'] == 100 || $Torrent['Media'] != 'CD')) {
|
||||||
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
|
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
|
||||||
$TorrentGroups[$Group['ID']][$TorRemIdent]['IsSnatched'] = $Torrent['IsSnatched'];
|
$TorrentGroups[$Group['ID']][$TorRemIdent]['IsSnatched'] = $Torrent['IsSnatched'];
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?
|
<?
|
||||||
// Get list of FLAC uploads
|
|
||||||
|
|
||||||
if (!empty($_GET['userid']) && is_number($_GET['userid'])) {
|
if (!empty($_GET['userid']) && is_number($_GET['userid'])) {
|
||||||
if (check_perms('users_override_paranoia')) {
|
if (check_perms('users_override_paranoia')) {
|
||||||
$UserID = $_GET['userid'];
|
$UserID = $_GET['userid'];
|
||||||
@ -11,43 +9,123 @@
|
|||||||
$UserID = $LoggedUser['ID'];
|
$UserID = $LoggedUser['ID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$Encodings = array('V0 (VBR)', 'V2 (VBR)', '320');
|
||||||
|
$EncodingKeys = array_fill_keys($Encodings, true);
|
||||||
|
|
||||||
|
// Get list of FLAC uploads
|
||||||
$DB->query("SELECT t.GroupID, t.ID
|
$DB->query("SELECT t.GroupID, t.ID
|
||||||
FROM torrents AS t
|
FROM torrents AS t
|
||||||
WHERE
|
WHERE
|
||||||
t.Format='FLAC'
|
t.Format='FLAC'
|
||||||
AND ((t.LogScore = '100' AND t.Media = 'CD')
|
AND ((t.LogScore = '100' AND t.Media = 'CD')
|
||||||
OR t.Media = 'Vinyl')
|
OR t.Media != 'CD')
|
||||||
AND t.UserID='$UserID'");
|
AND t.UserID='$UserID'");
|
||||||
|
|
||||||
|
$UploadedTorrentIDs = array_fill_keys($DB->collect('ID'), true);
|
||||||
$UploadedGroupIDs = $DB->collect('GroupID');
|
$UploadedGroupIDs = $DB->collect('GroupID');
|
||||||
$Uploads = $DB->to_array('GroupID');
|
|
||||||
|
|
||||||
if(count($UploadedGroupIDs) == 0) { error('You haven\'t uploaded any 100% flacs!'); }
|
if (count($UploadedGroupIDs) == 0) {
|
||||||
|
error("You haven't uploaded any perfect FLACs!");
|
||||||
|
}
|
||||||
|
|
||||||
// Create hash table
|
// Create hash table
|
||||||
|
|
||||||
$DB->query("CREATE TEMPORARY TABLE temp_sections_better_upload
|
$DB->query("CREATE TEMPORARY TABLE temp_sections_better_upload
|
||||||
SELECT t.GroupID,
|
SELECT t.GroupID,
|
||||||
GROUP_CONCAT(t.Encoding SEPARATOR ' ') AS EncodingList
|
GROUP_CONCAT(t.Encoding SEPARATOR ' ') AS EncodingList,
|
||||||
|
CRC32(CONCAT_WS(' ', Media, Remasteryear, Remastertitle,
|
||||||
|
Remasterrecordlabel, Remastercataloguenumber)) AS RemIdent
|
||||||
FROM torrents AS t
|
FROM torrents AS t
|
||||||
WHERE t.GroupID IN(".implode(',',$UploadedGroupIDs).")
|
WHERE t.GroupID IN(".implode(',',$UploadedGroupIDs).")
|
||||||
GROUP BY t.GroupID");
|
GROUP BY t.GroupID, RemIdent");
|
||||||
|
|
||||||
//$DB->query('SELECT * FROM t');
|
|
||||||
|
|
||||||
$DB->query("SELECT GroupID FROM temp_sections_better_upload
|
$DB->query("SELECT GroupID FROM temp_sections_better_upload
|
||||||
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
|
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
|
||||||
OR EncodingList NOT LIKE '%V2 (VBR)%'
|
OR EncodingList NOT LIKE '%V2 (VBR)%'
|
||||||
OR EncodingList NOT LIKE '%320%'");
|
OR EncodingList NOT LIKE '%320%'");
|
||||||
|
|
||||||
$GroupIDs = $DB->collect('GroupID');
|
$GroupIDs = array_fill_keys($DB->collect('GroupID'), true);
|
||||||
|
|
||||||
if(count($GroupIDs) == 0) { error('No results found'); }
|
if (count($GroupIDs) == 0) {
|
||||||
|
error('No results found.');
|
||||||
|
}
|
||||||
|
|
||||||
$Results = Torrents::get_groups($GroupIDs);
|
$Groups = Torrents::get_groups(array_keys($GroupIDs));
|
||||||
|
$Groups = $Groups['matches'];
|
||||||
|
|
||||||
|
$TorrentGroups = array();
|
||||||
|
foreach ($Groups as $GroupID => $Group) {
|
||||||
|
if (empty($Group['Torrents'])) {
|
||||||
|
unset($Groups[$GroupID]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
foreach ($Group['Torrents'] as $Torrent) {
|
||||||
|
$TorRemIdent = "$Torrent[Media] $Torrent[RemasterYear] $Torrent[RemasterTitle] $Torrent[RemasterRecordLabel] $Torrent[RemasterCatalogueNumber]";
|
||||||
|
if (!isset($TorrentGroups[$Group['ID']])) {
|
||||||
|
$TorrentGroups[$Group['ID']] = array(
|
||||||
|
$TorRemIdent => array(
|
||||||
|
'FlacID' => 0,
|
||||||
|
'Formats' => array(),
|
||||||
|
'IsSnatched' => $Torrent['IsSnatched'],
|
||||||
|
'Medium' => $Torrent['Media'],
|
||||||
|
'RemasterTitle' => $Torrent['RemasterTitle'],
|
||||||
|
'RemasterYear' => $Torrent['RemasterYear'],
|
||||||
|
'RemasterRecordLabel' => $Torrent['RemasterRecordLabel'],
|
||||||
|
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} elseif (!isset($TorrentGroups[$Group['ID']][$TorRemIdent])) {
|
||||||
|
$TorrentGroups[$Group['ID']][$TorRemIdent] = array(
|
||||||
|
'FlacID' => 0,
|
||||||
|
'Formats' => array(),
|
||||||
|
'IsSnatched' => $Torrent['IsSnatched'],
|
||||||
|
'Medium' => $Torrent['Media'],
|
||||||
|
'RemasterTitle' => $Torrent['RemasterTitle'],
|
||||||
|
'RemasterYear' => $Torrent['RemasterYear'],
|
||||||
|
'RemasterRecordLabel' => $Torrent['RemasterRecordLabel'],
|
||||||
|
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (isset($EncodingKeys[$Torrent['Encoding']])) {
|
||||||
|
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
|
||||||
|
$Counter['existing'][$Torrent['Encoding']] += 1;
|
||||||
|
} elseif (isset($UploadedTorrentIDs[$Torrent['ID']])) {
|
||||||
|
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// count how many FLAC torrents we have in this list totally (key 'total')
|
||||||
|
// how many transcodes there are missing totally (key 'miss_total')
|
||||||
|
// and for each format (keys , 'miss_V0 (VBR)', 'miss_V2 (VBR)', 'miss_320')
|
||||||
|
// the latter happens by counting the number of existing transcodes and then subtracting because that's easier
|
||||||
|
$Counter = array();
|
||||||
|
$Counter['total'] = 0;
|
||||||
|
foreach($TorrentGroups as $Editions) {
|
||||||
|
foreach($Editions as $Edition) {
|
||||||
|
if($Edition['FlacID'] == 0) { continue; } // no FLAC in this edition
|
||||||
|
$edition_miss = 0; //number of transcodes missing in this edition
|
||||||
|
foreach($Encodings as $Encoding) {
|
||||||
|
if(!isset($Edition['Formats'][$Encoding])) {
|
||||||
|
++$edition_miss;
|
||||||
|
++$Counter['miss_'.$Encoding];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$Counter['miss_total'] += $edition_miss;
|
||||||
|
$Counter['total'] += (bool)$edition_miss;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
View::show_header('Transcode Uploads');
|
View::show_header('Transcode Uploads');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
|
<h3>Stats</h3>
|
||||||
|
<div class="box pad">
|
||||||
|
<p>
|
||||||
|
Number of perfect FLACs you can transcode: <?=$Counter['total']?><br />
|
||||||
|
Number of missing transcodes: <?=$Counter['miss_total']?><br />
|
||||||
|
Number of missing V2 / V0 / 320 transcodes: <?=$Counter['miss_V2 (VBR)']?> / <?=$Counter['miss_V0 (VBR)']?> / <?=$Counter['miss_320']?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<h3>List</h3>
|
||||||
<table width="100%" class="torrent_table">
|
<table width="100%" class="torrent_table">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Torrent</td>
|
<td>Torrent</td>
|
||||||
@ -56,64 +134,80 @@
|
|||||||
<td>320</td>
|
<td>320</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
$Results = $Results['matches'];
|
foreach ($TorrentGroups as $GroupID => $Editions) {
|
||||||
foreach ($Results as $GroupID=>$Group) {
|
$GroupInfo = $Groups[$GroupID];
|
||||||
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Group);
|
$GroupYear = $GroupInfo['Year'];
|
||||||
|
$ExtendedArtists = $GroupInfo['ExtendedArtists'];
|
||||||
|
$GroupCatalogueNumber = $GroupInfo['CatalogueNumber'];
|
||||||
|
$GroupName = $GroupInfo['Name'];
|
||||||
|
$GroupRecordLabel = $GroupInfo['RecordLabel'];
|
||||||
|
$ReleaseType = $GroupInfo['ReleaseType'];
|
||||||
|
|
||||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
||||||
unset($ExtendedArtists[2]);
|
unset($ExtendedArtists[2]);
|
||||||
unset($ExtendedArtists[3]);
|
unset($ExtendedArtists[3]);
|
||||||
$DisplayName = Artists::display_artists($ExtendedArtists);
|
$ArtistNames = Artists::display_artists($ExtendedArtists);
|
||||||
} else {
|
} else {
|
||||||
$DisplayName = '';
|
$ArtistNames = '';
|
||||||
}
|
|
||||||
$FlacID = $Uploads[$GroupID]['ID'];
|
|
||||||
|
|
||||||
$DisplayName = '';
|
|
||||||
if(count($Artists)>0) {
|
|
||||||
$DisplayName = Artists::display_artists(array('1'=>$Artists));
|
|
||||||
}
|
|
||||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$FlacID.'#torrent'.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
|
|
||||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
|
||||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
|
||||||
|
|
||||||
$ExtraInfo = Torrents::torrent_info($Torrents[$FlacID]);
|
|
||||||
if($ExtraInfo) {
|
|
||||||
$DisplayName.=' - '.$ExtraInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
|
|
||||||
|
|
||||||
foreach($Torrents as $Torrent) {
|
|
||||||
if(!empty($MissingEncodings[$Torrent['Encoding']])) {
|
|
||||||
$MissingEncodings[$Torrent['Encoding']] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$TagList = array();
|
$TagList = array();
|
||||||
if($TorrentTags!='') {
|
$TagList = explode(' ', str_replace('_', '.', $GroupInfo['TagList']));
|
||||||
$TorrentTags=explode(' ',$TorrentTags);
|
$TorrentTags = array();
|
||||||
foreach ($TorrentTags as $TagKey => $TagName) {
|
foreach ($TagList as $Tag) {
|
||||||
$TagName = str_replace('_','.',$TagName);
|
$TorrentTags[] = '<a href="torrents.php?taglist='.$Tag.'">'.$Tag.'</a>';
|
||||||
$TagList[]='<a href="torrents.php?taglist='.$TagName.'">'.$TagName.'</a>';
|
|
||||||
}
|
}
|
||||||
$PrimaryTag = $TorrentTags[0];
|
$TorrentTags = implode(', ', $TorrentTags);
|
||||||
$TagList = implode(', ', $TagList);
|
foreach ($Editions as $RemIdent => $Edition) {
|
||||||
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
|
if (!$Edition['FlacID'] || count($Edition['Formats']) == 3) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
$DisplayName = $ArtistNames . '<a href="torrents.php?id='.$GroupID.'&torrentid='.$Edition['FlacID'].'#torrent'.$Edition['FlacID'].'" title="View Torrent">'.$GroupName.'</a>';
|
||||||
|
if($GroupYear > 0) {
|
||||||
|
$DisplayName .= " [".$GroupYear."]";
|
||||||
|
}
|
||||||
|
if ($ReleaseType > 0) {
|
||||||
|
$DisplayName .= " [".$ReleaseTypes[$ReleaseType]."]";
|
||||||
|
}
|
||||||
|
$DisplayName .= ' ['.$Edition['Medium'].']';
|
||||||
|
|
||||||
|
$EditionInfo = array();
|
||||||
|
if (!empty($Edition['RemasterYear'])) {
|
||||||
|
$ExtraInfo = $Edition['RemasterYear'];
|
||||||
|
} else {
|
||||||
|
$ExtraInfo = '';
|
||||||
|
}
|
||||||
|
if (!empty($Edition['RemasterRecordLabel'])) {
|
||||||
|
$EditionInfo[] = $Edition['RemasterRecordLabel'];
|
||||||
|
}
|
||||||
|
if (!empty($Edition['RemasterTitle'])) {
|
||||||
|
$EditionInfo[] = $Edition['RemasterTitle'];
|
||||||
|
}
|
||||||
|
if (!empty($Edition['RemasterCatalogueNumber'])) {
|
||||||
|
$EditionInfo[] = $Edition['RemasterCatalogueNumber'];
|
||||||
|
}
|
||||||
|
if (!empty($Edition['RemasterYear'])) {
|
||||||
|
$ExtraInfo .= ' - ';
|
||||||
|
}
|
||||||
|
$ExtraInfo .= implode(' / ', $EditionInfo);
|
||||||
?>
|
?>
|
||||||
<tr<?=$Torrents[$FlacID]['IsSnatched'] ? ' class="snatched_torrent"' : ''?>>
|
<tr class="torrent torrent_row<?=$Edition['IsSnatched'] ? ' snatched_torrent' : ''?>">
|
||||||
<td>
|
<td>
|
||||||
<span class="torrent_links_block">
|
<span class="torrent_links_block">
|
||||||
<a href="torrents.php?action=download&id=<?=$FlacID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="brackets">DL</a>
|
<a href="torrents.php?action=download&id=<?=$Edition['FlacID']?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
|
||||||
</span>
|
</span>
|
||||||
<?=$DisplayName?>
|
<?=$DisplayName?>
|
||||||
<?=$TorrentTags?>
|
<div class="torrent_info"><?=$ExtraInfo?></div>
|
||||||
|
<div class="tags"><?=$TorrentTags?></div>
|
||||||
</td>
|
</td>
|
||||||
<td><?=($MissingEncodings['V2 (VBR)'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
|
<td><?=isset($Edition['Formats']['V2 (VBR)'])?'<strong class="important_text_alt">YES</strong>':'<strong class="important_text">NO</strong>'?></td>
|
||||||
<td><?=($MissingEncodings['V0 (VBR)'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
|
<td><?=isset($Edition['Formats']['V0 (VBR)'])?'<strong class="important_text_alt">YES</strong>':'<strong class="important_text">NO</strong>'?></td>
|
||||||
<td><?=($MissingEncodings['320'] == 0) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>'?></td>
|
<td><?=isset($Edition['Formats']['320'])?'<strong class="important_text_alt">YES</strong>':'<strong class="important_text">NO</strong>'?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
|
@ -396,8 +396,9 @@
|
|||||||
|
|
||||||
if(count($TooLongPaths)!=0) {
|
if(count($TooLongPaths)!=0) {
|
||||||
$Names = '';
|
$Names = '';
|
||||||
foreach($TooLongPaths as $Name) {$Names .= '<br>'.$Name;}
|
foreach($TooLongPaths as $Name) {
|
||||||
/* $Err = 'The torrent contained one or more files with too long a name ('.$Name.')'; */
|
$Names .= '<br>'.$Name;
|
||||||
|
}
|
||||||
$Err = 'The torrent contained one or more files with too long a name:'.$Names;
|
$Err = 'The torrent contained one or more files with too long a name:'.$Names;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,10 +412,9 @@
|
|||||||
|
|
||||||
// The string that will make up the final torrent file
|
// The string that will make up the final torrent file
|
||||||
$TorrentText = $Tor->enc();
|
$TorrentText = $Tor->enc();
|
||||||
|
$Debug->set_flag('upload: torrent decoded');
|
||||||
|
|
||||||
// Infohash
|
// Infohash
|
||||||
|
|
||||||
$InfoHash = pack("H*", sha1($Tor->Val['info']->enc()));
|
$InfoHash = pack("H*", sha1($Tor->Val['info']->enc()));
|
||||||
$DB->query("SELECT ID FROM torrents WHERE info_hash='".db_string($InfoHash)."'");
|
$DB->query("SELECT ID FROM torrents WHERE info_hash='".db_string($InfoHash)."'");
|
||||||
if($DB->record_count()>0) {
|
if($DB->record_count()>0) {
|
||||||
@ -650,10 +650,8 @@
|
|||||||
$Cache->increment('stats_torrent_count');
|
$Cache->increment('stats_torrent_count');
|
||||||
$TorrentID = $DB->inserted_id();
|
$TorrentID = $DB->inserted_id();
|
||||||
|
|
||||||
|
|
||||||
Tracker::update_tracker('add_torrent', array('id' => $TorrentID, 'info_hash' => rawurlencode($InfoHash), 'freetorrent' => $T['FreeLeech']));
|
Tracker::update_tracker('add_torrent', array('id' => $TorrentID, 'info_hash' => rawurlencode($InfoHash), 'freetorrent' => $T['FreeLeech']));
|
||||||
|
$Debug->set_flag('upload: ocelot updated');
|
||||||
|
|
||||||
|
|
||||||
//******************************************************************************//
|
//******************************************************************************//
|
||||||
//--------------- Write torrent file -------------------------------------------//
|
//--------------- Write torrent file -------------------------------------------//
|
||||||
@ -743,7 +741,7 @@
|
|||||||
send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce :'.html_entity_decode($Announce));
|
send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce :'.html_entity_decode($Announce));
|
||||||
send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce-ssl :'.$AnnounceSSL);
|
send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce-ssl :'.$AnnounceSSL);
|
||||||
//send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce :'.html_entity_decode($Announce));
|
//send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-announce :'.html_entity_decode($Announce));
|
||||||
|
$Debug->set_flag('upload: announced on irc');
|
||||||
|
|
||||||
// Manage notifications
|
// Manage notifications
|
||||||
$UsedFormatBitrates = array();
|
$UsedFormatBitrates = array();
|
||||||
@ -890,7 +888,7 @@
|
|||||||
$SQL.=" AND UserID != '".$LoggedUser['ID']."' ";
|
$SQL.=" AND UserID != '".$LoggedUser['ID']."' ";
|
||||||
|
|
||||||
$DB->query($SQL);
|
$DB->query($SQL);
|
||||||
|
$Debug->set_flag('upload: notification query finished');
|
||||||
|
|
||||||
if($DB->record_count()>0){
|
if($DB->record_count()>0){
|
||||||
$UserArray = $DB->to_array('UserID');
|
$UserArray = $DB->to_array('UserID');
|
||||||
@ -906,7 +904,7 @@
|
|||||||
}
|
}
|
||||||
$InsertSQL.=implode(',', $Rows);
|
$InsertSQL.=implode(',', $Rows);
|
||||||
$DB->query($InsertSQL);
|
$DB->query($InsertSQL);
|
||||||
|
$Debug->set_flag('upload: notification inserts finished');
|
||||||
|
|
||||||
foreach ($FilterArray as $Filter) {
|
foreach ($FilterArray as $Filter) {
|
||||||
list($FilterID, $UserID, $Passkey) = $Filter;
|
list($FilterID, $UserID, $Passkey) = $Filter;
|
||||||
@ -924,7 +922,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Feed->populate('torrents_all',$Item);
|
$Feed->populate('torrents_all',$Item);
|
||||||
|
$Debug->set_flag('upload: notifications handled');
|
||||||
if($Type == 'Music'){
|
if($Type == 'Music'){
|
||||||
$Feed->populate('torrents_music',$Item);
|
$Feed->populate('torrents_music',$Item);
|
||||||
if($Properties['Media'] == 'Vinyl') { $Feed->populate('torrents_vinyl',$Item); }
|
if($Properties['Media'] == 'Vinyl') { $Feed->populate('torrents_vinyl',$Item); }
|
||||||
|
Loading…
Reference in New Issue
Block a user