@@ -54,9 +54,6 @@ def generate_series_blueprint(
54
54
Args:
55
55
series: Series to generate the Blueprint of.
56
56
raw_episode_data: List of episode data to include in the export.
57
- include_global_defaults: Whether to write global settings if the
58
- Series has no corresponding override, primarily for the
59
- card type.
60
57
include_episode_overrides: Whether to include Episode-level
61
58
overrides in the exported Blueprint. If True, then any
62
59
Episode Font and Template assignments are also included.
@@ -66,8 +63,8 @@ def generate_series_blueprint(
66
63
Blueprint that can be used to recreate the Series configuration.
67
64
"""
68
65
69
- # Get all Episodes if indicates
70
- episodes : list [ Episode ] = series .episodes if include_episode_overrides else []
66
+ # Get all Episodes if indicated
67
+ episodes = series .episodes if include_episode_overrides else []
71
68
72
69
# Get all Templates
73
70
templates : list [Template ] = list (set (
@@ -82,15 +79,12 @@ def generate_series_blueprint(
82
79
# Create exported JSON object
83
80
export_obj = {'series' : {}, 'episodes' : {}, 'templates' : [], 'fonts' : []}
84
81
85
- # Append Series config
86
- if include_global_defaults :
87
- export_obj ['series' ] = TieredSettings .new_settings (
88
- get_preferences ().export_properties ,
89
- series .export_properties ,
90
- )
91
- else :
92
- export_obj ['series' ] = series .export_properties
93
- export_obj ['series' ] = TieredSettings .filter (export_obj ['series' ])
82
+ # Append Series config; add global card type IF one was not provided and
83
+ # none of the associated Templates have one defined
84
+ export_obj ['series' ] = TieredSettings .filter (series .export_properties )
85
+ if (export_obj ['series' ].get ('card_type' ) is None
86
+ and all (template .card_type is None for template in templates )):
87
+ export_obj ['series' ]['card_type' ] = preferences .default_card_type
94
88
95
89
# Add Series Source Images
96
90
if mask_images :
0 commit comments