Skip to content

Commit 04c1687

Browse files
tyuterryJohnnyCrazy
authored andcommitted
fixed issues : Have exception if playing Chinese song JohnnyCrazy#171 (JohnnyCrazy#174)
1 parent 8f76b4c commit 04c1687

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎SpotifyAPI/Local/RemoteHandler.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ internal StatusResponse GetNewStatus()
5151
return null;
5252
}
5353
response = response.Replace("\\n", "");
54-
byte[] bytes = Encoding.Default.GetBytes(response);
55-
response = Encoding.UTF8.GetString(bytes);
5654
List<StatusResponse> raw = JsonConvert.DeserializeObject<List<StatusResponse>>(response);
5755
return raw[0];
5856
}
@@ -110,7 +108,10 @@ internal string Query(string request, bool oauth, bool cfid, int wait)
110108
using (var wc = new ExtendedWebClient())
111109
{
112110
if (SpotifyLocalAPI.IsSpotifyRunning())
111+
{
112+
wc.Encoding = Encoding.UTF8;
113113
response = "[ " + wc.DownloadString(address) + " ]";
114+
}
114115
}
115116
}
116117
catch

0 commit comments

Comments
 (0)