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',