Add sorting options for Production Year and Critic Rating; remove Date Created sorting
This commit is contained in:
@@ -281,7 +281,8 @@
|
||||
<option value="Random">Random</option>
|
||||
<option value="Original">Original (Custom List Order)</option>
|
||||
<option value="PremiereDate">Premiere Date</option>
|
||||
<option value="DateCreated">Date Created</option>
|
||||
<option value="ProductionYear">Production Year</option>
|
||||
<option value="CriticRating">Critic Rating</option>
|
||||
<option value="CommunityRating">Community Rating</option>
|
||||
<option value="Name">Name</option>
|
||||
<option value="Runtime">Runtime</option>
|
||||
|
||||
@@ -484,14 +484,18 @@ const SlideUtils = {
|
||||
let valA, valB;
|
||||
|
||||
switch (sortBy) {
|
||||
case 'DateCreated':
|
||||
valA = new Date(a.DateCreated).getTime();
|
||||
valB = new Date(b.DateCreated).getTime();
|
||||
break;
|
||||
case 'PremiereDate':
|
||||
valA = new Date(a.PremiereDate).getTime();
|
||||
valB = new Date(b.PremiereDate).getTime();
|
||||
break;
|
||||
case 'ProductionYear':
|
||||
valA = a.ProductionYear || 0;
|
||||
valB = b.ProductionYear || 0;
|
||||
break;
|
||||
case 'CriticRating':
|
||||
valA = a.CriticRating || 0;
|
||||
valB = b.CriticRating || 0;
|
||||
break;
|
||||
case 'CommunityRating':
|
||||
valA = a.CommunityRating || 0;
|
||||
valB = b.CommunityRating || 0;
|
||||
|
||||
Reference in New Issue
Block a user