From 73ab4b3fce53eb1005f4e272caab275a60d2556d Mon Sep 17 00:00:00 2001 From: SpoinkyNL Date: Sat, 5 Nov 2016 23:52:46 +0100 Subject: [PATCH] #190 again, this is better. --- .../Modules/Effects/WindowsProfile/WindowsProfileModel.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Artemis/Artemis/Modules/Effects/WindowsProfile/WindowsProfileModel.cs b/Artemis/Artemis/Modules/Effects/WindowsProfile/WindowsProfileModel.cs index fdc5f9d04..e967b4608 100644 --- a/Artemis/Artemis/Modules/Effects/WindowsProfile/WindowsProfileModel.cs +++ b/Artemis/Artemis/Modules/Effects/WindowsProfile/WindowsProfileModel.cs @@ -230,12 +230,11 @@ namespace Artemis.Modules.Effects.WindowsProfile { // Google Play Music var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - if (!File.Exists(appData + @"\Google Play Music Desktop Player\json_store\playback.json")) + var json = appData + @"\Google Play Music Desktop Player\json_store\playback.json"; + if (!File.Exists(json)) return; - dataModel.GooglePlayMusic = - JsonConvert.DeserializeObject( - File.ReadAllText(appData + @"\Google Play Music Desktop Player\json_store\playback.json")); + dataModel.GooglePlayMusic = JsonConvert.DeserializeObject(File.ReadAllText(json)); } #endregion