Commits

Nekmo committed e57b573

Solucionada errata en make_elements al no importar gettext, y añadido recursividad en el patrón regex de los directorios

  • Participants
  • Parent commits a5b0d58

Comments (0)

Files changed (2)

File nekomuk/make_elements.py

 import sys
 from lxml.builder import E
 from lxml import etree
+from gettext import gettext as _
 from . filesize import str_size
 from . get_file_info import get_video_info, get_dir_info
 from . render_html import render_html

File nekomuk/search.py

         device = device['path']
     root_path = os.path.join(device, path)
     last_t = int(time.time())
+    ignore_dirs = []
     for root, dirs, files in os.walk(root_path):
         if filter_dir and not re.match(filter_dir, os.path.split(root)[1]):
+            ignore_dirs.append(root)
             continue
+        for ignore_dir in ignore_dirs:
+            if root.startswith(ignore_dir): continue
         total_size = 0
         root_ = root.replace(root_path, '', 1)
         for file in files: