diff --git a/Beatmap Mirror WPF/Code/Api/ApiRequest.cs b/Beatmap Mirror WPF/Code/Api/ApiRequest.cs index 8567430..4f6b8c6 100644 --- a/Beatmap Mirror WPF/Code/Api/ApiRequest.cs +++ b/Beatmap Mirror WPF/Code/Api/ApiRequest.cs @@ -66,7 +66,7 @@ public string SendRequest() { WebClient wc = new WebClient(); wc.Proxy = null; - wc.Headers.Add("User-Agent", "Osu!Mirror"); + wc.Headers.Add("User-Agent", string.Format("Osu!Mirror {0}", Configuration.VersionString)); try { @@ -85,7 +85,7 @@ public string SendRequest() HttpWebRequest r = (HttpWebRequest)WebRequest.Create(location); r.Method = "GET"; - r.UserAgent = "Osu!Mirror"; + r.UserAgent = string.Format("Osu!Mirror {0}", Configuration.VersionString); using (WebResponse response = r.GetResponse()) { diff --git a/Beatmap Mirror WPF/Code/Configuration.cs b/Beatmap Mirror WPF/Code/Configuration.cs index 3c4409d..3e63285 100644 --- a/Beatmap Mirror WPF/Code/Configuration.cs +++ b/Beatmap Mirror WPF/Code/Configuration.cs @@ -1,8 +1,10 @@ using Beatmap_Mirror_WPF.Code.Tools; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Net; +using System.Reflection; using System.Text; namespace Beatmap_Mirror.Code @@ -17,6 +19,8 @@ public static class Configuration public static string Mp3DownloadLocation = null; public static string OsuLocation = null; + public static string VersionString = null; + public static bool AskBeforeClose = true; public static int ParrarelDownloads = 2; @@ -25,6 +29,7 @@ public static void Innit() { ServicePointManager.DefaultConnectionLimit = int.MaxValue; + VersionString = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion; string temp = RegistryHelper.GetKey("ParrarelDownloads"); if (temp != null) diff --git a/Beatmap Mirror WPF/Properties/AssemblyInfo.cs b/Beatmap Mirror WPF/Properties/AssemblyInfo.cs index 8d5eff3..eaeb2c4 100644 --- a/Beatmap Mirror WPF/Properties/AssemblyInfo.cs +++ b/Beatmap Mirror WPF/Properties/AssemblyInfo.cs @@ -10,9 +10,9 @@ [assembly: AssemblyTitle("Beatmap Mirror WPF")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Hexide")] [assembly: AssemblyProduct("Beatmap Mirror WPF")] -[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyCopyright("Copyright © Hexide 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ // 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.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")]