Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
完成一部分迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed May 18, 2019
1 parent 91524a6 commit eb58dfd
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions PixivFSUWP/Data/RecommendIllustsCollection.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PixivFSCS;
using PixivCS;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -9,8 +9,8 @@
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.UI.Xaml.Data;
using FSharp.Data;
using System.Web;
using Windows.Data.Json;

namespace PixivFSUWP.Data
{
Expand Down Expand Up @@ -59,29 +59,29 @@ protected async Task<LoadMoreItemsResult> LoadMoreItemsAsync(CancellationToken c
{
if (!HasMoreItems) return new LoadMoreItemsResult() { Count = 0 };
LoadMoreItemsResult toret = new LoadMoreItemsResult() { Count = 0 };
JsonValue recommendres = null;
JsonObject recommendres = null;
if (nexturl == "begin")
recommendres = await Task.Run(() => new PixivFS
recommendres = await Task.Run(() => new PixivCS
.PixivAppAPI(OverAll.GlobalBaseAPI)
.csfriendly_illust_recommended());
.IllustRecommended());
else
{
Uri next = new Uri(nexturl);
string getparam(string param) => HttpUtility.ParseQueryString(next.Query).Get(param);
recommendres = await Task.Run(() => new PixivFS
recommendres = await Task.Run(() => new PixivCS
.PixivAppAPI(OverAll.GlobalBaseAPI)
.csfriendly_illust_recommended(content_type:
.IllustRecommended(ContentType:
getparam("content_type"),
include_ranking_label: bool.Parse(getparam("include_ranking_label")),
filter: getparam("filter"),
min_bookmark_id_for_recent_illust: getparam("min_bookmark_id_for_recent_illust"),
max_bookmark_id_for_recommend: getparam("max_bookmark_id_for_recommend"),
offset: getparam("offset"),
include_ranking_illusts: bool.Parse(getparam("include_ranking_illusts")),
include_privacy_policy: getparam("include_privacy_policy")));
IncludeRankingLabel: bool.Parse(getparam("include_ranking_label")),
Filter: getparam("filter"),
MinBookmarkIDForRecentIllust: getparam("min_bookmark_id_for_recent_illust"),
MaxBookmarkIDForRecommended: getparam("max_bookmark_id_for_recommend"),
Offset: getparam("offset"),
IncludeRankingIllusts: bool.Parse(getparam("include_ranking_illusts")),
IncludePrivacyPolicy: getparam("include_privacy_policy")));
}
nexturl = recommendres.TryGetProperty("next_url").Value.AsString();
foreach (var recillust in recommendres.TryGetProperty("illusts").Value.AsArray())
nexturl = recommendres["next_url"].GetString();
foreach (JsonObject recillust in recommendres["illusts"].GetArray())
{
if (_emergencyStop)
{
Expand Down

0 comments on commit eb58dfd

Please sign in to comment.