Removed PrefetchAnime()
This commit is contained in:
parent
daded28acb
commit
f88a728a5a
@ -29,7 +29,6 @@ func BenchmarkRenderThread(b *testing.B) {
|
||||
func BenchmarkRenderAnimeList(b *testing.B) {
|
||||
user, _ := arn.GetUser("4J6qpK1ve")
|
||||
animeList := user.AnimeList()
|
||||
animeList.PrefetchAnime()
|
||||
|
||||
b.ReportAllocs()
|
||||
b.ResetTimer()
|
||||
|
@ -25,7 +25,6 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusNotFound, "Anime list not found", nil)
|
||||
}
|
||||
|
||||
animeList.PrefetchAnime()
|
||||
animeList.Sort()
|
||||
|
||||
return ctx.HTML(components.ProfileAnimeLists(animeList.SplitByStatus(), animeList.User(), user, ctx.URI()))
|
||||
|
@ -39,7 +39,6 @@ func statusList(ctx *aero.Context, status string) (*arn.AnimeList, string) {
|
||||
}
|
||||
|
||||
watchingList := animeList.FilterStatus(status)
|
||||
watchingList.PrefetchAnime()
|
||||
watchingList.Sort()
|
||||
|
||||
return watchingList, ""
|
||||
|
@ -53,7 +53,6 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
animeList = animeList.Watching()
|
||||
animeList.PrefetchAnime()
|
||||
|
||||
for _, item := range animeList.Items {
|
||||
futureEpisodes := item.Anime().UpcomingEpisodes()
|
||||
|
@ -28,7 +28,6 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
watchingList := animeList.Watching()
|
||||
watchingList.PrefetchAnime()
|
||||
watchingList.Sort()
|
||||
|
||||
return utils.AllowEmbed(ctx, ctx.HTML(components.AnimeList(watchingList, animeList.User(), user)))
|
||||
|
@ -32,7 +32,6 @@ func AnimeList(ctx *aero.Context, user *arn.User, status string) string {
|
||||
return ctx.Error(http.StatusNotFound, "Anime list not found", nil)
|
||||
}
|
||||
|
||||
animeList.PrefetchAnime()
|
||||
animeList.Sort()
|
||||
|
||||
return ctx.HTML(components.Home(animeList.FilterStatus(status), viewUser, user, status))
|
||||
|
@ -37,7 +37,6 @@ func Profile(ctx *aero.Context, viewUser *arn.User) string {
|
||||
user = utils.GetUser(ctx)
|
||||
}, func() {
|
||||
animeList = viewUser.AnimeList()
|
||||
animeList.PrefetchAnime()
|
||||
|
||||
// Sort by rating
|
||||
sort.Slice(animeList.Items, func(i, j int) bool {
|
||||
|
@ -28,7 +28,6 @@ func GetStatsByUser(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
animeList, err := arn.GetAnimeList(viewUser.ID)
|
||||
animeList.PrefetchAnime()
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusInternalServerError, "Anime list not found", err)
|
||||
|
Loading…
Reference in New Issue
Block a user