Skip to content

Commit

Permalink
Add cache cleanup progress message
Browse files Browse the repository at this point in the history
So that the user knows that we're doing when podbit takes some time to
close.
  • Loading branch information
ejv2 committed May 23, 2024
1 parent b19847d commit f74fe01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func ReloadData() {
// (defaults to three days). Removed episodes are set to "pending" status (to
// be downloaded) and have their cache file removed.
func CleanData() {
fmt.Printf("Cache cleanup...")

now := time.Now().Unix()
count := 0

Expand All @@ -107,7 +109,7 @@ func CleanData() {
return true
})

fmt.Printf("Cache cleanup...done (removed %d items)\n", count)
fmt.Printf("done (removed %d items)\n", count)
}

// ReloadLoop is an infinite loop to continually reload the
Expand Down

0 comments on commit f74fe01

Please sign in to comment.