mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
30636f6b85
commit
f741915024
@ -226,6 +226,7 @@ function music_form($GenreTags) {
|
||||
<option value="5">Conductor</option>
|
||||
<option value="6">DJ / Compiler</option>
|
||||
<option value="3">Remixer</option>
|
||||
<option value="7">Producer</option>
|
||||
</select>
|
||||
[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>]
|
||||
<?
|
||||
|
@ -896,7 +896,7 @@ CREATE TABLE `torrents_artists` (
|
||||
`ArtistID` int(10) NOT NULL,
|
||||
`AliasID` int(10) NOT NULL,
|
||||
`UserID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Importance` enum('1','2','3','4','5','6') DEFAULT NULL,
|
||||
`Importance` enum('1','2','3','4','5','6','7') DEFAULT NULL,
|
||||
PRIMARY KEY (`GroupID`,`AliasID`),
|
||||
KEY `ArtistID` (`ArtistID`),
|
||||
KEY `AliasID` (`AliasID`),
|
||||
|
@ -113,7 +113,8 @@ function compare($X, $Y){
|
||||
FROM torrents_artists AS ta
|
||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
||||
WHERE ta.ArtistID='$ArtistID'
|
||||
ORDER BY ta.Importance, tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC");
|
||||
ORDER BY IF(ta.Importance IN ('2', '3', '4', '7'),ta.Importance, 1),
|
||||
tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC");
|
||||
|
||||
$GroupIDs = $DB->collect('GroupID');
|
||||
$Importances = $DB->to_array('GroupID', MYSQLI_BOTH, false);
|
||||
@ -137,6 +138,14 @@ function compare($X, $Y){
|
||||
$TorrentList[$GroupID]['ReleaseType'] = 1023;
|
||||
$RemixerAlbums = true;
|
||||
}
|
||||
if($Importances[$GroupID]['Importance'] == '4') {
|
||||
$TorrentList[$GroupID]['ReleaseType'] = 1022;
|
||||
$ComposerAlbums = true;
|
||||
}
|
||||
if($Importances[$GroupID]['Importance'] == '7') {
|
||||
$TorrentList[$GroupID]['ReleaseType'] = 1021;
|
||||
$ProducerAlbums = true;
|
||||
}
|
||||
if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) {
|
||||
$UsedReleases[] = $TorrentList[$GroupID]['ReleaseType'];
|
||||
}
|
||||
@ -148,13 +157,18 @@ function compare($X, $Y){
|
||||
if(!empty($RemixerAlbums)) {
|
||||
$ReleaseTypes[1023] = "Remixed By";
|
||||
}
|
||||
|
||||
if(!empty($ComposerAlbums)) {
|
||||
$ReleaseTypes[1022] = "Composition";
|
||||
}
|
||||
if(!empty($ProducerAlbums)) {
|
||||
$ReleaseTypes[1021] = "Produced By";
|
||||
}
|
||||
|
||||
reset($TorrentList);
|
||||
|
||||
$JsonTorrents = array();
|
||||
foreach ($TorrentList as $GroupID=>$Group) {
|
||||
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
|
||||
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Group);
|
||||
$GroupVanityHouse = $Importances[$GroupID]['VanityHouse'];
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$TagList));
|
||||
@ -175,8 +189,33 @@ function compare($X, $Y){
|
||||
$DisplayName .= ' [<a href="torrents.php?action=fix_group&groupid='.$GroupID.'&artistid='.$ArtistID.'&auth='.$LoggedUser['AuthKey'].'">Fix</a>]';
|
||||
}
|
||||
|
||||
if (($ReleaseType == 1023) || ($ReleaseType == 1024)) {
|
||||
$DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName;
|
||||
switch($ReleaseType){
|
||||
case 1023: // Remixes, DJ Mixes, Guest artists, and Producers need the artist name
|
||||
case 1024:
|
||||
case 1021:
|
||||
case 8:
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
$DisplayName = display_artists($ExtendedArtists).$DisplayName;
|
||||
} elseif(count($GroupArtists)>0) {
|
||||
$DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName;
|
||||
}
|
||||
break;
|
||||
case 1022: // Show performers on composer pages
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) {
|
||||
unset($ExtendedArtists[4]);
|
||||
unset($ExtendedArtists[3]);
|
||||
unset($ExtendedArtists[6]);
|
||||
$DisplayName = display_artists($ExtendedArtists).$DisplayName;
|
||||
} elseif(count($GroupArtists)>0) {
|
||||
$DisplayName = display_artists(array(1 => $Artists), true, true).$DisplayName;
|
||||
}
|
||||
break;
|
||||
default: // Show composers otherwise
|
||||
if (!empty($ExtendedArtists[4])) {
|
||||
$DisplayName = display_artists(array(4 => $ExtendedArtists[4]), true, true).$DisplayName;
|
||||
}
|
||||
}
|
||||
|
||||
if($GroupYear>0) { $DisplayName = $GroupYear. ' - '.$DisplayName; }
|
||||
|
@ -115,7 +115,8 @@
|
||||
'artists' => $ArtistForm[1] == null ? array() : pullmediainfo($ArtistForm[1]),
|
||||
'with' => $ArtistForm[2] == null ? array() : pullmediainfo($ArtistForm[2]),
|
||||
'conductor' => $ArtistForm[5] == null ? array() : pullmediainfo($ArtistForm[5]),
|
||||
'remixedBy' => $ArtistForm[3] == null ? array() : pullmediainfo($ArtistForm[3])
|
||||
'remixedBy' => $ArtistForm[3] == null ? array() : pullmediainfo($ArtistForm[3]),
|
||||
'producer' => $ArtistForm[7] == null ? array() : pullmediainfo($ArtistForm[7])
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@ function filter_by_key($input, $keys) { return array_intersect_key($input, array
|
||||
'categoryId' => (int) $TorrentDetails['CategoryID'],
|
||||
'time' => $TorrentDetails['Time'],
|
||||
'vanityHouse' => $TorrentDetails['VanityHouse'] == 1,
|
||||
'artists' => get_artist($GroupID),
|
||||
);
|
||||
$TorrentList = array();
|
||||
foreach ($TorrentCache[1] as $Torrent) {
|
||||
|
@ -106,7 +106,7 @@ function compare($X, $Y){
|
||||
FROM torrents_artists AS ta
|
||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
||||
WHERE ta.ArtistID='$ArtistID'
|
||||
ORDER BY IF(ta.Importance = '2' OR ta.Importance = '3' OR ta.Importance = '4',ta.Importance, 1),
|
||||
ORDER BY IF(ta.Importance IN ('2', '3', '4', '7'),ta.Importance, 1),
|
||||
tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC");
|
||||
|
||||
$GroupIDs = $DB->collect('GroupID');
|
||||
@ -141,6 +141,10 @@ function compare($X, $Y){
|
||||
$TorrentList[$GroupID]['ReleaseType'] = 1022;
|
||||
$ComposerAlbums = true;
|
||||
}
|
||||
if($Importances[$GroupID]['Importance'] == '7') {
|
||||
$TorrentList[$GroupID]['ReleaseType'] = 1021;
|
||||
$ProducerAlbums = true;
|
||||
}
|
||||
if(!in_array($TorrentList[$GroupID]['ReleaseType'], $UsedReleases)) {
|
||||
$UsedReleases[] = $TorrentList[$GroupID]['ReleaseType'];
|
||||
}
|
||||
@ -155,6 +159,9 @@ function compare($X, $Y){
|
||||
if(!empty($ComposerAlbums)) {
|
||||
$ReleaseTypes[1022] = "Composition";
|
||||
}
|
||||
if(!empty($ProducerAlbums)) {
|
||||
$ReleaseTypes[1021] = "Produced By";
|
||||
}
|
||||
|
||||
|
||||
reset($TorrentList);
|
||||
@ -270,8 +277,9 @@ function compare($X, $Y){
|
||||
|
||||
|
||||
switch($ReleaseType){
|
||||
case 1023: // Remixes, DJ Mixes, and Guest artists need the artist name
|
||||
case 1023: // Remixes, DJ Mixes, Guest artists, and Producers need the artist name
|
||||
case 1024:
|
||||
case 1021:
|
||||
case 8:
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
||||
unset($ExtendedArtists[2]);
|
||||
|
@ -168,6 +168,7 @@
|
||||
<option value="5"<?=($Importance == '5' ? ' selected="selected"' : '')?>>Conductor</option>
|
||||
<option value="6"<?=($Importance == '6' ? ' selected="selected"' : '')?>>DJ / Compiler</option>
|
||||
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
|
||||
<option value="3"<?=($Importance == '7' ? ' selected="selected"' : '')?>>Producer</option>
|
||||
</select>
|
||||
<?if($First) { ?>[<a href="#" onclick="AddArtistField();return false;">+</a>] [<a href="#" onclick="RemoveArtistField();return false;">-</a>] <? } $First = false;?>
|
||||
<br />
|
||||
|
@ -175,6 +175,17 @@
|
||||
?>
|
||||
<li class="artists_remix"><strong>Remixed by:</strong></li>
|
||||
<? foreach($ArtistForm[3] as $Artist) {
|
||||
?>
|
||||
<li class="artists_remix">
|
||||
<?=display_artist($Artist)?>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if(!empty($ArtistForm[7]) && count($ArtistForm[7]) > 0) {
|
||||
?>
|
||||
<li class="artists_producer"><strong>Produced by:</strong></li>
|
||||
<? foreach($ArtistForm[7] as $Artist) {
|
||||
?>
|
||||
<li class="artists_remix">
|
||||
<?=display_artist($Artist)?>
|
||||
|
@ -16,7 +16,7 @@
|
||||
$AliasName = normalise_artist_name($AliasNames[$i]);
|
||||
$Importance = $Importances[$i];
|
||||
|
||||
if($Importance!='1' && $Importance!='2' && $Importance!='3' && $Importance!='4' && $Importance!='5' && $Importance!='6') {
|
||||
if($Importance!='1' && $Importance!='2' && $Importance!='3' && $Importance!='4' && $Importance!='5' && $Importance!='6' && $Importance!='7') {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -252,6 +252,26 @@ function compare($X, $Y){
|
||||
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
|
||||
<? } ?>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if (!empty($Artists[7]) && count($Artists[7]) > 0) {
|
||||
print ' <li class="artists_procuder"><strong>Produced By:</strong></li>';
|
||||
foreach($Artists[7] as $Artist) {
|
||||
?>
|
||||
<li class="artists_producer">
|
||||
<?=display_artist($Artist).'‎'?>
|
||||
<? if(check_perms('torrents_edit')){
|
||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
||||
list($AliasID) = $DB->next_record();
|
||||
if (empty($AliasID)) {
|
||||
$AliasID = $Artist['id'];
|
||||
}
|
||||
?>
|
||||
(<?=$AliasID?>)
|
||||
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>');this.parentNode.parentNode.style.display = 'none';">[X]</a></span>
|
||||
<? } ?>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
}
|
||||
@ -276,6 +296,7 @@ function compare($X, $Y){
|
||||
<option value="5">Conductor</option>
|
||||
<option value="6">DJ / Compiler</option>
|
||||
<option value="3">Remixer</option>
|
||||
<option value="7">Producer</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="submit" value="Add" />
|
||||
|
@ -176,7 +176,7 @@ function AddArtistField() {
|
||||
x.appendChild(document.createTextNode(' '));
|
||||
var Importance = document.createElement("select");
|
||||
Importance.name = "importance[]";
|
||||
Importance.innerHTML = '<option value="1">Main</option><option value="2">Guest</option><option value="4">Composer</option><option value="5">Conductor</option><option value="6">DJ / Compiler</option><option value="3">Remixer</option>';
|
||||
Importance.innerHTML = '<option value="1">Main</option><option value="2">Guest</option><option value="4">Composer</option><option value="5">Conductor</option><option value="6">DJ / Compiler</option><option value="3">Remixer</option><option value="7">Producer</option>';
|
||||
x.appendChild(Importance);
|
||||
ArtistFieldCount++;
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ function AddArtistField() {
|
||||
ImportanceField.options[3] = new Option("Conductor", "5");
|
||||
ImportanceField.options[4] = new Option("DJ / Compiler", "6");
|
||||
ImportanceField.options[5] = new Option("Remixer", "3");
|
||||
ImportanceField.options[6] = new Option("Producer", "7");
|
||||
|
||||
var x = $('#artistfields').raw();
|
||||
x.appendChild(document.createElement("br"));
|
||||
|
@ -54,6 +54,9 @@ function ArtistManager() {
|
||||
case 'artists_dj':
|
||||
importance = 6;
|
||||
break;
|
||||
case 'artists_producer':
|
||||
importance = 7;
|
||||
break;
|
||||
}
|
||||
if(elArtistList.children[i].children[0].tagName.toUpperCase() == 'A') {
|
||||
var ArtistID = elArtistList.children[i].children[0].href.match(/[?&]id=(\d+)/)[1];
|
||||
@ -129,6 +132,10 @@ function ArtistManager() {
|
||||
elOpt.value = 3;
|
||||
elOpt.innerHTML = 'Remixer';
|
||||
elImportance.appendChild(elOpt);
|
||||
elOpt = document.createElement('option');
|
||||
elOpt.value = 7;
|
||||
elOpt.innerHTML = 'Producer';
|
||||
elImportance.appendChild(elOpt);
|
||||
elSubmitDiv.appendChild(elImportance);
|
||||
elSubmitDiv.appendChild(document.createTextNode(' '));
|
||||
|
||||
|
@ -195,6 +195,7 @@ function AddArtistField() {
|
||||
ImportanceField.options[3] = new Option("Conductor", "5");
|
||||
ImportanceField.options[4] = new Option("DJ / Compiler", "6");
|
||||
ImportanceField.options[5] = new Option("Remixer", "3");
|
||||
ImportanceField.options[6] = new Option("Producer", "7");
|
||||
|
||||
var x = $('#artistfields').raw();
|
||||
x.appendChild(document.createElement("br"));
|
||||
|
Loading…
Reference in New Issue
Block a user