diff --git a/AuroraAssetEditor/App.xaml b/AuroraAssetEditor/App.xaml index b7eaed1..22f2a65 100644 --- a/AuroraAssetEditor/App.xaml +++ b/AuroraAssetEditor/App.xaml @@ -2,7 +2,4 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Startup="AppStart"> - - - \ No newline at end of file diff --git a/AuroraAssetEditor/App.xaml.cs b/AuroraAssetEditor/App.xaml.cs index 8134988..e690418 100644 --- a/AuroraAssetEditor/App.xaml.cs +++ b/AuroraAssetEditor/App.xaml.cs @@ -25,7 +25,6 @@ public partial class App { Icon.ExtractAssociatedIcon(Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(App)).Location), Path.GetFileName(Assembly.GetAssembly(typeof(App)).Location))); internal static readonly ImageSource WpfIcon = Imaging.CreateBitmapSourceFromHIcon(Icon.Handle, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); - internal static XboxUnity.XboxUnityTitle[] TitleCache; private void AppStart(object sender, StartupEventArgs e) { new MainWindow(e.Args).Show(); } } diff --git a/AuroraAssetEditor/Classes/XboxUnity.cs b/AuroraAssetEditor/Classes/XboxUnity.cs index d7c11ee..1a805d0 100644 --- a/AuroraAssetEditor/Classes/XboxUnity.cs +++ b/AuroraAssetEditor/Classes/XboxUnity.cs @@ -17,17 +17,9 @@ namespace AuroraAssetEditor.Classes { internal static class XboxUnity { private static readonly DataContractJsonSerializer Serializer = new DataContractJsonSerializer(typeof(UnityResponse[])); - private static readonly DataContractJsonSerializer CacheSerializer = new DataContractJsonSerializer(typeof(XboxUnityTitle[])); private static string GetUnityUrl(string searchTerm) { return string.Format("http://xboxunity.net/api/Covers/{0}", HttpUtility.UrlEncode(searchTerm)); } - public static XboxUnityAsset[] GetUnityCoverInfo(int titleId) { - using(var wc = new WebClient()) { - var stream = wc.OpenRead(GetUnityUrl(titleId.ToString("X8"))); - return stream != null ? ((UnityResponse[])Serializer.ReadObject(stream)).Select(t => new XboxUnityAsset(t)).ToArray() : new XboxUnityAsset[0]; - } - } - public static XboxUnityAsset[] GetUnityCoverInfo(string searchTerm) { using(var wc = new WebClient()) { try { @@ -102,18 +94,5 @@ public override string ToString() { return string.Format(_unityResponse.Official ? "Official cover for {0} Rating: {1}" : "Cover for {0} Rating: {1}", _unityResponse.Name, _unityResponse.Rating ?? "N/A"); } } - - [DataContract] public class XboxUnityTitle { - public XboxUnityTitle(int titleId, string titleName) { - Title = titleName; - TitleId = titleId.ToString("X08"); - } - - [DataMember(Name = "titleid")] public string TitleId { get; set; } - - [DataMember(Name = "title")] public string Title { get; set; } - - public override string ToString() { return string.Format("{0}: {1}", TitleId, Title); } - } } } \ No newline at end of file