diff --git a/Timelapse.Pack/Program.cs b/Timelapse.Pack/Program.cs
index 53bbf90..282b505 100644
--- a/Timelapse.Pack/Program.cs
+++ b/Timelapse.Pack/Program.cs
@@ -82,12 +82,12 @@ public class TimelapsePack
{
//build the library
Process p = new Process();
- p.StartInfo = new ProcessStartInfo("dotnet","build --configuration Release");
+ p.StartInfo = new ProcessStartInfo("dotnet","publish --configuration Release");
p.StartInfo.UseShellExecute=false;
if(p.Start())
{
p.WaitForExit();
- return Path.Combine(Environment.CurrentDirectory,"bin","Release","net6.0",$"{curDirName}.dll");
+ return Path.Combine(Environment.CurrentDirectory,"bin","Release","net6.0","publish",$"{curDirName}.dll");
}else{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("ERROR: process not started");
diff --git a/Timelapse.Pack/Timelapse.Pack.csproj b/Timelapse.Pack/Timelapse.Pack.csproj
index e66f543..4b06c59 100644
--- a/Timelapse.Pack/Timelapse.Pack.csproj
+++ b/Timelapse.Pack/Timelapse.Pack.csproj
@@ -17,9 +17,9 @@
Tesses.TimelapsePack
Mike Nolan
Tesses
- 1.0.2
- 1.0.2
- 1.0.2
+ 1.0.3
+ 1.0.3
+ 1.0.3
Extension Packaging tool for TimelapseNow
GPL-3.0-only
true
diff --git a/Timelapse/Program.cs b/Timelapse/Program.cs
index cc2d041..3c36188 100644
--- a/Timelapse/Program.cs
+++ b/Timelapse/Program.cs
@@ -324,11 +324,21 @@ public class MainForm : Form
svr.Listen();
});
t.Start();
-
+ Instance.HasCamera=c !=null;
if(c == null)
{
- MessageBox.Show("You will need to restart app to record");
- return;
+
+ Thread t2=new Thread(async()=>{
+ while(true)
+ {
+ Image rgb=new Image(Instance.Model.blankCameraWidth,Instance.Model.blankCameraHeight,new Rgb24(0,0,0));
+ await FrameChanged(rgb);
+
+ Thread.Sleep(50);
+ }
+ });
+ t2.Start();
+ return;
}
////////////////////////////////////////////////
diff --git a/TimelapseApi/Api.cs b/TimelapseApi/Api.cs
index 97655e0..030f7ce 100644
--- a/TimelapseApi/Api.cs
+++ b/TimelapseApi/Api.cs
@@ -27,7 +27,9 @@ public class GuiData
Instance.Extensions.Add(ext);
await ext._Create();
}
+ Instance.SetPriority();
}
+
public void FSChanged()
{
if(Instance != null)
@@ -52,8 +54,22 @@ public class GuiData
public IEnumerable<(Func ShareActionAsync,string Text,TimelapseExtension extension)>? Share {get {if(Instance==null) return null;return Instance._share;}}
public int CurrentFSIndex {get;set;}
}
+internal class PriorityCompare : IComparer<(Func, Task> Handler, string HandlerName, TimelapseExtension Extension, int Priority)>
+{
+ public int Compare((Func, Task> Handler, string HandlerName, TimelapseExtension Extension, int Priority) x, (Func, Task> Handler, string HandlerName, TimelapseExtension Extension, int Priority) y)
+ {
+
+ return y.Priority.CompareTo(x.Priority);
+ }
+}
public class Api
{
+ internal void SetPriority()
+ {
+ _frameHandlers.Sort(new PriorityCompare());
+ }
+
+ public bool HasCamera {get;set;}
public TimelapseSettingsModel Model = LoadModel();
internal static string ModelLocation = GetInternalFile("config.json");
private static TimelapseSettingsModel LoadModel()
@@ -193,7 +209,7 @@ public class Api
return fs;
}
- internal List<(Func,Task> Handler,string HandlerName, TimelapseExtension Extension)> _frameHandlers=new List<(Func, Task> Handler,string HandlerName, TimelapseExtension Extension)>();
+ internal List<(Func,Task> Handler,string HandlerName, TimelapseExtension Extension,int Priority)> _frameHandlers=new List<(Func, Task> Handler,string HandlerName, TimelapseExtension Extension,int Priority)>();
internal List<(Func