Skip to content

Commit

Permalink
Removed broken trailing character in song details
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Nov 21, 2017
1 parent 09c19a5 commit f4c819a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mb_DiscordRichPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ private void UpdatePresence(string song, string duration, int position, string s
{
DiscordRPC.RichPresence presence = new DiscordRPC.RichPresence();
presence.state = state;
presence.details = Utility.Utf16ToUtf8(song);
song = Utility.Utf16ToUtf8(song);
presence.details = song.Substring(0, song.Length - 1);
presence.largeImageKey = "musicbee";
long now = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
presence.startTimestamp = now - position;
Expand Down

0 comments on commit f4c819a

Please sign in to comment.