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