Shown own progress as well in episode list
This commit is contained in:
parent
a12b749ee9
commit
6dc98a695a
@ -27,6 +27,13 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusNotFound, "Anime not found", err)
|
||||
}
|
||||
|
||||
// Anime list item
|
||||
var animeListItem *arn.AnimeListItem
|
||||
|
||||
if user != nil {
|
||||
animeListItem = user.AnimeList().Find(anime.ID)
|
||||
}
|
||||
|
||||
// Episodes
|
||||
episodes := anime.Episodes().Items
|
||||
|
||||
@ -61,6 +68,10 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
}
|
||||
|
||||
if animeListItem != nil {
|
||||
episodeToFriends[animeListItem.Episodes] = append(episodeToFriends[animeListItem.Episodes], user)
|
||||
}
|
||||
|
||||
arn.SortUsersLastSeenFirst(friends)
|
||||
}
|
||||
|
||||
@ -108,13 +119,6 @@ func Get(ctx *aero.Context) string {
|
||||
return len(amvs[i].Likes) > len(amvs[j].Likes)
|
||||
})
|
||||
|
||||
// Anime list item
|
||||
var animeListItem *arn.AnimeListItem
|
||||
|
||||
if user != nil {
|
||||
animeListItem = user.AnimeList().Find(anime.ID)
|
||||
}
|
||||
|
||||
// Open Graph
|
||||
ctx.Data = getOpenGraph(ctx, anime)
|
||||
|
||||
|
@ -26,6 +26,12 @@ func Episodes(ctx *aero.Context) string {
|
||||
episodeToFriends[friendAnimeListItem.Episodes] = append(episodeToFriends[friendAnimeListItem.Episodes], friend)
|
||||
}
|
||||
}
|
||||
|
||||
ownListItem := user.AnimeList().Find(anime.ID)
|
||||
|
||||
if ownListItem != nil {
|
||||
episodeToFriends[ownListItem.Episodes] = append(episodeToFriends[ownListItem.Episodes], user)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user