Skip to content
Snippets Groups Projects
Unverified Commit b1663dd5 authored by Lesmiscore's avatar Lesmiscore
Browse files

__init__ (--rm-long-name-dir): allow specifying paths to delete, if requested

parent c2d92fab
No related branches found
Tags 1651731664
No related merge requests found
......@@ -98,7 +98,10 @@ def print_extractor_information(opts, urls):
table = [[mso_id, mso_info['name']] for mso_id, mso_info in MSO_INFO.items()]
write_string('Supported TV Providers:\n' + render_table(['mso', 'mso name'], table) + '\n', out=sys.stdout)
elif opts.rm_longnamedir:
for dirpath, _, _ in os.walk(os.getcwd(), topdown=False):
if not urls:
urls = [os.getcwd()]
walker = (x for y in urls for x in os.walk(y, topdown=False))
for dirpath, _, _ in walker:
if not dirpath.endswith(DEFAULT_DELIMITER):
continue
if os.listdir(dirpath):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment