debenoldert 5 年之前
父节点
当前提交
8a9fd224cd
共有 5 个文件被更改,包括 5 次插入6 次删除
  1. 2 1
      command/help.py
  2. 1 0
      command/last.py
  3. 0 1
      command/search.py
  4. 0 2
      helper/console.py
  5. 2 2
      helper/sites/itemsort.py

+ 2 - 1
command/help.py

@@ -1,8 +1,9 @@
+import command
 from helper import console
 
 
 def help():
     console.output('Possible commands are:')
-    for comm in commands:
+    for comm in command.commands:
         console.output('{0}\t{1}'.format(comm[0], comm[2]))
     return True

+ 1 - 0
command/last.py

@@ -1,3 +1,4 @@
+from command import search
 from helper import console
 
 

+ 0 - 1
command/search.py

@@ -1,5 +1,4 @@
 import sites
-from command import last
 from helper import console
 from main import selected_site
 from helper.sites import itemsort

+ 0 - 2
helper/console.py

@@ -66,10 +66,8 @@ def option_picker(question, options, objects=None, selected=None, quit=False, ta
         if objects is not None and table is not None and len(objects) == len(table):
             for j in range(0, len(objects)):
                 _row += '[{{{name}:{size}.{size}}}]'.format(name=str(objects[j]), size=str(table[j][1]))
-                # _row += '[{' + str(objects[j]) + ':' + str(table[j][1]) + '.' + str(table[j][1]) + '}] '
 
             output(_row.format(__id__=str(i), x=option))
-            # output(_row.format(__id__=str(i), x=dict(map(lambda s: s if s is not None else '', option.__dict__.items()))).strip())
 
         else:
             if i == selected:

+ 2 - 2
helper/sites/itemsort.py

@@ -14,7 +14,7 @@ def smart(items, criteria):
 
         # First do negative stuff, bad news comes always first
 
-        if item.duration_seconds is not None and item.duration_seconds < 150:
+        if item.duration_seconds is not None and item.duration_seconds < 180:
             item.decrement_score(0.5)
 
         if item.duration_seconds is not None and item.duration_seconds > 600:
@@ -54,7 +54,7 @@ def smart(items, criteria):
         if item.score > 0:
             sortedlist.append(item)
         else:
-            console.output('Removing {x.artist} - {x.title} from list: Score to low'.format(x=item), console.DBG_INFO)
+            console.output('Removing {x.artist} - {x.title} from list: Score to low ({x.score})'.format(x=item), console.DBG_INFO)
 
     sortedlist.sort(reverse=True, key=lambda x: (x.score, x.duration_seconds))