Video has a new attribute home that is the optimal parent folder for this element.

This commit is contained in:
2018-09-16 23:38:19 +02:00
parent 3e2faadc2f
commit 16afdb4cd8
2 changed files with 11 additions and 4 deletions

View File

@@ -269,13 +269,20 @@ def scan_folder(path):
return videos
def movingToCollege(video, home_path):
video.home = home_path
def pickforgirlscouts(video):
if isinstance(video, Movie):
if video.title != None and video.year != None:
home_path = '{} ({})'.format(video.title, video.year)
movingToCollege(video, home_path)
return True
elif isinstance(video, Episode):
if video.series != None and video.season != None and video.episode != None and type(video.episode) != list:
home_path = '{} S{:02d}E{:02d}'.format(video.series, video.season, video.episode)
movingToCollege(video, home_path)
return True
return False