fix: main json object format
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.526" package="org.tsanie.pixiview" android:versionCode="21">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.531" package="org.tsanie.pixiview" android:versionCode="22">
|
||||||
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
|
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
|
||||||
<application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application>
|
<application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
<string>com.apple.share-services</string>
|
<string>com.apple.share-services</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.526</string>
|
<string>1.0.531</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>21</string>
|
<string>22</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -79,9 +79,9 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.526</string>
|
<string>1.0.531</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>21</string>
|
<string>22</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>China</string>
|
<string>China</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -205,7 +205,7 @@ namespace Pixiview.Illust
|
|||||||
{
|
{
|
||||||
return null;
|
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());
|
data.body.thumbnails.illust.FirstOrDefault(l => l.illustId == id)?.ConvertToItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,10 @@ namespace Pixiview.Utils
|
|||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (content == null)
|
||||||
|
{
|
||||||
|
content = string.Empty;
|
||||||
|
}
|
||||||
bool rtn = false;
|
bool rtn = false;
|
||||||
T result = default;
|
T result = default;
|
||||||
if (namehandler != null)
|
if (namehandler != null)
|
||||||
@ -118,7 +122,8 @@ namespace Pixiview.Utils
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
error = content;
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
@ -162,7 +167,8 @@ namespace Pixiview.Utils
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
error = content;
|
||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
@ -104,13 +104,18 @@ namespace Pixiview.Utils
|
|||||||
public class Page
|
public class Page
|
||||||
{
|
{
|
||||||
public int[] follow;
|
public int[] follow;
|
||||||
public string[] recommend;
|
public Recommends recommend;
|
||||||
public RecommendByTag[] recommendByTags;
|
public RecommendByTag[] recommendByTags;
|
||||||
public Ranking ranking;
|
public Ranking ranking;
|
||||||
public RecommendUser[] recommendUser;
|
public RecommendUser[] recommendUser;
|
||||||
public EditorRecommend[] editorRecommend;
|
public EditorRecommend[] editorRecommend;
|
||||||
public string[] newPost;
|
public string[] newPost;
|
||||||
|
|
||||||
|
public class Recommends
|
||||||
|
{
|
||||||
|
public string[] ids;
|
||||||
|
}
|
||||||
|
|
||||||
public class RecommendByTag
|
public class RecommendByTag
|
||||||
{
|
{
|
||||||
public string tag;
|
public string tag;
|
||||||
|
Reference in New Issue
Block a user