mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-14 06:29:53 +01:00
Delete user from anime on finish
This commit is contained in:
13
schaffer.go
13
schaffer.go
@@ -132,6 +132,19 @@ func SearchSeason(animeId int64) (*Anime, error) {
|
||||
return nil, errors.New("anime not found")
|
||||
}
|
||||
|
||||
func SearchAnime(animeId int64) (*Anime, error) {
|
||||
// search season first
|
||||
anime, err := SearchSeason(animeId)
|
||||
if err != nil {
|
||||
// get from MAL
|
||||
anime, _, err = GetAnimeDetailData(animeId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return anime, err
|
||||
}
|
||||
|
||||
func FetchProgress(animeId, userId int64, username string, progress int) (int, time.Time, error) {
|
||||
// check watching first
|
||||
list, _, err := GetUserAnimeListData(username, malApiStatusW)
|
||||
|
||||
Reference in New Issue
Block a user