Mixed merge conflict.

This commit is contained in:
2018-09-20 23:27:57 +02:00

View File

@@ -136,7 +136,6 @@ def scan_videos(path):
# scan for videos
for filename in filenames:
# filter on videos and archives
if not (filename.endswith(VIDEO_EXTENSIONS)):
logging.debug('Skipping non-video file %s', filename)
continue
@@ -149,7 +148,6 @@ def scan_videos(path):
# reconstruct the file path
filepath = os.path.join(dirpath, filename)
# skip links
if os.path.islink(filepath):
logging.debug('Skipping link %r in %r', filename, dirpath)
continue
@@ -279,14 +277,27 @@ 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
try:
movingToCollege(video, home_path)
return True
except:
return False
elif isinstance(video, Episode):
if video.series != None and video.season != None and video.episode != None and type(video.episode) != list:
<<<<<<< HEAD
home_path = '{} S{}E{}'.format(str(video.series), str(video.season), str(video.episode))
movingToCollege(video, home_path)
return True
=======
# Handle the list problems
home_path = '{} S{:02d}E{:02d}'.format(str(video.series), str(video.season), str(video.episode))
try:
movingToCollege(video, home_path)
return True
except:
return False
>>>>>>> 916ce45fecb6d2b9edbed0a408ea1a16b7d85d0b
return False
@@ -298,8 +309,7 @@ def main():
scout = []
civilian = []
for video in videos:
sortingHat = pickforgirlscouts(video)
if sortingHat:
if pickforgirlscouts(video):
scout.append(video)
else:
civilian.append(video)