Skip to content

Commit

Permalink
fix: fix marking files/episodes as not watched on anidb
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Sep 19, 2024
1 parent b533c5c commit 7f43d4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class UpdateMyListFileStatusJob : BaseJob

private string FullFileName { get; set; }
public string Hash { get; set; }
public bool Watched { get; set; }
public bool? Watched { get; set; }
public bool UpdateSeriesStats { get; set; }
public DateTime? WatchedDate { get; set; }

Expand Down Expand Up @@ -69,8 +69,7 @@ public override async Task Process()
r.State = settings.AniDb.MyList_StorageState.GetMyList_State();
r.Hash = vid.Hash;
r.Size = vid.FileSize;
if (!Watched || WatchedDate == null) return;
r.IsWatched = true;
r.IsWatched = Watched;
r.WatchedDate = WatchedDate;
}
);
Expand All @@ -92,8 +91,7 @@ public override async Task Process()
r.AnimeID = episode.AnimeID;
r.EpisodeNumber = episode.EpisodeNumber;
r.EpisodeType = (EpisodeType)episode.EpisodeType;
if (!Watched || WatchedDate == null) return;
r.IsWatched = true;
r.IsWatched = Watched;
r.WatchedDate = WatchedDate;
}
);
Expand Down
1 change: 1 addition & 0 deletions Shoko.Server/Services/WatchedStatusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ await scheduler.StartJob<UpdateMyListFileStatusJob>(
c.Hash = vl.Hash;
c.Watched = watched;
c.UpdateSeriesStats = false;
c.Watched = watched;
c.WatchedDate = watchedDate?.ToUniversalTime();
}
);
Expand Down

0 comments on commit 7f43d4c

Please sign in to comment.