|
|
@ -1084,11 +1084,11 @@ class Plex(Library):
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
return asset_location, folder_name, updated
|
|
|
|
return asset_location, folder_name, updated
|
|
|
|
|
|
|
|
|
|
|
|
def find_and_upload_assets(self, item, current_labels):
|
|
|
|
def find_and_upload_assets(self, item, current_labels, asset_directory=None):
|
|
|
|
item_dir = None
|
|
|
|
item_dir = None
|
|
|
|
name = None
|
|
|
|
name = None
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
poster, background, item_dir, name = self.find_item_assets(item)
|
|
|
|
poster, background, item_dir, name = self.find_item_assets(item, asset_directory=asset_directory)
|
|
|
|
if "Overlay" not in current_labels:
|
|
|
|
if "Overlay" not in current_labels:
|
|
|
|
if poster or background:
|
|
|
|
if poster or background:
|
|
|
|
self.upload_images(item, poster=poster, background=background)
|
|
|
|
self.upload_images(item, poster=poster, background=background)
|
|
|
@ -1106,7 +1106,7 @@ class Plex(Library):
|
|
|
|
found_episode = False
|
|
|
|
found_episode = False
|
|
|
|
for season in self.query(item.seasons):
|
|
|
|
for season in self.query(item.seasons):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
season_poster, season_background, _, _ = self.find_item_assets(season, item_asset_directory=item_dir, folder_name=name)
|
|
|
|
season_poster, season_background, _, _ = self.find_item_assets(season, item_asset_directory=item_dir, asset_directory=asset_directory, folder_name=name)
|
|
|
|
if season_poster:
|
|
|
|
if season_poster:
|
|
|
|
found_season = True
|
|
|
|
found_season = True
|
|
|
|
elif self.show_missing_season_assets and season.seasonNumber > 0:
|
|
|
|
elif self.show_missing_season_assets and season.seasonNumber > 0:
|
|
|
@ -1119,7 +1119,7 @@ class Plex(Library):
|
|
|
|
for episode in self.query(season.episodes):
|
|
|
|
for episode in self.query(season.episodes):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if episode.seasonEpisode:
|
|
|
|
if episode.seasonEpisode:
|
|
|
|
episode_poster, episode_background, _, _ = self.find_item_assets(episode, item_asset_directory=item_dir, folder_name=name)
|
|
|
|
episode_poster, episode_background, _, _ = self.find_item_assets(episode, item_asset_directory=item_dir, asset_directory=asset_directory, folder_name=name)
|
|
|
|
if episode_poster or episode_background:
|
|
|
|
if episode_poster or episode_background:
|
|
|
|
found_episode = True
|
|
|
|
found_episode = True
|
|
|
|
if "Overlay" not in [la.tag for la in self.item_labels(episode)]:
|
|
|
|
if "Overlay" not in [la.tag for la in self.item_labels(episode)]:
|
|
|
@ -1136,7 +1136,7 @@ class Plex(Library):
|
|
|
|
found_album = False
|
|
|
|
found_album = False
|
|
|
|
for album in self.query(item.albums):
|
|
|
|
for album in self.query(item.albums):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
album_poster, album_background, _, _ = self.find_item_assets(album, item_asset_directory=item_dir, folder_name=name)
|
|
|
|
album_poster, album_background, _, _ = self.find_item_assets(album, item_asset_directory=item_dir, asset_directory=asset_directory, folder_name=name)
|
|
|
|
if album_poster or album_background:
|
|
|
|
if album_poster or album_background:
|
|
|
|
found_album = True
|
|
|
|
found_album = True
|
|
|
|
elif self.show_missing_season_assets:
|
|
|
|
elif self.show_missing_season_assets:
|
|
|
|