Changeset 12727


Ignore:
Timestamp:
Aug 24, 2011, 7:20:22 PM (10 years ago)
Author:
jordan
Message:

(trunk web) when sorting by ratio, use tr_stat.ratio rather than deriving it ourselves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/torrent.js

    r12716 r12727  
    391391Torrent.compareByRatio = function(ta, tb)
    392392{
    393         var a = Math.ratio(ta.getUploadedEver(), ta.getDownloadedEver());
    394         var b = Math.ratio(tb.getUploadedEver(), tb.getDownloadedEver());
    395         return (a - b) || Torrent.compareByState(ta, tb);
     393        var a = ta.getUploadRatio();
     394        var b = tb.getUploadRatio();
     395        if (a < b) return 1;
     396        if (a > b) return -1;
     397        return Torrent.compareByState(ta, tb);
    396398};
    397399Torrent.compareByProgress = function(ta, tb)
Note: See TracChangeset for help on using the changeset viewer.