Skip to content

Commit

Permalink
version 0.1.5
Browse files Browse the repository at this point in the history
Fix a bug in the opensubtitle provider causing application to freeze when more than two subtitles needs to be downloaded. Oh gee..
  • Loading branch information
zerratar committed Apr 17, 2018
1 parent d9fb5a1 commit d885282
Show file tree
Hide file tree
Showing 94 changed files with 3,150 additions and 93 deletions.
7 changes: 0 additions & 7 deletions SubSync.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SubSync.Tests", "tests\SubS
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubSync.Net462", "src\SubSync.Net462\SubSync.Net462.csproj", "{509779D3-9078-4E5D-A669-201D64D9B31B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubSync.Core", ".src\SubSync.Core\SubSync.Core.csproj", "{3B7818EB-0872-460B-B4CA-499FDCD32CBE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,10 +31,6 @@ Global
{509779D3-9078-4E5D-A669-201D64D9B31B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{509779D3-9078-4E5D-A669-201D64D9B31B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{509779D3-9078-4E5D-A669-201D64D9B31B}.Release|Any CPU.Build.0 = Release|Any CPU
{3B7818EB-0872-460B-B4CA-499FDCD32CBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B7818EB-0872-460B-B4CA-499FDCD32CBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B7818EB-0872-460B-B4CA-499FDCD32CBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B7818EB-0872-460B-B4CA-499FDCD32CBE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -45,7 +39,6 @@ Global
{A1B8C57E-2B99-4D21-A35E-D050F3BA279B} = {C182B254-972A-4CB2-8002-1653E0F24323}
{71C95A54-2D86-4AC9-AE79-05CF93E063EA} = {7D3E5130-833D-4426-9E7C-7D91CBA217B3}
{509779D3-9078-4E5D-A669-201D64D9B31B} = {C182B254-972A-4CB2-8002-1653E0F24323}
{3B7818EB-0872-460B-B4CA-499FDCD32CBE} = {C182B254-972A-4CB2-8002-1653E0F24323}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1EBFA09F-C84B-4414-AAF2-998BD08F6A97}
Expand Down

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/SubSync.Core/Core/Exceptions/SubtitleNotFoundException.cs

This file was deleted.

12 changes: 0 additions & 12 deletions src/SubSync.Core/SubSync.Core.csproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal struct AuthCredentials
public struct AuthCredentials
{
public readonly string Username;
public readonly string Password;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SubSync
{
internal class ConsoleLogger : ILogger
public class ConsoleLogger : ILogger
{
private readonly object writelock = new object();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace SubSync
{
public class DownloadQuotaReachedException : Exception
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal class NestedArchiveNotSupportedException : Exception
public class NestedArchiveNotSupportedException : Exception
{
public NestedArchiveNotSupportedException(string filename)
: base($"Downloaded archive, '{filename}' @red@contain another archive within it and cannot properly be extracted. Archive kept for manual labor.")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace SubSync
{
public class RequestQuotaReachedException : Exception
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace SubSync
{
public class SubtitleNotFoundException : Exception
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SubSync
{
internal class FallbackSubtitleProvider : ISubtitleProvider, IDisposable
public class FallbackSubtitleProvider : ISubtitleProvider, IDisposable
{
private readonly ConcurrentDictionary<string, int> providerCache = new ConcurrentDictionary<string, int>();
private readonly ISubtitleProvider[] _providers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal class FileBasedCredentialsProvider : IAuthCredentialProvider
public class FileBasedCredentialsProvider : IAuthCredentialProvider
{
private readonly string filename;
private readonly ILogger logger;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal interface IAuthCredentialProvider
public interface IAuthCredentialProvider
{
AuthCredentials Get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal interface IFileSystemWatcher
public interface IFileSystemWatcher
{
void Start();
void Stop();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal interface ILogger
public interface ILogger
{
void Write(string message);
void WriteLine(string message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
namespace SubSync
{

internal interface IStatusResultReporter<TReportResult> : IStatusReporter
public interface IStatusResultReporter<TReportResult> : IStatusReporter
{
event EventHandler<TReportResult> OnReportFinished;
}

internal interface IStatusReporter<in TReportData> : IStatusReporter
public interface IStatusReporter<in TReportData> : IStatusReporter
{
void Report(TReportData data);
}

internal interface IStatusReporter
public interface IStatusReporter
{
void FinishReport();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SubSync
{
internal interface ISubtitleProvider
public interface ISubtitleProvider
{
Task<string> GetAsync(string name, string outputDirectory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SubSync
{
internal interface IWorker : IDisposable
public interface IWorker : IDisposable
{
Task SyncAsync();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal interface IWorkerProvider
public interface IWorkerProvider
{
IWorker GetWorker(IWorkerQueue queue, string file, int tryCount = 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal interface IWorkerQueue : IDisposable
public interface IWorkerQueue : IDisposable
{
bool Enqueue(string fullFilePath);
void Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal class QueueCompletedEventArgs : EventArgs
public class QueueCompletedEventArgs : EventArgs
{
public QueueCompletedEventArgs(int total, int succeeded, int failed)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SubSync
{
internal class QueueProcessReporter : IStatusReporter<WorkerStatus>, IStatusResultReporter<QueueProcessResult>
public class QueueProcessReporter : IStatusReporter<WorkerStatus>, IStatusResultReporter<QueueProcessResult>
{
private readonly List<string> failed = new List<string>();
private readonly object reportMutex = new object();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal struct QueueProcessResult
public struct QueueProcessResult
{
public readonly int Total;
public readonly int Succeeded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SubSync
{
internal class SubtitleLanguage
public class SubtitleLanguage
{
public string LanguageId { get; }
public string Iso639 { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace SubSync
{
internal abstract class SubtitleProviderBase : ISubtitleProvider
public abstract class SubtitleProviderBase : ISubtitleProvider
{
protected readonly HashSet<string> Languages;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SubSync
{
internal class SubtitleSynchronizer : IFileSystemWatcher, IDisposable
public class SubtitleSynchronizer : IFileSystemWatcher, IDisposable
{
private readonly ILogger logger;
private readonly IWorkerQueue workerQueue;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace SubSync
{
internal class Worker : IWorker
public class Worker : IWorker
{
private readonly string filePath;
private readonly ILogger logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SubSync
{
internal class WorkerProvider : IWorkerProvider
public class WorkerProvider : IWorkerProvider
{
private readonly ILogger logger;
private readonly ISubtitleProvider subtitleProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace SubSync
{
internal class WorkerQueue : IWorkerQueue
public class WorkerQueue : IWorkerQueue
{
private const int ConcurrentWorkers = 7;
private const int ConcurrentWorkers = 5;
private readonly IWorkerProvider workerProvider;
private readonly IStatusReporter statusReporter;
private readonly ConcurrentQueue<IWorker> queue = new ConcurrentQueue<IWorker>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SubSync
{
internal struct WorkerStatus
public struct WorkerStatus
{
public readonly bool Succeeded;
public readonly string Target;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ namespace SubSync
{
public class XmlRpcObject : XmlRpcObjectBase
{
internal readonly List<XmlRpcObjectBase> children = new List<XmlRpcObjectBase>();
public readonly List<XmlRpcObjectBase> children = new List<XmlRpcObjectBase>();

internal void Add(XmlRpcObjectBase child)
public void Add(XmlRpcObjectBase child)
{
children.Add(child);
}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/SubSync.Net462/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.4.0")]
[assembly: AssemblyFileVersion("0.1.4.0")]
[assembly: AssemblyVersion("0.1.5.0")]
[assembly: AssemblyFileVersion("0.1.5.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace SubSync
/// <summary>
// Implementation of the https://www.opensubtitles.org XML-RPC Api
/// </summary>
internal class OpenSubtitles : SubtitleProviderBase, IDisposable
public class OpenSubtitles : SubtitleProviderBase, IDisposable
{
private const string VipApiUrl = "https://vip-api.opensubtitles.org/xml-rpc";
private const string ApiUrl = "http://api.opensubtitles.org/xml-rpc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace SubSync
{
internal class Subscene : SubtitleProviderBase
public class Subscene : SubtitleProviderBase
{
private const string SearchApiUrlFormat = "https://subscene.com/subtitles/release?q={0}&r=true";
private const string SubtitleApiUrlFormat = "https://subscene.com/{0}";
Expand Down
Loading

0 comments on commit d885282

Please sign in to comment.