Mixed merge conflict.
This commit is contained in:
18
src/core.py
18
src/core.py
@@ -136,7 +136,6 @@ def scan_videos(path):
|
|||||||
|
|
||||||
# scan for videos
|
# scan for videos
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
# filter on videos and archives
|
|
||||||
if not (filename.endswith(VIDEO_EXTENSIONS)):
|
if not (filename.endswith(VIDEO_EXTENSIONS)):
|
||||||
logging.debug('Skipping non-video file %s', filename)
|
logging.debug('Skipping non-video file %s', filename)
|
||||||
continue
|
continue
|
||||||
@@ -149,7 +148,6 @@ def scan_videos(path):
|
|||||||
# reconstruct the file path
|
# reconstruct the file path
|
||||||
filepath = os.path.join(dirpath, filename)
|
filepath = os.path.join(dirpath, filename)
|
||||||
|
|
||||||
# skip links
|
|
||||||
if os.path.islink(filepath):
|
if os.path.islink(filepath):
|
||||||
logging.debug('Skipping link %r in %r', filename, dirpath)
|
logging.debug('Skipping link %r in %r', filename, dirpath)
|
||||||
continue
|
continue
|
||||||
@@ -279,14 +277,27 @@ def pickforgirlscouts(video):
|
|||||||
if isinstance(video, Movie):
|
if isinstance(video, Movie):
|
||||||
if video.title != None and video.year != None:
|
if video.title != None and video.year != None:
|
||||||
home_path = '{} ({})'.format(video.title, video.year)
|
home_path = '{} ({})'.format(video.title, video.year)
|
||||||
|
try:
|
||||||
movingToCollege(video, home_path)
|
movingToCollege(video, home_path)
|
||||||
return True
|
return True
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
elif isinstance(video, Episode):
|
elif isinstance(video, Episode):
|
||||||
if video.series != None and video.season != None and video.episode != None and type(video.episode) != list:
|
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))
|
home_path = '{} S{}E{}'.format(str(video.series), str(video.season), str(video.episode))
|
||||||
movingToCollege(video, home_path)
|
movingToCollege(video, home_path)
|
||||||
return True
|
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
|
return False
|
||||||
|
|
||||||
@@ -298,8 +309,7 @@ def main():
|
|||||||
scout = []
|
scout = []
|
||||||
civilian = []
|
civilian = []
|
||||||
for video in videos:
|
for video in videos:
|
||||||
sortingHat = pickforgirlscouts(video)
|
if pickforgirlscouts(video):
|
||||||
if sortingHat:
|
|
||||||
scout.append(video)
|
scout.append(video)
|
||||||
else:
|
else:
|
||||||
civilian.append(video)
|
civilian.append(video)
|
||||||
|
|||||||
Reference in New Issue
Block a user