Changeset 42efc8c11f60880185380057ba338fe42db79eb9

Show
Ignore:
Timestamp:
01/02/08 00:04:40 (11 months ago)
Author:
William McBrine <wmcbrine@gmail.com>
git-committer:
William McBrine <wmcbrine@gmail.com> 1199253880 -0500
git-parent:

[72bf4739b44070a029ac4fe25d496cc897bfe466]

git-author:
William McBrine <wmcbrine@gmail.com> 1199253880 -0500
Message:

Since full pathnames are now being passed to name_sort(), the special number sorting no longer works. IMHO this is not worth working around.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugin.py

    ra0bb213 r42efc8c  
    1 import os, shutil, re, random, threading, urllib 
     1import os, shutil, random, threading, urllib 
    22from urlparse import urlparse 
    33 
     
    150150 
    151151        def name_sort(x, y): 
    152             numbername = re.compile(r'(\d*)(.*)') 
    153             m = numbername.match(x) 
    154             xNumber = m.group(1) 
    155             xStr = m.group(2) 
    156             m = numbername.match(y) 
    157             yNumber = m.group(1) 
    158             yStr = m.group(2) 
    159              
    160             if xNumber and yNumber: 
    161                 xNumber, yNumber = int(xNumber), int(yNumber) 
    162                 if xNumber == yNumber: 
    163                     return cmp(xStr, yStr) 
    164                 else: 
    165                     return cmp(xNumber, yNumber) 
    166             elif xNumber: 
    167                 return -1 
    168             elif yNumber: 
    169                 return 1 
    170             else: 
    171                 return cmp(xStr, yStr) 
     152            return cmp(x, y) 
    172153 
    173154        if query.get('SortOrder',['Normal'])[0] == 'Random':