[34] allow url posters to download on folder creation

This commit is contained in:
meisnate12 2022-09-20 10:45:09 -04:00
parent a27c8969f1
commit 4ee3c89249
2 changed files with 5 additions and 6 deletions

View file

@ -1 +1 @@
1.17.3-develop33
1.17.3-develop34

View file

@ -1155,14 +1155,13 @@ class Plex(Library):
break
if not item_asset_directory:
if self.asset_folders:
extra = ""
if self.create_asset_folders and asset_directory:
item_asset_directory = os.path.join(asset_directory[0], folder_name)
os.makedirs(item_asset_directory, exist_ok=True)
extra = f"\nAsset Directory Created: {item_asset_directory}"
raise Failed(f"Asset Warning: Unable to find asset folder: '{folder_name}{extra}'")
else:
return None, None, item_asset_directory, folder_name
logger.warning(f"Asset Warning: Asset Directory Not Found and Created: {item_asset_directory}")
else:
raise Failed(f"Asset Warning: Unable to find asset folder: '{folder_name}'")
return None, None, item_asset_directory, folder_name
poster_filter = os.path.join(item_asset_directory, f"{file_name}.*")
background_filter = os.path.join(item_asset_directory, "background.*" if file_name == "poster" else f"{file_name}_background.*")