Commit 7b10795b4e

7b10795b4e982d6a618b4f9d12098ff4f289e4ed

parent: adf5406ca6

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-21 14:51 UTC

Fix: Failsafe

Layout: unified · split

internal/localTracking.go +7 −2
@@ -138,8 +138,13 @@ func LocalUpdateAnime(databaseFile string, anilistID int, allanimeID string, wat
138 strconv.Itoa(existingAnime.AnilistId), 138 strconv.Itoa(existingAnime.AnilistId),
139 existingAnime.AllanimeId, 139 existingAnime.AllanimeId,
140 strconv.Itoa(existingAnime.Ep.Number), 140 strconv.Itoa(existingAnime.Ep.Number),
141 strconv.Itoa(watchingTime), // Assuming you want to update the watching time too 141 strconv.Itoa(existingAnime.Ep.Player.PlaybackTime),
142 existingAnime.Title.Romaji, 142 func() string {
143 if existingAnime.Title.English != "" {
144 return existingAnime.Title.English
145 }
146 return existingAnime.Title.Romaji
147 }(), // Keep the original anime name (Romaji or English) for other entries
143 }) 148 })
144 } 149 }
145 } 150 }