Commit f1f1938da5
Unsigned
Layout: unified · split
internal/discord.go +6 −4
| @@ -28,12 +28,10 @@ func DiscordPresence(clientId string, anime Anime, IsPaused bool) error { | ||
| 28 | 28 | err = client.SetActivity(client.Activity{ |
| 29 | 29 | Details: fmt.Sprintf("%s", GetAnimeName(anime)), // Large text |
| 30 | 30 | LargeImage: anime.CoverImage, |
| 31 | LargeText: GetAnimeName(anime), // Displays while hovering over the large image | |
| 31 | LargeText: GetAnimeName(anime), // Would display while hovering over the large image | |
| 32 | 32 | State: state, |
| 33 | ||
| 34 | 33 | //SmallImage: anime.SmallCoverImage, // Image for the bottom left corner |
| 35 | 34 | //SmallText: fmt.Sprintf("Episode: %s", anime.Ep.Title.English), // Text when hovering over the small image |
| 36 | ||
| 37 | 35 | Buttons: []*client.Button{ |
| 38 | 36 | &client.Button{ |
| 39 | 37 | Label: "View on AniList", // Button label |
| @@ -55,5 +53,9 @@ func FormatTime(seconds int) string { | ||
| 55 | 53 | hours := seconds / 3600 |
| 56 | 54 | minutes := (seconds % 3600) / 60 |
| 57 | 55 | remainingSeconds := seconds % 60 |
| 58 | return fmt.Sprintf("%d:%02d:%02d", hours, minutes, remainingSeconds) | |
| 56 | ||
| 57 | if hours > 0 { | |
| 58 | return fmt.Sprintf("%d:%02d:%02d", hours, minutes, remainingSeconds) | |
| 59 | } | |
| 60 | return fmt.Sprintf("%d:%02d", minutes, remainingSeconds) | |
| 59 | 61 | } |