From 329733712681a0bcf9b18c01e23b2096a8285be8 Mon Sep 17 00:00:00 2001 From: John Furrow Date: Sun, 8 Nov 2015 22:25:51 -0800 Subject: [PATCH] Fix ETA sorting --- client/source/scripts/components/action-bar/SortDropdown.js | 2 +- server/models/FormatUtil.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/source/scripts/components/action-bar/SortDropdown.js b/client/source/scripts/components/action-bar/SortDropdown.js index c310ace9..8c0f2dc4 100644 --- a/client/source/scripts/components/action-bar/SortDropdown.js +++ b/client/source/scripts/components/action-bar/SortDropdown.js @@ -53,7 +53,7 @@ export default class SortDropdown extends React.Component { }, { displayName: 'ETA', - property: 'seconds' + property: 'eta' }, { displayName: 'Download Speed', diff --git a/server/models/FormatUtil.js b/server/models/FormatUtil.js index 041031ca..b7cc9473 100644 --- a/server/models/FormatUtil.js +++ b/server/models/FormatUtil.js @@ -13,7 +13,7 @@ var FormatUtil = { var days = Math.floor(((seconds % 31536000) % 604800) / 86400); var hours = Math.floor((((seconds % 31536000) % 604800) % 86400) / 3600); var minutes = Math.floor(((((seconds % 31536000) % 604800) % 86400) % 3600) / 60); - var wholeSeconds = Math.floor((((((seconds % 31536000) % 604800) % 86400) % 3600) % 60) / 60); + var wholeSeconds = Math.floor(seconds); var timeRemaining = {};