Support audio in Gfycat video uploads

This commit is contained in:
Jaex 2019-03-07 08:05:42 +03:00
parent ea55bc5975
commit 872fc077d0

View file

@ -59,7 +59,7 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
return new GfycatUploader(config.GfycatOAuth2Info)
{
UploadMethod = config.GfycatAccountType,
Private = !config.GfycatIsPublic,
Private = !config.GfycatIsPublic
};
}
@ -74,6 +74,7 @@ public class GfycatUploader : FileUploader, IOAuth2
public bool NoResize { get; set; }
public bool IgnoreExisting { get; set; }
public bool Private { get; set; }
public bool KeepAudio { get; set; }
private const string URL_AUTHORIZE = "https://gfycat.com/oauth/authorize";
private const string URL_UPLOAD = "https://filedrop.gfycat.com";
@ -87,6 +88,7 @@ public GfycatUploader(OAuth2Info oauth)
AuthInfo = oauth;
NoResize = true;
IgnoreExisting = true;
KeepAudio = true;
}
public string GetAuthorizationURL()
@ -263,6 +265,7 @@ private GfycatCreateResponse CreateGfycat(NameValueCollection headers)
args.Add("private", Private);
args.Add("noResize", NoResize);
args.Add("noMd5", IgnoreExisting);
args.Add("keepAudio", KeepAudio);
string json = JsonConvert.SerializeObject(args);