Skip to content

Commit

Permalink
for sorting not working for next airing episode
Browse files Browse the repository at this point in the history
  • Loading branch information
insomniachi committed Jun 15, 2024
1 parent e666ab7 commit 3517500
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Totoro.Core/Services/TorrentEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ public async Task<Stream> GetStream(Torrent torrent, int fileIndex)

public async Task SaveState()
{
if(_engine is null)
{
return;
}

await _engine.SaveStateAsync(_torrentEngineState);
}

Expand Down
1 change: 1 addition & 0 deletions Totoro.Core/ViewModels/UserListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public UserListViewModel(ITrackingServiceContext trackingService,
.Connect()
.RefCount()
.AutoRefresh(x => x.Tracking)
.AutoRefresh(x => x.NextEpisodeAt, propertyChangeThrottle: TimeSpan.FromMilliseconds(500), scheduler: RxApp.MainThreadScheduler)
.Filter(this.WhenAnyValue(x => x.Filter).SelectMany(x => x.WhenAnyPropertyChanged()).Select(x => (Func<AnimeModel, bool>)x.IsVisible))
.Sort(sort)
.Bind(out _anime)
Expand Down

0 comments on commit 3517500

Please sign in to comment.