update
This commit is contained in:
parent
e63b86e567
commit
632d912c74
@ -99,10 +99,13 @@ def UpdateYAML(configFile, MovieListFinal):
|
||||
for collection in MovieListFinal:
|
||||
if collection.MovieTMDbCollectionName not in currentYamlCollections:
|
||||
with open(configFile, 'r') as f:
|
||||
new_col1 = {f'{collection.MovieTMDbCollectionName}':{'template':{'name': 'Movie',
|
||||
'collection': collection.MovieTMDbCollectionTMDbId,
|
||||
'summary': collection.MovieTMDbCollectionTMDbId}}}
|
||||
new_col1 = {f'{collection.MovieTMDbCollectionName}': {}}
|
||||
new_col2 = {'template': {'name': 'Movie',
|
||||
'collection': collection.MovieTMDbCollectionTMDbId,
|
||||
'summary': collection.MovieTMDbCollectionTMDbId}}
|
||||
|
||||
currentYaml['collections'].update(new_col1)
|
||||
currentYaml[collection.MovieTMDbCollectionName].update(new_col2)
|
||||
|
||||
if currentYaml:
|
||||
logger.info(f"Adding new collection: {collection.MovieTMDbCollectionName} to {configFile} file...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user