Skip to content

Commit

Permalink
Add release instructions and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tijmen van der Burgt committed Mar 5, 2017
1 parent 5a52319 commit 1999546
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 77 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Release procedure

1. Update `Subtle.Gui\Properties\AssemblyInfo.cs`
2. **Subtle.Setup** > Properties (F4) > Update Version and generate a new ProductCode
3. Build **Subtle.Setup** using `Release` configuration
4. Run `release\release.cmd` and distribute `release\Subtle.exe`
2 changes: 1 addition & 1 deletion Subtle.Gui/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.4.1")]
[assembly: AssemblyFileVersion("0.4.2")]
38 changes: 19 additions & 19 deletions Subtle.Model/OSDbClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ public class OSDbClient
/// </summary>
public const int SearchLimit = 100;

private readonly IOSDbProxy proxy;
private Session session;
private readonly IOSDbProxy _proxy;
private Session _session;

public OSDbClient() : this(DefaultUserAgent)
{
}

public OSDbClient(string userAgent)
{
proxy = XmlRpcProxyGen.Create<IOSDbProxy>();
proxy.Url = ApiUrl;
proxy.UserAgent = userAgent;
proxy.Timeout = (int)Timeout.TotalMilliseconds;
proxy.EnableCompression = true;
_proxy = XmlRpcProxyGen.Create<IOSDbProxy>();
_proxy.Url = ApiUrl;
_proxy.UserAgent = userAgent;
_proxy.Timeout = (int)Timeout.TotalMilliseconds;
_proxy.EnableCompression = true;
}

public async Task<Session> InitSessionAsync()
{
var task = Task.Factory.FromAsync(
(callback, state) => proxy.BeginLogIn(string.Empty, string.Empty, string.Empty, proxy.UserAgent, callback),
proxy.EndLogIn,
(callback, state) => _proxy.BeginLogIn(string.Empty, string.Empty, string.Empty, _proxy.UserAgent, callback),
_proxy.EndLogIn,
null);

session = await ExecuteOSDbTask(task);
return session;
_session = await ExecuteOSDbTask(task);
return _session;
}

public Task<SubtitleSearchResultCollection> SearchSubtitlesAsync(params SearchQuery[] query)
Expand All @@ -53,8 +53,8 @@ public Task<SubtitleSearchResultCollection> SearchSubtitlesAsync(params SearchQu

var options = new SearchOptions { Limit = SearchLimit };
var task = Task.Factory.FromAsync(
(callback, state) => proxy.BeginSearchSubtitles(session.Token, query, options, callback),
proxy.EndSearchSubtitles,
(callback, state) => _proxy.BeginSearchSubtitles(_session.Token, query, options, callback),
_proxy.EndSearchSubtitles,
null);

return ExecuteOSDbTask(task);
Expand All @@ -65,8 +65,8 @@ public Task<SubtitleFileCollection> DownloadSubtitlesAsync(params string[] fileI
EnsureSession();

var task = Task.Factory.FromAsync(
(callback, state) => proxy.BeginDownloadSubtitles(session.Token, fileIds, callback),
proxy.EndDownloadSubtitles,
(callback, state) => _proxy.BeginDownloadSubtitles(_session.Token, fileIds, callback),
_proxy.EndDownloadSubtitles,
null);

return ExecuteOSDbTask(task);
Expand All @@ -76,8 +76,8 @@ public async Task<ServerInfo> GetServerInfoAsync()
{
var watch = Stopwatch.StartNew();
var task = Task.Factory.FromAsync(
(callback, state) => proxy.BeginGetServerInfo(callback),
proxy.EndGetServerInfo,
(callback, state) => _proxy.BeginGetServerInfo(callback),
_proxy.EndGetServerInfo,
null);

var info = await task.WithTimeout(Timeout);
Expand All @@ -89,12 +89,12 @@ public async Task<ServerInfo> GetServerInfoAsync()

public LanguageCollection GetLanguages()
{
return proxy.GetLanguages();
return _proxy.GetLanguages();
}

private void EnsureSession()
{
if (string.IsNullOrEmpty(session?.Token))
if (string.IsNullOrEmpty(_session?.Token))
{
throw new InvalidOperationException("Session is not initialized");
}
Expand Down
Loading

0 comments on commit 1999546

Please sign in to comment.