Skip to content

Commit 98823e2

Browse files
committed
fix: exclude removed records
1 parent 269a5bf commit 98823e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func (c *client) SetEpisodeStatus(id int, status episode.Status) error {
534534

535535
func (c *client) IsEpisodeDownloadingOrDownloaded(id int) bool {
536536
ep, _ := c.GetEpisodeByID(id)
537-
his := c.ent.History.Query().Where(history.EpisodeNumsNotNil()).AllX(context.Background())
537+
his := c.ent.History.Query().Where(history.EpisodeNumsNotNil(), history.StatusNEQ(history.StatusRemoved)).AllX(context.Background())
538538
for _, h := range his {
539539
if !slices.Contains(h.EpisodeNums, ep.EpisodeNumber) {
540540
continue

0 commit comments

Comments
 (0)