Battle video rankings are now sorted by Hype.

Resolves #91.
This commit is contained in:
Greg Edwards 2022-07-07 00:43:30 -04:00
parent 384f8e41b3
commit b8e895cdeb
2 changed files with 10 additions and 8 deletions

View File

@ -2572,14 +2572,13 @@ namespace PkmnFoundations.Data
}
else if (ranking == BattleVideoRankings4.Colosseum)
{
// todo: sort by .. something.
where = " WHERE Metagame BETWEEN 0 AND 14";
sort = " ORDER BY Streak DESC, TimeAdded DESC, id DESC";
sort = " ORDER BY Hype DESC, TimeAdded DESC, id DESC";
}
else if (ranking == BattleVideoRankings4.BattleFrontier)
{
where = " WHERE NOT (Metagame BETWEEN 0 AND 14)";
sort = " ORDER BY Streak DESC, TimeAdded DESC, id DESC";
sort = " ORDER BY Hype DESC, TimeAdded DESC, id DESC";
}
else
{
@ -3300,14 +3299,13 @@ namespace PkmnFoundations.Data
}
else if (ranking == BattleVideoRankings5.LinkBattles)
{
// todo: sort by .. something.
where = " WHERE NOT (Metagame BETWEEN 0 AND 4)";
sort = " ORDER BY Streak DESC, TimeAdded DESC, id DESC";
sort = " ORDER BY Hype DESC, TimeAdded DESC, id DESC";
}
else if (ranking == BattleVideoRankings5.SubwayBattles)
{
where = " WHERE Metagame BETWEEN 0 AND 4";
sort = " ORDER BY Streak DESC, TimeAdded DESC, id DESC";
sort = " ORDER BY Hype DESC, TimeAdded DESC, id DESC";
}
else
{

View File

@ -1007,7 +1007,9 @@ CREATE TABLE IF NOT EXISTS `TerminalBattleVideos4` (
KEY `Metagame` (`Metagame`),
KEY `pid` (`pid`),
KEY `Country` (`Country`,`Region`),
KEY `md5` (`md5`)
KEY `md5` (`md5`),
KEY `Hype` (`Hype`),
KEY `HypeTimestamp` (`HypeTimestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.
@ -1037,7 +1039,9 @@ CREATE TABLE IF NOT EXISTS `TerminalBattleVideos5` (
KEY `Metagame` (`Metagame`),
KEY `pid` (`pid`),
KEY `Country` (`Country`,`Region`),
KEY `md5` (`md5`)
KEY `md5` (`md5`),
KEY `Hype` (`Hype`),
KEY `HypeTimestamp` (`HypeTimestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Data exporting was unselected.