Exemplo n.º 1
0
        protected override void DoKeepAliveSession()
        {
            OsdbStatusResponse rsp = _client.NoOperation(_sessionToken);

            if (!rsp.IsOK())
            {
                // Logout failed.
                Logger.LogError("OsdbSession: No-Operation failed: {0}", rsp.status);
            }
        }
Exemplo n.º 2
0
        protected override void DoCleanup()
        {
            try
            {
                Logger.LogTrace("OsdbSession: Attempt to logout from OSDB server ...");

                OsdbStatusResponse rsp = _client.Logout(_sessionToken);
                if (!rsp.IsOK())
                {
                    // Logout failed.
                    throw new SubtitleDownloadException("Logout from OSDB server has failed", rsp.status);
                }

                Logger.LogTrace("OsdbSession: Succesfully logged out from OSDB server.");
            }
            finally
            {
                _client = null;

                Logger.LogTrace("OsdbSession: Object destroyed.");
            }
        }