debug: force fallback for code geass ep 6
This commit is contained in:
@@ -22,12 +22,7 @@ func (e *Episode) GetFallbackImage(animeID int) string {
|
||||
imageUrl = e.Images.Jpg.ImageURL
|
||||
}
|
||||
|
||||
// Always trigger scraping if we encounter the banned icon OR the generic placeholder
|
||||
if imageUrl != bannedImageURL && imageUrl != placeholderImageURL && imageUrl != "" {
|
||||
return imageUrl
|
||||
}
|
||||
|
||||
// Determine the episode number reliably
|
||||
// Determining the episode number reliably. Jikan's Episode string can be "Episode 1" or just "1"
|
||||
episodeNum := 0
|
||||
if e.Episode != "" {
|
||||
re := regexp.MustCompile(`\d+`)
|
||||
@@ -37,11 +32,17 @@ func (e *Episode) GetFallbackImage(animeID int) string {
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to MalID if the episode string didn't have a number
|
||||
// For Video episodes, MalID is often the episode number, but let's check
|
||||
if episodeNum == 0 {
|
||||
episodeNum = e.MalID
|
||||
}
|
||||
|
||||
// Always trigger scraping if we encounter the banned icon OR the generic placeholder
|
||||
// OR if it's the specific Code Geass episode we are testing
|
||||
if imageUrl != bannedImageURL && imageUrl != placeholderImageURL && imageUrl != "" && !(animeID == 2904 && episodeNum == 6) {
|
||||
return imageUrl
|
||||
}
|
||||
|
||||
episodeURL := fmt.Sprintf("https://myanimelist.net/anime/%d/episode/%d", animeID, episodeNum)
|
||||
fallbackURL := scrapeAnimeImageFromEpisodePage(episodeURL, episodeNum)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user