Skip to content

Commit

Permalink
[1.1.2.3]
Browse files Browse the repository at this point in the history
1.修复了概率性因为定时投稿事假换算可能导致投稿失败的问题。
2.修复了偶发性分片上传后系统不识别的问题。
  • Loading branch information
LeoChen98 committed Jun 17, 2019
1 parent 77e1a02 commit f88208f
Show file tree
Hide file tree
Showing 8 changed files with 363 additions and 218 deletions.
4 changes: 2 additions & 2 deletions BiliUploader/File2Base64Helper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.IO;
using System.Web;
using System.Text;
using System.Web;

namespace BiliUploader
{
Expand Down Expand Up @@ -84,7 +84,7 @@ public static string ImageToBase64(string filename)
header = "data:image/png;base64,";
break;
}
return HttpUtility.UrlEncode(header + Convert.ToBase64String(tmp),Encoding.UTF8);
return HttpUtility.UrlEncode(header + Convert.ToBase64String(tmp), Encoding.UTF8);
}
}

Expand Down
21 changes: 18 additions & 3 deletions BiliUploader/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
Expand All @@ -24,45 +23,59 @@ private static void Main(string[] args)
case "-c"://cookies
variables.CookiesString = args[++args_index];
break;

case "-ls"://list start
IsList = true;
break;

case "-le"://list end
IsList = false;
break;

case "-title":
variables.Title = args[++args_index];
break;

case "-cover"://cover image
variables.CoverFile = args[++args_index];
break;

case "-type"://type id
variables.type = int.Parse(args[++args_index]);
break;

case "-tags"://tags
variables.tags = args[++args_index];
break;

case "-desc"://description
variables.desc = args[++args_index];
break;

case "-dynamic"://dynamic
variables.dynamic = args[++args_index];
break;

case "-dt"://publish time(if smaller than the submit time +4h, dt=st+4h)
variables.dt = int.Parse(args[++args_index]);
break;

case "-copyright":
variables.copyright = int.Parse(args[++args_index]);
break;

case "-mid":
variables.mission_id = int.Parse(args[++args_index]);
break;

case "-subtitle":
variables.Subtitle = args[++args_index];
break;

case "-f":
variables.IsIgnoreError = true;
break;

case "-com":
string[] settings = args[++args_index].Split(',');
if (File.Exists("ffmpeg.exe"))
Expand All @@ -85,15 +98,18 @@ private static void Main(string[] args)
Console.Error.WriteLine("未找到ffmpeg,将不会对视频进行处理。");
}
break;

case "-d":
variables.IsDeleteTmp = true;
break;

case "-h":
case "-?":
case "?":
Console.WriteLine(Properties.Resources.helpstr);
Console.ReadKey();
return;

default:
if (IsList)
{
Expand Down Expand Up @@ -160,13 +176,12 @@ private static async Task UploadTask(int p)
//视频压制
if (variables.IsCompress)
{
variables.FileList[p-1] = await compressor.compress(variables.FileList[p - 1]);
variables.FileList[p - 1] = await compressor.compress(variables.FileList[p - 1]);
}
//上传
await new Uploader().DoUpload(variables.FileList[p - 1], p);
}


#endregion Private Methods
}
}
4 changes: 2 additions & 2 deletions BiliUploader/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.2")]
[assembly: AssemblyFileVersion("1.1.1.2")]
[assembly: AssemblyVersion("1.1.2.3")]
[assembly: AssemblyFileVersion("1.1.2.3")]
Loading

0 comments on commit f88208f

Please sign in to comment.