From 5be6bb980ebe58f3d19dc14f80901c9e23bba19b Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 8 Oct 2012 18:35:28 +0200 Subject: [PATCH] add 'missing files' warning --- pandoraclient | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandoraclient b/pandoraclient index 47c1440..5625885 100755 --- a/pandoraclient +++ b/pandoraclient @@ -73,6 +73,7 @@ def organize(): 'empty directories': [], 'incorrect filenames': [], 'incorrect filenames (target exists)': [], + 'missing files': [], 'missing subtitles': [], 'missing video': [], 'multiple versions': [], @@ -118,8 +119,12 @@ def organize(): files_by_hash[file['hash']].append(file) elif not parts[3] in ['Extras', 'Versions']: issues['unexpected directories'].append(path) - if not dirnames and (not filenames or not filter(lambda x: not is_system_file(x), filenames)): - issues['empty directories'].append(relative_path) + # empty directories, missing files + if not filenames or not filter(lambda x: not is_system_file(x), filenames): + if not dirnames: + issues['empty directories'].append(relative_path) + elif len(relative_path.split('/')) == 3: + issues['missing files'].append(relative_path) print 'Scanning for duplicates' for hash in files_by_hash: @@ -233,6 +238,7 @@ def organize(): ], 'resolve': [ 'duplicate files', + 'missing files', 'missing subtitles', 'missing video', 'multiple versions',