diff --git a/MoeLoaderP.Core/DownloadItem.cs b/MoeLoaderP.Core/DownloadItem.cs
index e0616eb..5659f6a 100644
--- a/MoeLoaderP.Core/DownloadItem.cs
+++ b/MoeLoaderP.Core/DownloadItem.cs
@@ -225,7 +225,7 @@ public async Task DownloadSingleFileAsync(CancellationToken token)
{
try
{
- await durl.AfterEffects.Invoke(this, data.Content, token);
+ await durl.AfterEffects.Invoke(this, token);
}
catch (Exception e)
{
diff --git a/MoeLoaderP.Core/MoeItem.cs b/MoeLoaderP.Core/MoeItem.cs
index 2b40da3..4b8d0cf 100644
--- a/MoeLoaderP.Core/MoeItem.cs
+++ b/MoeLoaderP.Core/MoeItem.cs
@@ -243,7 +243,7 @@ public class TextFileInfo
public string Content { get; set; }
}
- public delegate Task AfterEffectsDelegate(DownloadItem item,HttpContent content, CancellationToken token);
+ public delegate Task AfterEffectsDelegate(DownloadItem item, CancellationToken token);
public delegate Task ResolveUrlDelegate(DownloadItem item, CancellationToken token);
diff --git a/MoeLoaderP.Core/MoeLoaderP.Core.csproj b/MoeLoaderP.Core/MoeLoaderP.Core.csproj
index ce8ac00..275ab00 100644
--- a/MoeLoaderP.Core/MoeLoaderP.Core.csproj
+++ b/MoeLoaderP.Core/MoeLoaderP.Core.csproj
@@ -5,10 +5,11 @@
-
-
+
+
-
+
+
diff --git a/MoeLoaderP.Core/Settings.cs b/MoeLoaderP.Core/Settings.cs
index 9a030bb..699d5c3 100644
--- a/MoeLoaderP.Core/Settings.cs
+++ b/MoeLoaderP.Core/Settings.cs
@@ -258,15 +258,19 @@ public class AllMoeSitesSettings : Dictionary { }
public class SingleMoeSiteSettings : BindingObject
{
private string _loginCookie;
+ private Dictionary _otherSettings;
public string LoginCookie
{
get => _loginCookie;
set => SetField(ref _loginCookie, value, nameof(LoginCookie));
}
-
- public string LoginUserName { get; set; }
- public string LoginUserId { get; set; }
+
+ public Dictionary OtherSettings
+ {
+ get => _otherSettings;
+ set => SetField(ref _otherSettings, value, nameof(OtherSettings));
+ }
}
public class AllCustomSitesSettings : Dictionary { }
diff --git a/MoeLoaderP.Core/Sites/CustomSiteFactory.cs b/MoeLoaderP.Core/Sites/CustomSiteFactory.cs
deleted file mode 100644
index 832f751..0000000
--- a/MoeLoaderP.Core/Sites/CustomSiteFactory.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace MoeLoaderP.Core.Sites
-{
- public class CustomSiteFactory
- {
-
- }
-}
diff --git a/MoeLoaderP.Core/Sites/MoeSite.cs b/MoeLoaderP.Core/Sites/MoeSite.cs
index 88492a1..5e9a07f 100644
--- a/MoeLoaderP.Core/Sites/MoeSite.cs
+++ b/MoeLoaderP.Core/Sites/MoeSite.cs
@@ -149,6 +149,8 @@ public class MoeSiteSupportState
public bool IsSupportThumbButton { get; set; } = false;
public bool IsSupportStarButton { get; set; } = false;
+
+ public bool IsSupportMultiKeywords { get; set; } = false;
}
diff --git a/MoeLoaderP.Core/Sites/PixivSite.cs b/MoeLoaderP.Core/Sites/PixivSite.cs
index b84a994..5e01ded 100644
--- a/MoeLoaderP.Core/Sites/PixivSite.cs
+++ b/MoeLoaderP.Core/Sites/PixivSite.cs
@@ -382,7 +382,7 @@ public async Task GetUgoiraDetailPageTask(MoeItem img)
}
}
- private async Task UgoiraAfterEffects(DownloadItem item, HttpContent content, CancellationToken token)
+ private async Task UgoiraAfterEffects(DownloadItem item, CancellationToken token)
{
// save json
var path = Path.ChangeExtension(item.LocalFileFullPath, item.DownloadMoeItem.ExtraFile.FileExt);
@@ -404,20 +404,21 @@ private async Task UgoiraAfterEffects(DownloadItem item, HttpContent content, Ca
var gifPath = Path.ChangeExtension(item.LocalFileFullPath, "gif");
if (gifPath == null) return;
var fi = new FileInfo(gifPath);
- using (var stream = await content.ReadAsStreamAsync())
+ using (var stream = new FileStream(item.LocalFileFullPath, FileMode.Open))
{
item.StatusText = "正在转换为GIF..";
await Task.Run(() =>
{
// ConvertPixivZipToGif
var delayList = new List();
+
using (var images = new MagickImageCollection())
{
foreach (var frame in list)
{
delayList.Add($"{frame.delay}".ToInt());
}
- using (var zip = new ZipArchive(stream, ZipArchiveMode.Read))
+ using (var zip = new ZipArchive(stream, ZipArchiveMode.Read)) //todo 失败
{
for (var i = 0; i < zip.Entries.Count; i++)
{
diff --git a/MoeLoaderP.Core/Sites/SankakuChanSite.cs b/MoeLoaderP.Core/Sites/SankakuChanSite.cs
index 8703369..3657978 100644
--- a/MoeLoaderP.Core/Sites/SankakuChanSite.cs
+++ b/MoeLoaderP.Core/Sites/SankakuChanSite.cs
@@ -19,7 +19,7 @@ public SankakuChanSite()
{
DownloadTypes.Add("原图", 4);
LoginPageUrl = "https://beta.sankakucomplex.com/home";
- SupportState.IsSupportAccount = true;
+ SupportState.IsSupportAccount = false;
SupportState.IsSupportStarButton = true;
}
@@ -69,7 +69,7 @@ public override async Task GetRealPageImagesAsync(SearchPara para, Can
}
else
{
- Net.CloneWithOldCookie();
+ Net = Net.CloneWithOldCookie();
}
Net.SetReferer(beta);
diff --git a/MoeLoaderP.Core/Sites/YuriimgSite.cs b/MoeLoaderP.Core/Sites/YuriimgSite.cs
index f547a3f..d2de60c 100644
--- a/MoeLoaderP.Core/Sites/YuriimgSite.cs
+++ b/MoeLoaderP.Core/Sites/YuriimgSite.cs
@@ -1,5 +1,7 @@
-using System.Threading;
+using System.Text;
+using System.Threading;
using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
namespace MoeLoaderP.Core.Sites
{
@@ -10,16 +12,43 @@ public class YuriimgSite : MoeSite
{
public override string HomeUrl => "http://yuriimg.com";
public override string ShortName => "yuriimg";
- public override string DisplayName => "Yuriimg(百合居)";
+ public override string DisplayName => "Yuriimg";
public YuriimgSite()
{
SupportState.IsSupportAutoHint = false;
SupportState.IsSupportRating = true;
+ DownloadTypes.Add("预览图", 3);
DownloadTypes.Add("原图", 4);
}
+ ///
+ /// 图片地址拼接 图片类型 0缩略图 1预览图 2原图
+ ///
+ private string TranslateImageUrl(dynamic json, int type = 0)
+ {
+ var fileExt = $"{json.file_ext}";
+ var sb = new StringBuilder();
+ sb.Append($"https://i.yuriimg.com/{json.src}/");
+ sb.Append("yuriimg.com ");
+ sb.Append($"{json.id} ");
+ if (!fileExt.IsEmpty())
+ {
+ switch (type)
+ {
+ case 1: sb.Append("thumb"); break;
+ case 2: sb.Append($"{fileExt}"); break;
+ default: sb.Append("contain"); break;
+ }
+ }
+ else { sb.Append("contain"); }
+
+ sb.Append($"{(json.page == null ? string.Empty : $" p{$"{json.page}".ToInt() + 1}")}");
+ sb.Append($".{(fileExt.IsEmpty() ? "webp" : fileExt)}");
+ return sb.ToString();
+ }
+
public async Task GetDetailTask(MoeItem img, string id, CancellationToken token = new CancellationToken())
{
var api = $"https://api.yuriimg.com/post/{id}";
@@ -27,7 +56,8 @@ public YuriimgSite()
if (json == null) return;
img.Score = $"{json.praise}".ToInt();
img.Date = $"{json.format_date}".ToDateTime();
- img.Urls.Add( 4, $"https://i.yuriimg.com/{json.src}");
+ img.Urls.Add(3, TranslateImageUrl(json, 1));
+ img.Urls.Add( 4, TranslateImageUrl(json,2));
img.Artist = $"{json.artist?.name}";
img.Uploader = $"{json.user?.name}";
img.UploaderId = $"{json.user?.id}";
@@ -68,6 +98,7 @@ public YuriimgSite()
}
+
public override async Task GetRealPageImagesAsync(SearchPara para, CancellationToken token)
{
if (Net == null) Net = new NetOperator(Settings, HomeUrl);
diff --git a/MoeLoaderP.Wpf/App.xaml b/MoeLoaderP.Wpf/App.xaml
index 6611554..8f9c17c 100644
--- a/MoeLoaderP.Wpf/App.xaml
+++ b/MoeLoaderP.Wpf/App.xaml
@@ -10,6 +10,7 @@
+
diff --git a/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml b/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml
index 4940f2b..2c2fad3 100644
--- a/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml
+++ b/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml
@@ -35,15 +35,15 @@
-
+
-
+
-
+
diff --git a/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml b/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml
index af6ffed..d663e52 100644
--- a/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml
+++ b/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml
@@ -65,13 +65,13 @@
-
+
-
+
-
+
@@ -84,7 +84,7 @@
-
+
@@ -98,7 +98,7 @@
+ VerticalAlignment="Top" Margin="0,4" Foreground="Black">
@@ -120,7 +120,7 @@
+ VerticalAlignment="Top" Margin="0,2,0,0" Foreground="Black">
@@ -142,7 +142,7 @@
+ VerticalAlignment="Top" Text="自定义文件命名格式(不带扩展名)" Margin="0,2" Foreground="Black"/>
diff --git a/MoeLoaderP.Wpf/LoginWindow.xaml.cs b/MoeLoaderP.Wpf/LoginWindow.xaml.cs
index 78206e9..1862147 100644
--- a/MoeLoaderP.Wpf/LoginWindow.xaml.cs
+++ b/MoeLoaderP.Wpf/LoginWindow.xaml.cs
@@ -69,8 +69,14 @@ private async void AuthButtonOnClick(object sender, RoutedEventArgs e)
return;
}
AuthMesTextBlock.Text = "认证成功,4秒后将关闭窗口";
+ await Task.Delay(1000);
+ AuthMesTextBlock.Text = "认证成功,3秒后将关闭窗口";
+ await Task.Delay(1000);
+ AuthMesTextBlock.Text = "认证成功,2秒后将关闭窗口";
+ await Task.Delay(1000);
+ AuthMesTextBlock.Text = "认证成功,1秒后将关闭窗口";
+ await Task.Delay(1000);
Site.CurrentSiteSetting.LoginCookie = _cookies;
- await Task.Delay(4000);
Close();
}));
}
diff --git a/MoeLoaderP.Wpf/MainWindow.xaml b/MoeLoaderP.Wpf/MainWindow.xaml
index bdf3d44..c3a8b89 100644
--- a/MoeLoaderP.Wpf/MainWindow.xaml
+++ b/MoeLoaderP.Wpf/MainWindow.xaml
@@ -1,10 +1,9 @@
-
+ VerticalAlignment="Top"
+ Margin="0,4,6,0"
+ Orientation="Horizontal">
-
-
-
+
+
+
@@ -216,8 +218,8 @@
Text="|" Margin="0,0,4,0" />
-
-
+
+
-
-
+
+
@@ -400,4 +402,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/MoeLoaderP.Wpf/MoeLoaderP.Wpf.csproj b/MoeLoaderP.Wpf/MoeLoaderP.Wpf.csproj
index b77e52f..1244793 100644
--- a/MoeLoaderP.Wpf/MoeLoaderP.Wpf.csproj
+++ b/MoeLoaderP.Wpf/MoeLoaderP.Wpf.csproj
@@ -331,19 +331,19 @@
- 88.2.9
+ 92.0.26
- 88.2.90
+ 92.0.260
- 88.2.90
+ 92.0.260
- 0.9.0
+ 0.10.0
- 2020.3.0
+ 2021.2.0
1.1.1
diff --git a/MoeLoaderP.Wpf/Properties/AssemblyInfo.cs b/MoeLoaderP.Wpf/Properties/AssemblyInfo.cs
index 6664f9c..e651d5d 100644
--- a/MoeLoaderP.Wpf/Properties/AssemblyInfo.cs
+++ b/MoeLoaderP.Wpf/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("leaful.com")]
[assembly: AssemblyProduct("MoeLoader +1s")]
-[assembly: AssemblyCopyright("© leaful.com 2018-2020")]
+[assembly: AssemblyCopyright("© leaful.com 2018-2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/_gsdata_/_file_state_v4._gs b/_gsdata_/_file_state_v4._gs
new file mode 100644
index 0000000..dbb27e2
Binary files /dev/null and b/_gsdata_/_file_state_v4._gs differ
diff --git a/_gsdata_/_insync_v4.gsl b/_gsdata_/_insync_v4.gsl
new file mode 100644
index 0000000..c6a32fb
--- /dev/null
+++ b/_gsdata_/_insync_v4.gsl
@@ -0,0 +1,2 @@
+By: Moeloader-Solution.LC-FSZ@LINCHEN at: 2021.08.31 14:48:56 ?D1???
+D:/Projects/MoeLoaderP/MoeLoaderP-Solution
\ No newline at end of file
diff --git a/_gsdata_/_recycled_db._gs b/_gsdata_/_recycled_db._gs
new file mode 100644
index 0000000..c014fb0
Binary files /dev/null and b/_gsdata_/_recycled_db._gs differ
diff --git a/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml b/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml
new file mode 100644
index 0000000..4940f2b
--- /dev/null
+++ b/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/AboutControl.xaml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml b/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml
new file mode 100644
index 0000000..af6ffed
--- /dev/null
+++ b/_gsdata_/_saved_/MoeLoaderP.Wpf/ControlParts/SettingsControl.xaml
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_gsdata_/_saved_/MoeLoaderP.Wpf/MainWindow.xaml b/_gsdata_/_saved_/MoeLoaderP.Wpf/MainWindow.xaml
new file mode 100644
index 0000000..ae0f5f8
--- /dev/null
+++ b/_gsdata_/_saved_/MoeLoaderP.Wpf/MainWindow.xaml
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file