update
This commit is contained in:
parent
c8dc63bd36
commit
0543f535e1
@ -99,13 +99,14 @@ 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}': {}}
|
||||
new_col2 = {'template': {'name': 'Movie',
|
||||
'collection': collection.MovieTMDbCollectionTMDbId,
|
||||
'summary': collection.MovieTMDbCollectionTMDbId}}
|
||||
new_col1 = {f'{collection.MovieTMDbCollectionName}': {
|
||||
'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