Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

LOG_ENABLED = False
handle = int(sys.argv[1])
RECURSIVE_SCANNING = True

# plugin modes
MODE_SCAN_SOURCE = 10
Expand Down Expand Up @@ -183,7 +184,8 @@ def walk_Path(path, walked_files, progress):
if progress.iscanceled():
return
if file['filetype'] == "directory":
walk_Path(file["file"], walked_files, progress)
if RECURSIVE_SCANNING:
walk_Path(file["file"], walked_files, progress)
elif file['filetype'] == "file":
fileCount += 1
filename = file["file"]
Expand Down Expand Up @@ -512,7 +514,7 @@ def show_source_list():
FILE_EXTENSIONS = xbmc.getSupportedMedia('video').decode('utf-8').split('|')
BLACKLISTED_EXTENSIONS = xbmcplugin.getSetting(handle, "blacklisted_file_extensions").decode('utf-8').split('|')
BLACKLIST_STRINGS = get_blacklist(xbmcplugin.getSetting(handle, "blacklist").decode('utf-8'))

RECURSIVE_SCANNING = xbmcplugin.getSetting(handle, "recursive_scanning") == "true"

# Depending on the mode do stuff
if not sys.argv[2]:
Expand Down
1 change: 1 addition & 0 deletions resources/language/english/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<string id="30013">Log Missing To</string>
<string id="30014">Blacklisted Words</string>
<string id="30015">Debug Logging</string>
<string id="30016">Recursive Scanning</string>

<string id="30105">Scanned : {0} Directories {1} Files</string>
<string id="30106">Processed : {0} Folders, {1} Files, {2} Matches</string>
Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<setting id="custom_log_enabled" type="bool" label="30012" default="false" />
<setting id="log_file_name" type="folder" label="30013" default="" />
<setting id="blacklist" type="text" label="30014" default="sample.,-trailer." />
<setting id="recursive_scanning" type="bool" label="30016" default="true" />
<setting id="blacklisted_file_extensions" type="text" label="30129" default=".bin|.dat" />
</settings>