diff --git a/app/internal/cards.py b/app/internal/cards.py index f1b9298f..0f924de5 100755 --- a/app/internal/cards.py +++ b/app/internal/cards.py @@ -656,13 +656,18 @@ def resolve_card_settings( card_settings['watched_style' if watched else 'unwatched_style'], ) else: - card_settings['source_file'] = CleanPath(preferences.source_directory \ - / series.path_safe_name \ - / FormatString.new( - card_settings['source_file'], data=card_settings, - name='source file format', series=series, episode=episode, - log=log, - )).sanitize() + card_settings['source_file'] = CleanPath( + preferences.source_directory \ + / series.path_safe_name \ + / FormatString.new( + card_settings['source_file'], + data=card_settings, + name='source file format', + series=series, + episode=episode, + log=log, + ) + ).sanitize() # Exit if the source file does not exist if (CardClass.USES_SOURCE_IMAGES diff --git a/app/models/episode.py b/app/models/episode.py index 4299d70f..0c53098a 100755 --- a/app/models/episode.py +++ b/app/models/episode.py @@ -445,7 +445,12 @@ def get_source_file(self, style: Style) -> Path: # No manually specified source, use default based on style if (source_name := self.source_file) is None: if 'art' in style: - source_name = 'backdrop.jpg' + return self.series.get_backdrop_file( + self.season_number + if self.series.use_per_season_assets + else None, + fallback=True, + ).resolve() else: source_name = f's{self.season_number}e{self.episode_number}.jpg' diff --git a/app/models/series.py b/app/models/series.py index e98f1ee0..ce31ac87 100755 --- a/app/models/series.py +++ b/app/models/series.py @@ -747,9 +747,9 @@ def get_backdrop_file(self, return source_dir / 'backdrop.jpg' # Look for the season-specific poster - if ((logo := source_dir / f'backdrop_season{season_number}.jpg').exists() + if ((file := source_dir / f'backdrop_season{season_number}.jpg').exists() or not fallback): - return logo + return file return source_dir / 'backdrop.jpg' diff --git a/modules/ref/version_webui b/modules/ref/version_webui index a7206bf2..6d80d698 100755 --- a/modules/ref/version_webui +++ b/modules/ref/version_webui @@ -1 +1 @@ -v2.0-alpha.13.0-webui1 \ No newline at end of file +v2.0-alpha.13.0-webui2 \ No newline at end of file