Commit 1e88901f0c

1e88901f0c5460bd9f076ac44bac806d502cfd56

parent: 246581a057

Unsigned

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

Minor: Neat and tidy

Layout: unified · split

internal/localTracking.go +3
@@ -74,6 +74,8 @@ func LocalDeleteAnime(databaseFile string, anilistID int, allanimeID string) {
7474 fmt.Println("Error writing to file:", err)
7575 }
7676}
77
78// Function to get all anime entries from the database
7779func LocalGetAllAnime(databaseFile string) []Anime {
7880 animeList := []Anime{}
7981 file, err := os.Open(databaseFile)
@@ -127,6 +129,7 @@ func getAnimeName(anime Anime) string {
127129 }
128130 return anime.Title.Romaji
129131}
132
130133// Function to update or add a new anime entry
131134func LocalUpdateAnime(databaseFile string, anilistID int, allanimeID string, watchingEpisode int, playbackTime int, animeName string) {
132135 // Read existing entries