Fix presence ep number

This commit is contained in:
Apologieze
2025-03-19 21:10:27 -04:00
parent c0cd616984
commit 74a01e38a9
2 changed files with 6 additions and 1 deletions

View File

@@ -6,6 +6,11 @@
</div>
<br>
## Features
- Complete Anilist integration to save your progression and browse anime
- Discord Rich Presence
- Resume where you left off in the episode
## Download
- If you're on Windows, you can download the latest executable [here](https://uwu.apologize.fr/download) <br>

View File

@@ -243,7 +243,7 @@ func playingAnimeLoop(playingAnime curd.Anime, animeData *verniy.MediaList, savi
}
}
presenceAnime := richPresence.PresenceAnime{Name: playingAnime.Title.English, Ep: playingAnime.Ep.Number, ImageLink: *animeData.Media.CoverImage.Large, PlaybackTime: 0, Duration: playingAnime.Ep.Duration, TotalEp: playingAnime.TotalEpisodes}
presenceAnime := richPresence.PresenceAnime{Name: playingAnime.Title.English, Ep: playingAnime.Ep.Number + 1, ImageLink: *animeData.Media.CoverImage.Large, PlaybackTime: 0, Duration: playingAnime.Ep.Duration, TotalEp: playingAnime.TotalEpisodes}
for {
time.Sleep(1 * time.Second)
timePos, err := curd.MPVSendCommand(playingAnime.Ep.Player.SocketPath, []interface{}{"get_property", "time-pos"})