mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Only consider downloaded episodes when cleaning (#152)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user