mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Added sabtitle method
Added custom parse option to Indexrbase
This commit is contained in:
parent
9028e498ca
commit
10ad7d1ed5
13 changed files with 289 additions and 84 deletions
|
@ -127,7 +127,18 @@ namespace NzbDrone.Core.Providers.Jobs
|
|||
{
|
||||
Logger.Debug("Initializing background thread");
|
||||
|
||||
ThreadStart starter = () => Execute(jobType, targetId);
|
||||
ThreadStart starter = () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Execute(jobType, targetId);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_isRunning = false;
|
||||
}
|
||||
};
|
||||
|
||||
_jobThread = new Thread(starter) { Name = "TimerThread", Priority = ThreadPriority.BelowNormal };
|
||||
_jobThread.Start();
|
||||
|
||||
|
@ -169,14 +180,7 @@ namespace NzbDrone.Core.Providers.Jobs
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.ErrorException("An error has occurred while executing timer job" + timerClass.Name, e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (_jobThread == Thread.CurrentThread)
|
||||
{
|
||||
_isRunning = false;
|
||||
}
|
||||
Logger.ErrorException("An error has occurred while executing timer job " + timerClass.Name, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,14 +198,13 @@ namespace NzbDrone.Core.Providers.Jobs
|
|||
var timerProviderLocal = timer;
|
||||
if (!currentTimer.Exists(c => c.TypeName == timerProviderLocal.GetType().ToString()))
|
||||
{
|
||||
var settings = new JobSetting()
|
||||
var settings = new JobSetting
|
||||
{
|
||||
Enable = true,
|
||||
TypeName = timer.GetType().ToString(),
|
||||
Name = timerProviderLocal.Name,
|
||||
Interval = timerProviderLocal.DefaultInterval,
|
||||
LastExecution = DateTime.MinValue
|
||||
|
||||
};
|
||||
|
||||
SaveSettings(settings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue