Skip to content

Commit

Permalink
Only consider downloaded episodes when cleaning (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
dop251 authored Jun 8, 2020
1 parent f8f8bd9 commit 0c41b47
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/podsync/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,7 @@ func (u *Updater) cleanup(ctx context.Context, feedConfig *config.Feed) error {

logger.WithField("count", count).Info("running cleaner")
if err := u.db.WalkEpisodes(ctx, feedConfig.ID, func(episode *model.Episode) error {
switch episode.Status {
case model.EpisodeError, model.EpisodeCleaned:
// Skip
default:
if episode.Status == model.EpisodeDownloaded {
list = append(list, episode)
}
return nil
Expand Down

0 comments on commit 0c41b47

Please sign in to comment.