diff --git a/Songify Slim/Properties/AssemblyInfo.cs b/Songify Slim/Properties/AssemblyInfo.cs index 4de4fba5..29ea9a0c 100644 --- a/Songify Slim/Properties/AssemblyInfo.cs +++ b/Songify Slim/Properties/AssemblyInfo.cs @@ -50,7 +50,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.4.5")] -[assembly: AssemblyFileVersion("1.6.4.5")] +[assembly: AssemblyVersion("1.6.4.6")] +[assembly: AssemblyFileVersion("1.6.4.6")] [assembly: NeutralResourcesLanguage("en")] [assembly: Guid("442379e3-32d8-42d1-ab09-cba229672453")] \ No newline at end of file diff --git a/Songify Slim/Util/Songify/TwitchHandler.cs b/Songify Slim/Util/Songify/TwitchHandler.cs index 44d05fb9..c395a0cf 100644 --- a/Songify Slim/Util/Songify/TwitchHandler.cs +++ b/Songify Slim/Util/Songify/TwitchHandler.cs @@ -606,6 +606,7 @@ private static async void AddSong(string trackId, OnMessageReceivedArgs e) FullTrack track = await SpotifyApiHandler.GetTrack(trackId); + if (track == null) { SendChatMessage(Settings.Settings.TwChannel, CreateNoTrackFoundResponse(e)); @@ -667,6 +668,7 @@ private static async void AddSong(string trackId, OnMessageReceivedArgs e) await AddToPlaylist(track.Id); response = CreateSuccessResponse(track, e.ChatMessage.DisplayName); + SendChatMessage(e.ChatMessage.Channel, response); await UploadToQueue(track, e.ChatMessage.DisplayName); GlobalObjects.QueueUpdateQueueWindow(); @@ -1755,6 +1757,11 @@ private static string CreateSuccessResponse(FullTrack track, string displayName) string response = Settings.Settings.BotRespSuccess; string artists = ""; string singleArtist = ""; + + //Fix for russia where Spotify is not available + if (track.HasError() && track.Error.Status == 403) + return "Track has been added to the queue."; + try { artists = string.Join(", ", track.Artists.Select(o => o.Name).ToList());