diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php
index 59c8cea7..9d882858 100644
--- a/classes/class_torrent_form.php
+++ b/classes/class_torrent_form.php
@@ -226,6 +226,7 @@ function music_form($GenreTags) {
+
[+] [-]
diff --git a/gazelle.sql b/gazelle.sql
index c046d71b..6eaa406f 100644
--- a/gazelle.sql
+++ b/gazelle.sql
@@ -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`),
diff --git a/sections/ajax/artist.php b/sections/ajax/artist.php
index 9b7ec306..8a56c1fd 100644
--- a/sections/ajax/artist.php
+++ b/sections/ajax/artist.php
@@ -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 .= ' [Fix]';
}
- 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; }
diff --git a/sections/ajax/request.php b/sections/ajax/request.php
index 626bb912..37810378 100644
--- a/sections/ajax/request.php
+++ b/sections/ajax/request.php
@@ -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])
);
}
diff --git a/sections/ajax/torrentgroup.php b/sections/ajax/torrentgroup.php
index 1b89fd6d..b44b6588 100644
--- a/sections/ajax/torrentgroup.php
+++ b/sections/ajax/torrentgroup.php
@@ -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) {
diff --git a/sections/artist/artist.php b/sections/artist/artist.php
index bc10e9f5..5358512e 100644
--- a/sections/artist/artist.php
+++ b/sections/artist/artist.php
@@ -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]);
diff --git a/sections/requests/new_edit.php b/sections/requests/new_edit.php
index 37c3bb3e..34b1f3a1 100644
--- a/sections/requests/new_edit.php
+++ b/sections/requests/new_edit.php
@@ -168,6 +168,7 @@
+
[+] [-] } $First = false;?>
diff --git a/sections/requests/request.php b/sections/requests/request.php
index 96f835ab..bdb25955 100644
--- a/sections/requests/request.php
+++ b/sections/requests/request.php
@@ -175,6 +175,17 @@
?>