5
5
6
6
import structlog
7
7
8
- from src .core .constants import TS_FOLDER_NAME , LibraryPrefs
8
+ from src .core .constants import TS_FOLDER_NAME
9
9
from src .core .library import Library , Entry
10
10
11
11
logger = structlog .get_logger (__name__ )
@@ -44,20 +44,6 @@ def refresh_dir(self, lib_path: Path) -> Iterator[int]:
44
44
if self .library .library_dir is None :
45
45
raise ValueError ("No library directory set." )
46
46
47
- is_exclude_list = self .library .prefs (LibraryPrefs .IS_EXCLUDE_LIST )
48
- exclude_list = set (self .library .prefs (LibraryPrefs .EXTENSION_LIST ))
49
-
50
- def skip_suffix (suffix : str ) -> bool :
51
- """Determine if the file extension should be skipped.
52
-
53
- Declared as local function as it's faster.
54
-
55
- - check if the suffix is in the library's "exclude list"
56
- - if library uses "exclude mode", and extensions is in the list, we skip
57
- - if library uses "include mode", and extensions is not in the list, we skip
58
- """
59
- return (suffix .lower () in exclude_list ) == is_exclude_list
60
-
61
47
start_time_total = time ()
62
48
start_time_loop = time ()
63
49
@@ -72,9 +58,6 @@ def skip_suffix(suffix: str) -> bool:
72
58
if "$RECYCLE.BIN" in str_path or TS_FOLDER_NAME in str_path :
73
59
continue
74
60
75
- if skip_suffix (path_item .suffix ):
76
- continue
77
-
78
61
dir_file_count += 1
79
62
relative_path = path_item .relative_to (lib_path )
80
63
# TODO - load these in batch somehow
0 commit comments