]> git.llucax.com Git - software/subdivxget.git/blobdiff - subdivxget
Don't sort subs inside subdivx_get_subs()
[software/subdivxget.git] / subdivxget
index 954b80a641a5e11cc3ce017eb4ecf87e7e1b9d64..5d467ec1c209476bcb245c5d3de36b3a93bc99d9 100755 (executable)
@@ -202,7 +202,7 @@ def subdivx_get_subs(query_str):
                subs.extend(parser.subs)
                page_number += 1
 
                subs.extend(parser.subs)
                page_number += 1
 
-       return sorted(subs, key=lambda s: int(s['downloads']), reverse=True)
+       return subs
 
 
 def get_subs(query_str, filters):
 
 
 def get_subs(query_str, filters):
@@ -212,6 +212,7 @@ def get_subs(query_str, filters):
 
        subs = subdivx_get_subs(query_str)
        subs = filter_subtitles(subs, filters)
 
        subs = subdivx_get_subs(query_str)
        subs = filter_subtitles(subs, filters)
+       subs.sort(key=lambda s: int(s['downloads']), reverse=True)
 
        for sub in subs:
                print('''\
 
        for sub in subs:
                print('''\