completed adding MediaLofi for kontor-gin
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
Thomas Peetz
2026-10-09 18:24:30 +02:00
parent 798c88198c
commit 075695fae6
24 changed files with 471 additions and 178 deletions
+8 -3
View File
@@ -19,18 +19,23 @@ var syncCmd = &cobra.Command{
slog.Info("sync kontor")
apiVersion := viper.GetString("api")
mainServer := config.Config.Server["main"]
slog.Info("syncCmd#Run", "mainServer", mainServer)
if config.Verbose > 2 {
slog.Info("syncCmd#Run", "mainServer", mainServer)
}
localServer := config.Config.Server["local"]
sourceData, _ := api.GetData(mainServer, apiVersion)
targetData, _ := api.GetData(localServer, apiVersion)
slog.Info("Size of targetData", "size", reflect.TypeOf(targetData).Size())
if config.Verbose > 2 {
slog.Info("Size of targetData", "size", reflect.TypeOf(targetData).Size())
}
// find missing items in target and collect items not available in source
for table, item_list := range sourceData.GetMap() {
slog.Info("iterate sourceData", "table", table, "count", reflect.TypeOf(item_list).Size())
switch table {
case "sports":
sourceData.Sport.CompareIds(&targetData.Sport)
case "players":
sourceData.Player.CompareIds(&targetData.Player)
}
}