fix(downloads): prevent subscription readding deleted torrents

This commit is contained in:
ShukeBta
2026-06-07 19:20:10 +08:00
parent a5d061afa6
commit 88ee6d6bb7
7 changed files with 372 additions and 5 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ func LookupLocalAvailability(ctx context.Context, repo *repository.Container, ti
like := "%" + query + "%"
var rows []model.Media
if err := repo.DB.WithContext(ctx).
Where("title LIKE ? OR original_name LIKE ?", like, like).
Where("title LIKE ? OR original_name LIKE ? OR path LIKE ?", like, like, like).
Order("season_num asc, episode_num asc, created_at desc").
Limit(2000).
Find(&rows).Error; err != nil {