Extract background color to continue image

This commit is contained in:
nemunaire 2024-03-18 11:26:01 +01:00
parent 35d07c1aa4
commit 26c282138e
23 changed files with 218 additions and 115 deletions

View file

@ -397,6 +397,8 @@ func SyncExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*f
e.Image = strings.TrimPrefix(filePath, fic.FilesDir)
e.BackgroundColor, _ = getBackgroundColor(filePath)
// If the theme has no image yet, use the first exercice's image found
theme.Image = e.Image
_, err := theme.Update()