File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ private async void ButtonDownload_Click(object sender, EventArgs e)
134
134
135
135
await DownloadAsync ( ) . ConfigureAwait ( true ) ;
136
136
137
+ ChangeControlsState ( true ) ;
137
138
// force async
138
139
//await Task.Yield();
139
140
//ChangeControlsStates(false);
Original file line number Diff line number Diff line change @@ -61,23 +61,20 @@ public Task<Response> GetAvailableLanguagesAsync()
61
61
/// <returns></returns>
62
62
public Task < Response > SearchSubtitle ( string hash , bool getVersions = false )
63
63
{
64
- #if ! DEBUG
65
- Uri fullUrl = BaseAddress . ApplySearchSubtitleParameters ( hash , getVersions ) ;
64
+
65
+ Uri fullUrl = _baseAddress . ApplySearchSubtitleParameters ( hash , getVersions ) ;
66
66
Request request = BuildRequest ( fullUrl , HttpMethod . Get , null ) ;
67
- return SendDataAsync ( request ) ;
68
- #else
69
67
// NOTE: THIS CODE IS ONLY FOR TEST. (SUBDB DOESN'T ENCODED QUERY STRING)
70
68
// ONCE THE QUERY STRING IS ENCODED IT'S PUT INSIDE HTTP BODY INSTEAD OF URL
71
- Dictionary < string , string > requestParameters = new Dictionary < string , string >
72
- {
73
- [ "action" ] = "download" ,
74
- [ "hash" ] = hash ,
75
- // TODO: Language.
76
- } ;
69
+ //Dictionary<string, string> requestParameters = new Dictionary<string, string>
70
+ //{
71
+ // ["action"] = "download",
72
+ // ["hash"] = hash,
73
+ // // TODO: Language.
74
+ //};
75
+ //Request request = BuildRequest(new Uri("http://sandbox.thesubdb.com"), HttpMethod.Get, UriExtensions.GetFormURlEncodedContent(requestParameters));
77
76
78
- Request request = BuildRequest ( null , HttpMethod . Get , UriExtensions . GetFormURlEncodedContent ( requestParameters ) ) ;
79
77
return SendDataAsync ( request ) ;
80
- #endif
81
78
}
82
79
83
80
/// <summary>
You can’t perform that action at this time.
0 commit comments