This commit is contained in:
meisnate12 2021-03-05 11:05:06 -05:00
parent acc7d86561
commit bc855df6ab

View file

@ -813,7 +813,7 @@ class CollectionBuilder:
dirs = [folder for folder in os.listdir(path) if os.path.isdir(os.path.join(path, folder))] dirs = [folder for folder in os.listdir(path) if os.path.isdir(os.path.join(path, folder))]
if len(dirs) > 0: if len(dirs) > 0:
for item in collection.items(): for item in collection.items():
folder = os.path.basename(os.path.dirname(item.locations[0])) folder = os.path.basename(os.path.dirname(item.locations[0]) if self.library.is_movie else item.locations[0])
if folder in dirs: if folder in dirs:
matches = glob.glob(os.path.join(path, folder, "poster.*")) matches = glob.glob(os.path.join(path, folder, "poster.*"))
poster_path = os.path.abspath(matches[0]) if len(matches) > 0 else None poster_path = os.path.abspath(matches[0]) if len(matches) > 0 else None