Skip to content

Commit

Permalink
Detects automatically queued update now
Browse files Browse the repository at this point in the history
  • Loading branch information
akorb committed Mar 24, 2017
1 parent c71d25c commit 39c448d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion SteamShutdown/AppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ public class AppInfo
public string Name { get; set; }
public int State { get; set; }

/// <summary>
/// Returns a value indicating whether the game is being downloaded. Includes games in queue for download.
/// </summary>
public bool IsDownloading
{
get { return CheckDownloading(State); }
}

/// <summary>
/// Returns a value indicating whether the game is being downloaded. Includes games in queue for download.
/// </summary>
/// <param name="appState"></param>
/// <returns></returns>
public static bool CheckDownloading(int appState)
{
return appState == 1026 || appState == 1042 || appState == 1062 || appState == 1030;
// 6: In queue for update
// 1024: download running
// 1026: In queue
return appState == 6 || appState == 1026 || appState == 1042 || appState == 1062 || appState == 1030;
}

public override string ToString()
Expand Down

0 comments on commit 39c448d

Please sign in to comment.