diff --git a/Pixiview.Android/Properties/AndroidManifest.xml b/Pixiview.Android/Properties/AndroidManifest.xml index 8ecc7bc..cc0447f 100644 --- a/Pixiview.Android/Properties/AndroidManifest.xml +++ b/Pixiview.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/Pixiview.iOS.OpenExtension/Info.plist b/Pixiview.iOS.OpenExtension/Info.plist index 2543d17..847a00b 100644 --- a/Pixiview.iOS.OpenExtension/Info.plist +++ b/Pixiview.iOS.OpenExtension/Info.plist @@ -29,8 +29,8 @@ com.apple.share-services CFBundleShortVersionString - 1.0.526 + 1.0.531 CFBundleVersion - 21 + 22 diff --git a/Pixiview.iOS/Info.plist b/Pixiview.iOS/Info.plist index 2cb606b..a00cd38 100644 --- a/Pixiview.iOS/Info.plist +++ b/Pixiview.iOS/Info.plist @@ -79,9 +79,9 @@ CFBundleShortVersionString - 1.0.526 + 1.0.531 CFBundleVersion - 21 + 22 CFBundleDevelopmentRegion China diff --git a/Pixiview/Illust/RecommendsPage.xaml.cs b/Pixiview/Illust/RecommendsPage.xaml.cs index 06033aa..46f1fe5 100644 --- a/Pixiview/Illust/RecommendsPage.xaml.cs +++ b/Pixiview/Illust/RecommendsPage.xaml.cs @@ -205,7 +205,7 @@ namespace Pixiview.Illust { return null; } - return data.body.page.recommend.Select(id => + return data.body.page.recommend.ids.Select(id => data.body.thumbnails.illust.FirstOrDefault(l => l.illustId == id)?.ConvertToItem()); } diff --git a/Pixiview/Utils/HttpUtility.cs b/Pixiview/Utils/HttpUtility.cs index 88a118e..73ee878 100644 --- a/Pixiview/Utils/HttpUtility.cs +++ b/Pixiview/Utils/HttpUtility.cs @@ -106,6 +106,10 @@ namespace Pixiview.Utils return default; } + if (content == null) + { + content = string.Empty; + } bool rtn = false; T result = default; if (namehandler != null) @@ -118,7 +122,8 @@ namespace Pixiview.Utils } catch (Exception ex) { - App.DebugError("load", $"failed to parse illust JSON object, content: {content}, error: {ex.Message}"); + var memo = content.Length < 20 ? content : content.Substring(0, 20) + "..."; + App.DebugError("load", $"failed to parse illust JSON object, content: {memo}, error: {ex.Message}"); error = content; return default; } @@ -162,7 +167,8 @@ namespace Pixiview.Utils } catch (Exception ex) { - App.DebugError("load", $"failed to parse illust JSON object, content: {content}, error: {ex.Message}"); + var memo = content.Length < 20 ? content : content.Substring(0, 20) + "..."; + App.DebugError("load", $"failed to parse illust JSON object, content: {memo}, error: {ex.Message}"); error = content; return default; } diff --git a/Pixiview/Utils/IllustData.cs b/Pixiview/Utils/IllustData.cs index da6a3f9..b63ea4e 100644 --- a/Pixiview/Utils/IllustData.cs +++ b/Pixiview/Utils/IllustData.cs @@ -104,13 +104,18 @@ namespace Pixiview.Utils public class Page { public int[] follow; - public string[] recommend; + public Recommends recommend; public RecommendByTag[] recommendByTags; public Ranking ranking; public RecommendUser[] recommendUser; public EditorRecommend[] editorRecommend; public string[] newPost; + public class Recommends + { + public string[] ids; + } + public class RecommendByTag { public string tag;