Will iterate over all files until all have a files have sufficient info.
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/cli.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/cli.py
									
									
									
									
									
								
							| @@ -4,14 +4,22 @@ from core import scan_folder, moveHome | |||||||
| from video import Video | from video import Video | ||||||
| from guessit import guessit | from guessit import guessit | ||||||
|  |  | ||||||
|  | from exceptions import InsufficientInfoError | ||||||
|  |  | ||||||
| videos, insufficient_info = scan_folder('Spider.Man') | videos, insufficient_info = scan_folder('Spider.Man') | ||||||
| print('Sweet lemonade: {} {}'.format(videos, insufficient_info)) | print('Sweet lemonade: {} {}'.format(videos, insufficient_info)) | ||||||
|  |  | ||||||
| for video in videos: | for video in videos: | ||||||
|     moveHome(video) |     moveHome(video) | ||||||
|  |  | ||||||
| for file in insufficient_info: | while len(insufficient_info) > 1: | ||||||
|  |     for file in insufficient_info: | ||||||
|         supplementary_info = input("Insufficient info for match file: '{}'\nSupplementary info: ".format(file))  |         supplementary_info = input("Insufficient info for match file: '{}'\nSupplementary info: ".format(file))  | ||||||
|         print(supplementary_info) |         print(supplementary_info) | ||||||
|  |         try: | ||||||
|             video = Video.fromguess(file, guessit(supplementary_info)) |             video = Video.fromguess(file, guessit(supplementary_info)) | ||||||
|  |             insufficient_info.pop() | ||||||
|  |         except InsufficientInfoError: | ||||||
|  |             pass | ||||||
|  |              | ||||||
|         moveHome(video) |         moveHome(video) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user