Skip to content

Commit

Permalink
Fixed bug in Upload.AutoSetPublishAtDateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Drexel2k committed Oct 16, 2020
1 parent 0a0fd32 commit 0001c39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion VidUp.Business/Upload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,11 @@ public void AutoSetPublishAtDateTime()
nextPossibleDateTime = this.template.PublishAtSchedule.GetNextDateTime(plannedUntil);
plannedUntil = nextPossibleDateTime;

IEnumerable<Upload> relevantUploads = this.template.Uploads.Where(upload => upload.UploadStart == null || upload.UploadStart > upload.Template.PublishAtSchedule.IgnoreUploadsBefore);
IEnumerable<Upload> relevantUploads;
relevantUploads = this.Template.PublishAtSchedule.IgnoreUploadsBefore == null ?
this.template.Uploads.Where(upload => upload != this).ToArray() :
this.template.Uploads.Where(upload => upload != this && (upload.UploadStart == null || upload.UploadStart > upload.Template.PublishAtSchedule.IgnoreUploadsBefore)).ToArray();

if (!relevantUploads.Any(upload => (upload.UploadStatus == UplStatus.ReadyForUpload || upload.UploadStatus == UplStatus.Uploading ||
upload.UploadStatus == UplStatus.Stopped || upload.UploadStatus == UplStatus.Finished)
&& upload.PublishAt == nextPossibleDateTime))
Expand Down
6 changes: 3 additions & 3 deletions VidUp.UI/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
[assembly: System.Reflection.AssemblyProductAttribute("VidUp")]
[assembly: System.Reflection.AssemblyTitleAttribute("VidUp")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Drexel Development")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.4.0.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.4.0.1")]
//Shown in Gui/Setup
[assembly: System.Reflection.AssemblyVersionAttribute("1.4.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.4.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.4.0.1")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.4.0.1")]
[assembly: System.Reflection.AssemblyCopyright("©2020 Drexel Development")]
[assembly: ComVisible(false)]

Expand Down

0 comments on commit 0001c39

Please sign in to comment.