Commit 1e88901f0c
Unsigned
Layout: unified · split
internal/localTracking.go +3
| @@ -74,6 +74,8 @@ func LocalDeleteAnime(databaseFile string, anilistID int, allanimeID string) { | ||
| 74 | 74 | fmt.Println("Error writing to file:", err) |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | ||
| 78 | // Function to get all anime entries from the database | |
| 77 | 79 | func LocalGetAllAnime(databaseFile string) []Anime { |
| 78 | 80 | animeList := []Anime{} |
| 79 | 81 | file, err := os.Open(databaseFile) |
| @@ -127,6 +129,7 @@ func getAnimeName(anime Anime) string { | ||
| 127 | 129 | } |
| 128 | 130 | return anime.Title.Romaji |
| 129 | 131 | } |
| 132 | ||
| 130 | 133 | // Function to update or add a new anime entry |
| 131 | 134 | func LocalUpdateAnime(databaseFile string, anilistID int, allanimeID string, watchingEpisode int, playbackTime int, animeName string) { |
| 132 | 135 | // Read existing entries |