mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-02-25 05:53:18 +00:00
sync updates
This commit is contained in:
@@ -172,7 +172,23 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
job.Progress = null;
|
||||
}
|
||||
|
||||
if (pct >= 100)
|
||||
if (jobItems.All(i => i.Status == SyncJobItemStatus.Queued))
|
||||
{
|
||||
job.Status = SyncJobStatus.Queued;
|
||||
}
|
||||
else if (jobItems.All(i => i.Status == SyncJobItemStatus.Failed))
|
||||
{
|
||||
job.Status = SyncJobStatus.Failed;
|
||||
}
|
||||
else if (jobItems.All(i => i.Status == SyncJobItemStatus.Cancelled))
|
||||
{
|
||||
job.Status = SyncJobStatus.Cancelled;
|
||||
}
|
||||
else if (jobItems.Any(i => i.Status == SyncJobItemStatus.Converting))
|
||||
{
|
||||
job.Status = SyncJobStatus.Converting;
|
||||
}
|
||||
else if (pct >= 100)
|
||||
{
|
||||
if (jobItems.Any(i => i.Status == SyncJobItemStatus.Failed))
|
||||
{
|
||||
@@ -183,13 +199,9 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
job.Status = SyncJobStatus.Completed;
|
||||
}
|
||||
}
|
||||
else if (pct.Equals(0) && jobItems.All(i => i.Status == SyncJobItemStatus.Queued))
|
||||
{
|
||||
job.Status = SyncJobStatus.Queued;
|
||||
}
|
||||
else
|
||||
{
|
||||
job.Status = SyncJobStatus.InProgress;
|
||||
job.Status = SyncJobStatus.Transferring;
|
||||
}
|
||||
|
||||
return _syncRepo.Update(job);
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
|
||||
public event EventHandler<GenericEventArgs<SyncJobCreationResult>> SyncJobCreated;
|
||||
public event EventHandler<GenericEventArgs<SyncJob>> SyncJobCancelled;
|
||||
public event EventHandler<GenericEventArgs<SyncJob>> SyncJobUpdated;
|
||||
|
||||
public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger, IUserManager userManager, Func<IDtoService> dtoService, IApplicationHost appHost, ITVSeriesManager tvSeriesManager, Func<IMediaEncoder> mediaEncoder, IFileSystem fileSystem, Func<ISubtitleEncoder> subtitleEncoder, IConfigurationManager config)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user