Import result can report total and processed items

This commit is contained in:
Philipp Wolfer 2023-11-12 18:40:45 +01:00
parent 516de905bd
commit ead323eaed
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
5 changed files with 14 additions and 7 deletions

View file

@ -48,7 +48,8 @@ var listensCmd = &cobra.Command{
cobra.CheckErr(err)
result, err := importBackend.ImportListens(listens, timestamp)
cobra.CheckErr(err)
fmt.Printf("Imported %v listens (last timestamp %v)\n", result.Count, result.LastTimestamp)
fmt.Printf("Imported %v of %v listens (last timestamp %v)\n",
result.ImportCount, result.TotalCount, result.LastTimestamp)
},
}

View file

@ -48,7 +48,8 @@ var lovesCmd = &cobra.Command{
cobra.CheckErr(err)
result, err := importBackend.ImportLoves(loves, timestamp)
cobra.CheckErr(err)
fmt.Printf("Imported %v loves (last timestamp %v)\n", result.Count, result.LastTimestamp)
fmt.Printf("Imported %v of %v loves (last timestamp %v)\n",
result.ImportCount, result.TotalCount, result.LastTimestamp)
},
}