remove client test app
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
To use:
|
||||
1. Right click the project and choose "Manage Nuget Packages"
|
||||
2. Choose the restore option in the Nuget screen (or just install the latest StreamDeck-Tools from Nuget)
|
||||
3. Update the manifest.json file with the correct details about your plugin
|
||||
4. Modify PluginAction.cs as needed (it holds the logic for your plugin)
|
||||
5. Modify the PropertyInspector\PluginActionPI.html and PropertyInspector\PluginActionPI.js as needed to show field in the Property Inspector
|
||||
6. Before releasing, change the Assembly Information (Right click the project -> Properties -> Application -> Assembly Information...)
|
||||
|
||||
For help with StreamDeck-Tools:
|
||||
Discord Server: http://discord.barraider.com
|
||||
Resources:
|
||||
* StreamDeck-Tools samples and tutorial: https://github.com/BarRaider/streamdeck-tools
|
||||
* EasyPI library (for working with Property Inspector): https://github.com/BarRaider/streamdeck-easypi
|
||||
|
||||
To use:
|
||||
1. Right click the project and choose "Manage Nuget Packages"
|
||||
2. Choose the restore option in the Nuget screen (or just install the latest StreamDeck-Tools from Nuget)
|
||||
3. Update the manifest.json file with the correct details about your plugin
|
||||
4. Modify PluginAction.cs as needed (it holds the logic for your plugin)
|
||||
5. Modify the PropertyInspector\PluginActionPI.html and PropertyInspector\PluginActionPI.js as needed to show field in the Property Inspector
|
||||
6. Before releasing, change the Assembly Information (Right click the project -> Properties -> Application -> Assembly Information...)
|
||||
|
||||
For help with StreamDeck-Tools:
|
||||
Discord Server: http://discord.barraider.com
|
||||
Resources:
|
||||
* StreamDeck-Tools samples and tutorial: https://github.com/BarRaider/streamdeck-tools
|
||||
* EasyPI library (for working with Property Inspector): https://github.com/BarRaider/streamdeck-easypi
|
||||
|
||||
|
||||
@ -1,42 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CommandLine" publicKeyToken="5a870481e358d379" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Drawing.Common" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CommandLine" publicKeyToken="5a870481e358d379" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Drawing.Common" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
@ -1 +1 @@
|
||||
|
||||
|
||||
|
||||
@ -1,53 +1,53 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public enum PlaybackType
|
||||
{
|
||||
playStop,
|
||||
playOverlap
|
||||
}
|
||||
public class ClipMetadata
|
||||
{
|
||||
[JsonProperty(PropertyName = "filename")]
|
||||
[JsonPropertyName("filename")]
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "volume")]
|
||||
[JsonPropertyName("volume")]
|
||||
public double Volume { get; set; } = 1.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "startTime")]
|
||||
[JsonPropertyName("startTime")]
|
||||
public double StartTime { get; set; } = 0.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "endTime")]
|
||||
[JsonPropertyName("endTime")]
|
||||
public double EndTime { get; set; } = 0.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "playbackType")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[JsonPropertyName("playbackType")]
|
||||
public PlaybackType PlaybackType { get; set; } = PlaybackType.playStop;
|
||||
}
|
||||
}
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public enum PlaybackType
|
||||
{
|
||||
playStop,
|
||||
playOverlap
|
||||
}
|
||||
public class ClipMetadata
|
||||
{
|
||||
[JsonProperty(PropertyName = "filename")]
|
||||
[JsonPropertyName("filename")]
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "volume")]
|
||||
[JsonPropertyName("volume")]
|
||||
public double Volume { get; set; } = 1.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "startTime")]
|
||||
[JsonPropertyName("startTime")]
|
||||
public double StartTime { get; set; } = 0.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "endTime")]
|
||||
[JsonPropertyName("endTime")]
|
||||
public double EndTime { get; set; } = 0.0;
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "playbackType")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
[JsonPropertyName("playbackType")]
|
||||
public PlaybackType PlaybackType { get; set; } = PlaybackType.playStop;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,158 +1,158 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using SocketIOClient;
|
||||
using BarRaider.SdTools;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public class ClipTrimClient
|
||||
{
|
||||
private static ClipTrimClient? instance;
|
||||
public static ClipTrimClient Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new ClipTrimClient();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
//private HttpClient httpClient;
|
||||
private SocketIO socket;
|
||||
|
||||
public int PortNumber { get; set; } = 5010;
|
||||
|
||||
public ClipTrimClient()
|
||||
{
|
||||
//httpClient = new HttpClient()
|
||||
//{
|
||||
// BaseAddress = new Uri("http://localhost:5010/"),
|
||||
// Timeout = TimeSpan.FromSeconds(10)
|
||||
//};
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"Starting ClipTrimClient on port {PortNumber}");
|
||||
socket = new SocketIO(new Uri($"http://localhost:5010/"));
|
||||
socket.Options.AutoUpgrade = false;
|
||||
socket.Options.ConnectionTimeout = TimeSpan.FromSeconds(10);
|
||||
socket.Options.Reconnection = true;
|
||||
socket.On("full_data", ctx =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = ctx.GetValue<List<CollectionMetaData>>(0);
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"full_data event {JsonConvert.SerializeObject(response)}");
|
||||
Collections = response!;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Collections {JsonConvert.SerializeObject(Collections)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"full_data error {ex.ToString()}");
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
socket.On("collection_updated", ctx =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = ctx.GetValue<CollectionMetaData>(0)!;
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"collection_updated event {JsonConvert.SerializeObject(response)}");
|
||||
int index = Collections.FindIndex(x => x.Id == response.Id);
|
||||
if (index != -1)
|
||||
{
|
||||
Collections[index] = response;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
|
||||
Task.Run(async () => await socket.ConnectAsync());
|
||||
//Task.Run(ShortPoll);
|
||||
}
|
||||
|
||||
|
||||
//public async Task ShortPoll()
|
||||
//{
|
||||
// while (true)
|
||||
// {
|
||||
// await GetMetadata();
|
||||
// await Task.Delay(TimeSpan.FromSeconds(5)); await Task.Delay(TimeSpan.FromSeconds(5));
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
public List<CollectionMetaData> Collections { get; private set; } = new List<CollectionMetaData>();
|
||||
public int SelectedCollection { get; private set; } = -1;
|
||||
public int PageIndex { get; private set; } = 0;
|
||||
//private async Task GetMetadata()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// var response = await httpClient.GetAsync("meta");
|
||||
// if (response.IsSuccessStatusCode)
|
||||
// {
|
||||
// var json = await response.Content.ReadAsStringAsync();
|
||||
// dynamic collections = JsonConvert.DeserializeObject(json);
|
||||
// collections = collections.collections;
|
||||
// Collections = JsonConvert.DeserializeObject<List<CollectionMetaData>>(collections.ToString());
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Error pinging ClipTrim API: {ex.Message}");
|
||||
// return;
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
public List<string> GetCollectionNames()
|
||||
{
|
||||
//await GetMetadata();
|
||||
return Collections.Select(x => x.Name).ToList();
|
||||
}
|
||||
|
||||
public void SetSelectedCollectionByName(string name)
|
||||
{
|
||||
SelectedCollection = Collections.FindIndex(x => x.Name == name);
|
||||
if (SelectedCollection != -1)
|
||||
{
|
||||
PageIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClipMetadata? GetClipByPagedIndex(int index)
|
||||
{
|
||||
if (SelectedCollection == -1) return null;
|
||||
int clipIndex = PageIndex * 10 + index;
|
||||
var collection = Collections[SelectedCollection];
|
||||
if (clipIndex >= 0 && clipIndex < collection.Clips.Count)
|
||||
{
|
||||
return collection.Clips[clipIndex];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public async void PlayClip(ClipMetadata? metadata)
|
||||
{
|
||||
if (metadata == null) return;
|
||||
|
||||
//var response = await httpClient.PostAsync("playback/start", new StringContent(JsonConvert.SerializeObject(metadata), Encoding.UTF8, "application/json"));
|
||||
//if (!response.IsSuccessStatusCode)
|
||||
//{
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Error playing clip: {response.ReasonPhrase}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using SocketIOClient;
|
||||
using BarRaider.SdTools;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public class ClipTrimClient
|
||||
{
|
||||
private static ClipTrimClient? instance;
|
||||
public static ClipTrimClient Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new ClipTrimClient();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
//private HttpClient httpClient;
|
||||
private SocketIO socket;
|
||||
|
||||
public int PortNumber { get; set; } = 5010;
|
||||
|
||||
public ClipTrimClient()
|
||||
{
|
||||
//httpClient = new HttpClient()
|
||||
//{
|
||||
// BaseAddress = new Uri("http://localhost:5010/"),
|
||||
// Timeout = TimeSpan.FromSeconds(10)
|
||||
//};
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"Starting ClipTrimClient on port {PortNumber}");
|
||||
socket = new SocketIO(new Uri($"http://localhost:5010/"));
|
||||
socket.Options.AutoUpgrade = false;
|
||||
socket.Options.ConnectionTimeout = TimeSpan.FromSeconds(10);
|
||||
socket.Options.Reconnection = true;
|
||||
socket.On("full_data", ctx =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = ctx.GetValue<List<CollectionMetaData>>(0);
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"full_data event {JsonConvert.SerializeObject(response)}");
|
||||
Collections = response!;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Collections {JsonConvert.SerializeObject(Collections)}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"full_data error {ex.ToString()}");
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
socket.On("collection_updated", ctx =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = ctx.GetValue<CollectionMetaData>(0)!;
|
||||
Logger.Instance.LogMessage(TracingLevel.INFO, $"collection_updated event {JsonConvert.SerializeObject(response)}");
|
||||
int index = Collections.FindIndex(x => x.Id == response.Id);
|
||||
if (index != -1)
|
||||
{
|
||||
Collections[index] = response;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
|
||||
Task.Run(async () => await socket.ConnectAsync());
|
||||
//Task.Run(ShortPoll);
|
||||
}
|
||||
|
||||
|
||||
//public async Task ShortPoll()
|
||||
//{
|
||||
// while (true)
|
||||
// {
|
||||
// await GetMetadata();
|
||||
// await Task.Delay(TimeSpan.FromSeconds(5)); await Task.Delay(TimeSpan.FromSeconds(5));
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
public List<CollectionMetaData> Collections { get; private set; } = new List<CollectionMetaData>();
|
||||
public int SelectedCollection { get; private set; } = -1;
|
||||
public int PageIndex { get; private set; } = 0;
|
||||
//private async Task GetMetadata()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// var response = await httpClient.GetAsync("meta");
|
||||
// if (response.IsSuccessStatusCode)
|
||||
// {
|
||||
// var json = await response.Content.ReadAsStringAsync();
|
||||
// dynamic collections = JsonConvert.DeserializeObject(json);
|
||||
// collections = collections.collections;
|
||||
// Collections = JsonConvert.DeserializeObject<List<CollectionMetaData>>(collections.ToString());
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Error pinging ClipTrim API: {ex.Message}");
|
||||
// return;
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
public List<string> GetCollectionNames()
|
||||
{
|
||||
//await GetMetadata();
|
||||
return Collections.Select(x => x.Name).ToList();
|
||||
}
|
||||
|
||||
public void SetSelectedCollectionByName(string name)
|
||||
{
|
||||
SelectedCollection = Collections.FindIndex(x => x.Name == name);
|
||||
if (SelectedCollection != -1)
|
||||
{
|
||||
PageIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClipMetadata? GetClipByPagedIndex(int index)
|
||||
{
|
||||
if (SelectedCollection == -1) return null;
|
||||
int clipIndex = PageIndex * 10 + index;
|
||||
var collection = Collections[SelectedCollection];
|
||||
if (clipIndex >= 0 && clipIndex < collection.Clips.Count)
|
||||
{
|
||||
return collection.Clips[clipIndex];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public async void PlayClip(ClipMetadata? metadata)
|
||||
{
|
||||
if (metadata == null) return;
|
||||
|
||||
//var response = await httpClient.PostAsync("playback/start", new StringContent(JsonConvert.SerializeObject(metadata), Encoding.UTF8, "application/json"));
|
||||
//if (!response.IsSuccessStatusCode)
|
||||
//{
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Error playing clip: {response.ReasonPhrase}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public class CollectionMetaData
|
||||
{
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "clips")]
|
||||
[JsonPropertyName("clips")]
|
||||
public List<ClipMetadata> Clips { get; set; } = new List<ClipMetadata>();
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet.Client
|
||||
{
|
||||
public class CollectionMetaData
|
||||
{
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "clips")]
|
||||
[JsonPropertyName("clips")]
|
||||
public List<ClipMetadata> Clips { get; set; } = new List<ClipMetadata>();
|
||||
|
||||
|
||||
[JsonProperty(PropertyName = "id")]
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,95 +1,95 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputType>Exe</OutputType>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PreBuildEvent>npm run stop</PreBuildEvent>
|
||||
<PostBuildEvent>npm run start</PostBuildEvent>
|
||||
<AssemblyTitle>ClipTrimDotNet</AssemblyTitle>
|
||||
<Product>ClipTrimDotNet</Product>
|
||||
<Copyright>Copyright © 2020</Copyright>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\com.michal-courson.cliptrim.sdPlugin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\ClipTrimDotNet.sdPlugin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Primitives" Version="10.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="NLog" Version="6.0.5" />
|
||||
<PackageReference Include="SocketIOClient" Version="4.0.0.2" />
|
||||
<PackageReference Include="SocketIOClient.Common" Version="4.0.0" />
|
||||
<PackageReference Include="SocketIOClient.Serializer" Version="4.0.0.1" />
|
||||
<PackageReference Include="SocketIOClient.Serializer.NewtonsoftJson" Version="4.0.0.1" />
|
||||
<PackageReference Include="StreamDeck-Tools" Version="6.3.2" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="10.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="9.0.10" />
|
||||
<PackageReference Include="System.IO.Pipelines" Version="10.0.2" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="6.0.1" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="10.0.2" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.3" />
|
||||
<PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.Http" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="DialLayout.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="manifest.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="!!README!!.txt" />
|
||||
<Content Include="Images\categoryIcon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\categoryIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\icon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\icon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginAction%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginAction.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginIcon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="package.json" />
|
||||
<Content Include="PropertyInspector\profile_swticher.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="PropertyInspector\file_player.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputType>Exe</OutputType>
|
||||
<LangVersion>10</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PreBuildEvent>npm run stop</PreBuildEvent>
|
||||
<PostBuildEvent>npm run start</PostBuildEvent>
|
||||
<AssemblyTitle>ClipTrimDotNet</AssemblyTitle>
|
||||
<Product>ClipTrimDotNet</Product>
|
||||
<Copyright>Copyright © 2020</Copyright>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\com.michal-courson.cliptrim.sdPlugin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\ClipTrimDotNet.sdPlugin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Primitives" Version="10.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="NLog" Version="6.0.5" />
|
||||
<PackageReference Include="SocketIOClient" Version="4.0.0.2" />
|
||||
<PackageReference Include="SocketIOClient.Common" Version="4.0.0" />
|
||||
<PackageReference Include="SocketIOClient.Serializer" Version="4.0.0.1" />
|
||||
<PackageReference Include="SocketIOClient.Serializer.NewtonsoftJson" Version="4.0.0.1" />
|
||||
<PackageReference Include="StreamDeck-Tools" Version="6.3.2" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="10.0.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="9.0.10" />
|
||||
<PackageReference Include="System.IO.Pipelines" Version="10.0.2" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||
<PackageReference Include="System.Security.AccessControl" Version="6.0.1" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="10.0.2" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.3" />
|
||||
<PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.ConfigurationManager" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.Http" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
|
||||
<PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="DialLayout.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="manifest.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="!!README!!.txt" />
|
||||
<Content Include="Images\categoryIcon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\categoryIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\icon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\icon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginAction%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginAction.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginIcon%402x.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Images\pluginIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="package.json" />
|
||||
<Content Include="PropertyInspector\profile_swticher.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="PropertyInspector\file_player.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>--port 23654 --pluginUUID com.michal-courson.cliptrim --registerEvent restart --info {}</StartArguments>
|
||||
</PropertyGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>--port 23654 --pluginUUID com.michal-courson.cliptrim --registerEvent restart --info {}</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,40 +1,40 @@
|
||||
{
|
||||
"id": "sampleDial",
|
||||
"items": [
|
||||
{
|
||||
"key": "title",
|
||||
"type": "text",
|
||||
"rect": [ 16, 10, 136, 24 ],
|
||||
"font": {
|
||||
"size": 16,
|
||||
"weight": 600
|
||||
},
|
||||
"alignment": "left"
|
||||
},
|
||||
{
|
||||
"key": "icon",
|
||||
"type": "pixmap",
|
||||
"rect": [ 16, 40, 48, 48 ]
|
||||
},
|
||||
{
|
||||
"key": "value",
|
||||
"type": "text",
|
||||
"rect": [ 76, 40, 108, 32 ],
|
||||
"font": {
|
||||
"size": 24,
|
||||
"weight": 600
|
||||
},
|
||||
"alignment": "right"
|
||||
},
|
||||
{
|
||||
"key": "indicator",
|
||||
"type": "gbar",
|
||||
"rect": [ 76, 74, 108, 20 ],
|
||||
"value": 0,
|
||||
"subtype": 4,
|
||||
"bar_h": 12,
|
||||
"border_w": 0,
|
||||
"bar_bg_c": "0:#427018,0.75:#705B1C,0.90:#702735,1:#702735"
|
||||
}
|
||||
]
|
||||
{
|
||||
"id": "sampleDial",
|
||||
"items": [
|
||||
{
|
||||
"key": "title",
|
||||
"type": "text",
|
||||
"rect": [ 16, 10, 136, 24 ],
|
||||
"font": {
|
||||
"size": 16,
|
||||
"weight": 600
|
||||
},
|
||||
"alignment": "left"
|
||||
},
|
||||
{
|
||||
"key": "icon",
|
||||
"type": "pixmap",
|
||||
"rect": [ 16, 40, 48, 48 ]
|
||||
},
|
||||
{
|
||||
"key": "value",
|
||||
"type": "text",
|
||||
"rect": [ 76, 40, 108, 32 ],
|
||||
"font": {
|
||||
"size": 24,
|
||||
"weight": 600
|
||||
},
|
||||
"alignment": "right"
|
||||
},
|
||||
{
|
||||
"key": "indicator",
|
||||
"type": "gbar",
|
||||
"rect": [ 76, 74, 108, 20 ],
|
||||
"value": 0,
|
||||
"subtype": 4,
|
||||
"bar_h": 12,
|
||||
"border_w": 0,
|
||||
"bar_bg_c": "0:#427018,0.75:#705B1C,0.90:#702735,1:#702735"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,108 +1,108 @@
|
||||
using BarRaider.SdTools;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
public class FileEntry
|
||||
{
|
||||
public FileEntry()
|
||||
{
|
||||
Volume = 1.0;
|
||||
Playtype = "Play/Overlap";
|
||||
}
|
||||
[JsonProperty(PropertyName = "Volume")]
|
||||
public double Volume { get; set; }
|
||||
[JsonProperty(PropertyName = "Playtype")]
|
||||
public string Playtype { get; set; }
|
||||
}
|
||||
public class CollectionEntry
|
||||
{
|
||||
public CollectionEntry()
|
||||
{
|
||||
Files = new Dictionary<string, FileEntry>();
|
||||
}
|
||||
[JsonProperty(PropertyName = "Files")]
|
||||
public Dictionary<string, FileEntry> Files { get; set; }
|
||||
}
|
||||
|
||||
public class GlobalSettings
|
||||
{
|
||||
public static GlobalSettings? _inst;
|
||||
public static GlobalSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
_inst ??= CreateDefaultSettings();
|
||||
return _inst;
|
||||
}
|
||||
set
|
||||
{
|
||||
_inst = value;
|
||||
}
|
||||
}
|
||||
public static GlobalSettings CreateDefaultSettings()
|
||||
{
|
||||
GlobalSettings instance = new GlobalSettings();
|
||||
instance.BasePath = null;
|
||||
instance.ProfileName = null;
|
||||
instance.Collections = new Dictionary<string, CollectionEntry>();
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
[FilenameProperty]
|
||||
[JsonProperty(PropertyName = "basePath")]
|
||||
public string? BasePath { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "profileName")]
|
||||
public string? ProfileName { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "outputDevice")]
|
||||
public string? OutputDevice { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "collections")]
|
||||
public Dictionary<string, CollectionEntry> Collections { get; set; }
|
||||
|
||||
public void SetCurrentProfile(string profile)
|
||||
{
|
||||
ProfileName = profile;
|
||||
if(!Collections.ContainsKey(profile))
|
||||
{
|
||||
Collections.Add(profile, new CollectionEntry());
|
||||
}
|
||||
}
|
||||
|
||||
public FileEntry GetFileOptionsInCurrentProfile(string filename)
|
||||
{
|
||||
if(!Collections.TryGetValue(ProfileName, out CollectionEntry collection))
|
||||
{
|
||||
return new FileEntry();
|
||||
}
|
||||
if(!collection.Files.TryGetValue(filename, out FileEntry file))
|
||||
{
|
||||
return new FileEntry();
|
||||
}
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "fetched file settings " + filename + JsonConvert.SerializeObject(file));
|
||||
return file;
|
||||
}
|
||||
|
||||
public void SetFileOptionsCurrentProfile(string filename, FileEntry file)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "SetFileOptionsCurrentProfile ");
|
||||
if (!Collections.TryGetValue(ProfileName, out CollectionEntry collection))
|
||||
{
|
||||
return;
|
||||
}
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "SetFileOptionsCurrentProfile 2");
|
||||
//collection.Files[filename] = file;
|
||||
Collections[ProfileName].Files[filename] = file;
|
||||
}
|
||||
}
|
||||
}
|
||||
using BarRaider.SdTools;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
public class FileEntry
|
||||
{
|
||||
public FileEntry()
|
||||
{
|
||||
Volume = 1.0;
|
||||
Playtype = "Play/Overlap";
|
||||
}
|
||||
[JsonProperty(PropertyName = "Volume")]
|
||||
public double Volume { get; set; }
|
||||
[JsonProperty(PropertyName = "Playtype")]
|
||||
public string Playtype { get; set; }
|
||||
}
|
||||
public class CollectionEntry
|
||||
{
|
||||
public CollectionEntry()
|
||||
{
|
||||
Files = new Dictionary<string, FileEntry>();
|
||||
}
|
||||
[JsonProperty(PropertyName = "Files")]
|
||||
public Dictionary<string, FileEntry> Files { get; set; }
|
||||
}
|
||||
|
||||
public class GlobalSettings
|
||||
{
|
||||
public static GlobalSettings? _inst;
|
||||
public static GlobalSettings Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
_inst ??= CreateDefaultSettings();
|
||||
return _inst;
|
||||
}
|
||||
set
|
||||
{
|
||||
_inst = value;
|
||||
}
|
||||
}
|
||||
public static GlobalSettings CreateDefaultSettings()
|
||||
{
|
||||
GlobalSettings instance = new GlobalSettings();
|
||||
instance.BasePath = null;
|
||||
instance.ProfileName = null;
|
||||
instance.Collections = new Dictionary<string, CollectionEntry>();
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
[FilenameProperty]
|
||||
[JsonProperty(PropertyName = "basePath")]
|
||||
public string? BasePath { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "profileName")]
|
||||
public string? ProfileName { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "outputDevice")]
|
||||
public string? OutputDevice { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "collections")]
|
||||
public Dictionary<string, CollectionEntry> Collections { get; set; }
|
||||
|
||||
public void SetCurrentProfile(string profile)
|
||||
{
|
||||
ProfileName = profile;
|
||||
if(!Collections.ContainsKey(profile))
|
||||
{
|
||||
Collections.Add(profile, new CollectionEntry());
|
||||
}
|
||||
}
|
||||
|
||||
public FileEntry GetFileOptionsInCurrentProfile(string filename)
|
||||
{
|
||||
if(!Collections.TryGetValue(ProfileName, out CollectionEntry collection))
|
||||
{
|
||||
return new FileEntry();
|
||||
}
|
||||
if(!collection.Files.TryGetValue(filename, out FileEntry file))
|
||||
{
|
||||
return new FileEntry();
|
||||
}
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "fetched file settings " + filename + JsonConvert.SerializeObject(file));
|
||||
return file;
|
||||
}
|
||||
|
||||
public void SetFileOptionsCurrentProfile(string filename, FileEntry file)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "SetFileOptionsCurrentProfile ");
|
||||
if (!Collections.TryGetValue(ProfileName, out CollectionEntry collection))
|
||||
{
|
||||
return;
|
||||
}
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "SetFileOptionsCurrentProfile 2");
|
||||
//collection.Files[filename] = file;
|
||||
Collections[ProfileName].Files[filename] = file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,194 +1,194 @@
|
||||
using BarRaider.SdTools;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using ClipTrimDotNet.Client;
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
[PluginActionId("com.michal-courson.cliptrim.player")]
|
||||
public class Player : KeypadBase
|
||||
{
|
||||
|
||||
private ClipMetadata? metadata;
|
||||
private KeyCoordinates coordinates;
|
||||
private class PluginSettings
|
||||
{
|
||||
public static PluginSettings CreateDefaultSettings()
|
||||
{
|
||||
PluginSettings instance = new PluginSettings();
|
||||
instance.Path = null;
|
||||
instance.PlayType = "Play/Overlap";
|
||||
instance.Index = 0;
|
||||
instance.Volume = 1;
|
||||
return instance;
|
||||
}
|
||||
|
||||
[FilenameProperty]
|
||||
[JsonPropertyName("path")]
|
||||
public string? Path { get; set; }
|
||||
|
||||
[JsonPropertyName("index")]
|
||||
public int? Index { get; set; }
|
||||
[JsonPropertyName("playtype")]
|
||||
public string PlayType { get; set; }
|
||||
|
||||
[JsonPropertyName("volume")]
|
||||
public double Volume { get; set; }
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
private PluginSettings settings;
|
||||
|
||||
#endregion
|
||||
public Player(SDConnection connection, InitialPayload payload) : base(connection, payload)
|
||||
{
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
this.settings = PluginSettings.CreateDefaultSettings();
|
||||
SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.settings = payload.Settings.ToObject<PluginSettings>();
|
||||
}
|
||||
this.coordinates = payload.Coordinates;
|
||||
GlobalSettingsManager.Instance.RequestGlobalSettings();
|
||||
CheckFile();
|
||||
}
|
||||
|
||||
private void Instance_OnReceivedGlobalSettings(object sender, ReceivedGlobalSettingsPayload e)
|
||||
{
|
||||
Tools.AutoPopulateSettings(GlobalSettings.Instance, e.Settings);
|
||||
}
|
||||
|
||||
public int GetIndex()
|
||||
{
|
||||
return Math.Max((coordinates.Row - 1) * 5 + coordinates.Column, 0);
|
||||
}
|
||||
|
||||
private async void CheckFile()
|
||||
{
|
||||
|
||||
//if (settings == null || GlobalSettings.Instance.ProfileName ==null) return;
|
||||
metadata = ClipTrimClient.Instance.GetClipByPagedIndex(GetIndex());
|
||||
await Connection.SetTitleAsync($"{metadata?.Name ?? ""}");
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Set title to {metadata?.Name ?? ""}");
|
||||
|
||||
return;
|
||||
|
||||
//var files = Directory.GetFiles(Path.Combine(Path.GetDirectoryName(GlobalSettings.Instance.BasePath), GlobalSettings.Instance.ProfileName), "*.wav", SearchOption.TopDirectoryOnly)
|
||||
// .OrderBy(file => File.GetCreationTime(file))
|
||||
// .ToArray();
|
||||
//int? i = this.settings.Index;
|
||||
//string new_path = "";
|
||||
//if (i != null && i >= 0 && i < files.Length)
|
||||
//{
|
||||
// new_path = files[i ?? 0];
|
||||
//}
|
||||
|
||||
|
||||
//await Connection.SetTitleAsync(Path.GetFileNameWithoutExtension(new_path));
|
||||
//if (new_path != settings.Path)
|
||||
//{
|
||||
// settings.Path = new_path;
|
||||
// if(new_path != "")
|
||||
// {
|
||||
// FileEntry opts = GlobalSettings.Instance.GetFileOptionsInCurrentProfile(new_path);
|
||||
// settings.Volume = opts.Volume;
|
||||
// settings.PlayType = opts.Playtype;
|
||||
// }
|
||||
// await SaveSettings();
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private async void Connection_OnApplicationDidLaunch(object sender, BarRaider.SdTools.Wrappers.SDEventReceivedEventArgs<BarRaider.SdTools.Events.ApplicationDidLaunch> e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Connection_OnTitleParametersDidChange(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.TitleParametersDidChange> e)
|
||||
{
|
||||
//titleParameters = e.Event?.Payload?.TitleParameters;
|
||||
//userTitle = e.Event?.Payload?.Title;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Connection.OnTitleParametersDidChange -= Connection_OnTitleParametersDidChange;
|
||||
Connection.OnApplicationDidLaunch -= Connection_OnApplicationDidLaunch;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Destructor called");
|
||||
}
|
||||
|
||||
public override void KeyPressed(KeyPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "Key Pressedd");
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
// Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(settings));
|
||||
ClipTrimClient.Instance.PlayClip(metadata);
|
||||
//try
|
||||
//{
|
||||
// WavPlayer.Instance.Play(settings.Path, GlobalSettings.Instance.OutputDevice, settings.Volume, settings.PlayType == "Play/Overlap" ? WavPlayer.PlayMode.PlayOverlap : WavPlayer.PlayMode.PlayStop);
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public override void KeyReleased(KeyPayload payload) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void OnTick() {
|
||||
CheckFile();
|
||||
}
|
||||
|
||||
public override async void ReceivedSettings(ReceivedSettingsPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "Player rec settings");
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
GlobalSettings.Instance.SetFileOptionsCurrentProfile(settings.Path, new FileEntry() { Playtype = settings.PlayType, Volume = settings.Volume });
|
||||
await Connection.SetGlobalSettingsAsync(JObject.FromObject(GlobalSettings.Instance));
|
||||
//SaveSettings();
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload) {
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "ReceivedGlobalSettings");
|
||||
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
var inst = GlobalSettings.Instance;
|
||||
//GlobalSettingsManager.Instance.SetGlobalSettings(JObject.FromObject(inst));
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalSettings.Instance = payload.Settings.ToObject<GlobalSettings>();
|
||||
}
|
||||
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private Task SaveSettings()
|
||||
{
|
||||
return Connection.SetSettingsAsync(JObject.FromObject(settings));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
using BarRaider.SdTools;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using ClipTrimDotNet.Client;
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
[PluginActionId("com.michal-courson.cliptrim.player")]
|
||||
public class Player : KeypadBase
|
||||
{
|
||||
|
||||
private ClipMetadata? metadata;
|
||||
private KeyCoordinates coordinates;
|
||||
private class PluginSettings
|
||||
{
|
||||
public static PluginSettings CreateDefaultSettings()
|
||||
{
|
||||
PluginSettings instance = new PluginSettings();
|
||||
instance.Path = null;
|
||||
instance.PlayType = "Play/Overlap";
|
||||
instance.Index = 0;
|
||||
instance.Volume = 1;
|
||||
return instance;
|
||||
}
|
||||
|
||||
[FilenameProperty]
|
||||
[JsonPropertyName("path")]
|
||||
public string? Path { get; set; }
|
||||
|
||||
[JsonPropertyName("index")]
|
||||
public int? Index { get; set; }
|
||||
[JsonPropertyName("playtype")]
|
||||
public string PlayType { get; set; }
|
||||
|
||||
[JsonPropertyName("volume")]
|
||||
public double Volume { get; set; }
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
private PluginSettings settings;
|
||||
|
||||
#endregion
|
||||
public Player(SDConnection connection, InitialPayload payload) : base(connection, payload)
|
||||
{
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
this.settings = PluginSettings.CreateDefaultSettings();
|
||||
SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.settings = payload.Settings.ToObject<PluginSettings>();
|
||||
}
|
||||
this.coordinates = payload.Coordinates;
|
||||
GlobalSettingsManager.Instance.RequestGlobalSettings();
|
||||
CheckFile();
|
||||
}
|
||||
|
||||
private void Instance_OnReceivedGlobalSettings(object sender, ReceivedGlobalSettingsPayload e)
|
||||
{
|
||||
Tools.AutoPopulateSettings(GlobalSettings.Instance, e.Settings);
|
||||
}
|
||||
|
||||
public int GetIndex()
|
||||
{
|
||||
return Math.Max((coordinates.Row - 1) * 5 + coordinates.Column, 0);
|
||||
}
|
||||
|
||||
private async void CheckFile()
|
||||
{
|
||||
|
||||
//if (settings == null || GlobalSettings.Instance.ProfileName ==null) return;
|
||||
metadata = ClipTrimClient.Instance.GetClipByPagedIndex(GetIndex());
|
||||
await Connection.SetTitleAsync($"{metadata?.Name ?? ""}");
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Set title to {metadata?.Name ?? ""}");
|
||||
|
||||
return;
|
||||
|
||||
//var files = Directory.GetFiles(Path.Combine(Path.GetDirectoryName(GlobalSettings.Instance.BasePath), GlobalSettings.Instance.ProfileName), "*.wav", SearchOption.TopDirectoryOnly)
|
||||
// .OrderBy(file => File.GetCreationTime(file))
|
||||
// .ToArray();
|
||||
//int? i = this.settings.Index;
|
||||
//string new_path = "";
|
||||
//if (i != null && i >= 0 && i < files.Length)
|
||||
//{
|
||||
// new_path = files[i ?? 0];
|
||||
//}
|
||||
|
||||
|
||||
//await Connection.SetTitleAsync(Path.GetFileNameWithoutExtension(new_path));
|
||||
//if (new_path != settings.Path)
|
||||
//{
|
||||
// settings.Path = new_path;
|
||||
// if(new_path != "")
|
||||
// {
|
||||
// FileEntry opts = GlobalSettings.Instance.GetFileOptionsInCurrentProfile(new_path);
|
||||
// settings.Volume = opts.Volume;
|
||||
// settings.PlayType = opts.Playtype;
|
||||
// }
|
||||
// await SaveSettings();
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private async void Connection_OnApplicationDidLaunch(object sender, BarRaider.SdTools.Wrappers.SDEventReceivedEventArgs<BarRaider.SdTools.Events.ApplicationDidLaunch> e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Connection_OnTitleParametersDidChange(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.TitleParametersDidChange> e)
|
||||
{
|
||||
//titleParameters = e.Event?.Payload?.TitleParameters;
|
||||
//userTitle = e.Event?.Payload?.Title;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Connection.OnTitleParametersDidChange -= Connection_OnTitleParametersDidChange;
|
||||
Connection.OnApplicationDidLaunch -= Connection_OnApplicationDidLaunch;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Destructor called");
|
||||
}
|
||||
|
||||
public override void KeyPressed(KeyPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "Key Pressedd");
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
// Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(settings));
|
||||
ClipTrimClient.Instance.PlayClip(metadata);
|
||||
//try
|
||||
//{
|
||||
// WavPlayer.Instance.Play(settings.Path, GlobalSettings.Instance.OutputDevice, settings.Volume, settings.PlayType == "Play/Overlap" ? WavPlayer.PlayMode.PlayOverlap : WavPlayer.PlayMode.PlayStop);
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
public override void KeyReleased(KeyPayload payload) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void OnTick() {
|
||||
CheckFile();
|
||||
}
|
||||
|
||||
public override async void ReceivedSettings(ReceivedSettingsPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "Player rec settings");
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
GlobalSettings.Instance.SetFileOptionsCurrentProfile(settings.Path, new FileEntry() { Playtype = settings.PlayType, Volume = settings.Volume });
|
||||
await Connection.SetGlobalSettingsAsync(JObject.FromObject(GlobalSettings.Instance));
|
||||
//SaveSettings();
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload) {
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "ReceivedGlobalSettings");
|
||||
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
var inst = GlobalSettings.Instance;
|
||||
//GlobalSettingsManager.Instance.SetGlobalSettings(JObject.FromObject(inst));
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalSettings.Instance = payload.Settings.ToObject<GlobalSettings>();
|
||||
}
|
||||
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private Task SaveSettings()
|
||||
{
|
||||
return Connection.SetSettingsAsync(JObject.FromObject(settings));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,165 +1,165 @@
|
||||
using BarRaider.SdTools;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using ClipTrimDotNet.Client;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
public class DataSourceItem
|
||||
{
|
||||
public string label { get; set; }
|
||||
public string value { get; set; }
|
||||
}
|
||||
[PluginActionId("com.michal-courson.cliptrim.profile-switcher")]
|
||||
public class ProfileSwitcher : KeypadBase
|
||||
{
|
||||
private class PluginSettings
|
||||
{
|
||||
public static PluginSettings CreateDefaultSettings()
|
||||
{
|
||||
PluginSettings instance = new PluginSettings();
|
||||
instance.ProfileName = null;
|
||||
return instance;
|
||||
}
|
||||
|
||||
[JsonProperty(PropertyName = "profileName")]
|
||||
public string? ProfileName { get; set; }
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
private PluginSettings settings;
|
||||
|
||||
#endregion
|
||||
public ProfileSwitcher(SDConnection connection, InitialPayload payload) : base(connection, payload)
|
||||
{
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
this.settings = PluginSettings.CreateDefaultSettings();
|
||||
SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.settings = payload.Settings.ToObject<PluginSettings>();
|
||||
}
|
||||
GlobalSettingsManager.Instance.RequestGlobalSettings();
|
||||
Connection.OnSendToPlugin += Connection_OnSendToPlugin;
|
||||
SetTitle();
|
||||
}
|
||||
|
||||
private async void SetTitle()
|
||||
{
|
||||
|
||||
await Connection.SetTitleAsync(settings.ProfileName + " B");
|
||||
}
|
||||
|
||||
private async void Connection_OnSendToPlugin(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.SendToPlugin> e)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "get profiles");
|
||||
if (e.Event.Payload["event"].ToString() == "getProfiles")
|
||||
{
|
||||
//string basePath = "C:\\Users\\mickl\\Music\\clips";
|
||||
//var files = Directory.GetDirectories(basePath, "*", SearchOption.TopDirectoryOnly).Select(x => Path.GetFileNameWithoutExtension(x)).Where(x => x != "original");
|
||||
var files = ClipTrimClient.Instance.GetCollectionNames();
|
||||
var items = files.Select(x => new DataSourceItem { label = x, value = x});
|
||||
var obj = new JObject();
|
||||
obj["event"] = "getProfiles";
|
||||
obj["items"] = JArray.FromObject(items);
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "get profiles return " + JsonConvert.SerializeObject(obj));
|
||||
await Connection.SendToPropertyInspectorAsync(obj);
|
||||
}
|
||||
//if (e.Event.Payload["event"].ToString() == "getOutputDevices")
|
||||
//{
|
||||
// List<WaveOutCapabilities> devices = new List<WaveOutCapabilities>();
|
||||
// for (int n = -1; n < WaveOut.DeviceCount; n++)
|
||||
// {
|
||||
// var caps = WaveOut.GetCapabilities(n);
|
||||
// devices.Add(caps);
|
||||
// }
|
||||
// var items = devices.Select(x => new DataSourceItem { label = x.ProductName, value = x.ProductName });
|
||||
// var obj = new JObject();
|
||||
// obj["event"] = "getOutputDevices";
|
||||
// obj["items"] = JArray.FromObject(items);
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, "get devices return " + JsonConvert.SerializeObject(obj));
|
||||
// await Connection.SendToPropertyInspectorAsync(obj);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
private void Connection_OnTitleParametersDidChange(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.TitleParametersDidChange> e)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Connection.OnTitleParametersDidChange -= Connection_OnTitleParametersDidChange;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Destructor called");
|
||||
}
|
||||
|
||||
public override async void KeyPressed(KeyPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "KeyPressed");
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(settings));
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(GlobalSettings.Instance));
|
||||
ClipTrimClient.Instance.SetSelectedCollectionByName(settings.ProfileName);
|
||||
GlobalSettings.Instance.SetCurrentProfile(settings.ProfileName);
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(GlobalSettings.Instance));
|
||||
|
||||
await Connection.SetGlobalSettingsAsync(JObject.FromObject(GlobalSettings.Instance));
|
||||
await Connection.SwitchProfileAsync("ClipTrim");
|
||||
}
|
||||
|
||||
public override void KeyReleased(KeyPayload payload)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnTick()
|
||||
{
|
||||
SetTitle();
|
||||
}
|
||||
|
||||
public override void ReceivedSettings(ReceivedSettingsPayload payload)
|
||||
{
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
SaveSettings();
|
||||
//tTitle();
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "ReceivedGlobalSettings");
|
||||
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
var inst = GlobalSettings.Instance;
|
||||
//GlobalSettingsManager.Instance.SetGlobalSettings(JObject.FromObject(inst));
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalSettings.Instance = payload.Settings.ToObject<GlobalSettings>();
|
||||
}
|
||||
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private Task SaveSettings()
|
||||
{
|
||||
return Connection.SetSettingsAsync(JObject.FromObject(settings));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
using BarRaider.SdTools;
|
||||
using BarRaider.SdTools.Wrappers;
|
||||
using ClipTrimDotNet.Client;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
public class DataSourceItem
|
||||
{
|
||||
public string label { get; set; }
|
||||
public string value { get; set; }
|
||||
}
|
||||
[PluginActionId("com.michal-courson.cliptrim.profile-switcher")]
|
||||
public class ProfileSwitcher : KeypadBase
|
||||
{
|
||||
private class PluginSettings
|
||||
{
|
||||
public static PluginSettings CreateDefaultSettings()
|
||||
{
|
||||
PluginSettings instance = new PluginSettings();
|
||||
instance.ProfileName = null;
|
||||
return instance;
|
||||
}
|
||||
|
||||
[JsonProperty(PropertyName = "profileName")]
|
||||
public string? ProfileName { get; set; }
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
private PluginSettings settings;
|
||||
|
||||
#endregion
|
||||
public ProfileSwitcher(SDConnection connection, InitialPayload payload) : base(connection, payload)
|
||||
{
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
this.settings = PluginSettings.CreateDefaultSettings();
|
||||
SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.settings = payload.Settings.ToObject<PluginSettings>();
|
||||
}
|
||||
GlobalSettingsManager.Instance.RequestGlobalSettings();
|
||||
Connection.OnSendToPlugin += Connection_OnSendToPlugin;
|
||||
SetTitle();
|
||||
}
|
||||
|
||||
private async void SetTitle()
|
||||
{
|
||||
|
||||
await Connection.SetTitleAsync(settings.ProfileName + " B");
|
||||
}
|
||||
|
||||
private async void Connection_OnSendToPlugin(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.SendToPlugin> e)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "get profiles");
|
||||
if (e.Event.Payload["event"].ToString() == "getProfiles")
|
||||
{
|
||||
//string basePath = "C:\\Users\\mickl\\Music\\clips";
|
||||
//var files = Directory.GetDirectories(basePath, "*", SearchOption.TopDirectoryOnly).Select(x => Path.GetFileNameWithoutExtension(x)).Where(x => x != "original");
|
||||
var files = ClipTrimClient.Instance.GetCollectionNames();
|
||||
var items = files.Select(x => new DataSourceItem { label = x, value = x});
|
||||
var obj = new JObject();
|
||||
obj["event"] = "getProfiles";
|
||||
obj["items"] = JArray.FromObject(items);
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "get profiles return " + JsonConvert.SerializeObject(obj));
|
||||
await Connection.SendToPropertyInspectorAsync(obj);
|
||||
}
|
||||
//if (e.Event.Payload["event"].ToString() == "getOutputDevices")
|
||||
//{
|
||||
// List<WaveOutCapabilities> devices = new List<WaveOutCapabilities>();
|
||||
// for (int n = -1; n < WaveOut.DeviceCount; n++)
|
||||
// {
|
||||
// var caps = WaveOut.GetCapabilities(n);
|
||||
// devices.Add(caps);
|
||||
// }
|
||||
// var items = devices.Select(x => new DataSourceItem { label = x.ProductName, value = x.ProductName });
|
||||
// var obj = new JObject();
|
||||
// obj["event"] = "getOutputDevices";
|
||||
// obj["items"] = JArray.FromObject(items);
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, "get devices return " + JsonConvert.SerializeObject(obj));
|
||||
// await Connection.SendToPropertyInspectorAsync(obj);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
private void Connection_OnTitleParametersDidChange(object sender, SDEventReceivedEventArgs<BarRaider.SdTools.Events.TitleParametersDidChange> e)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Connection.OnTitleParametersDidChange -= Connection_OnTitleParametersDidChange;
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, $"Destructor called");
|
||||
}
|
||||
|
||||
public override async void KeyPressed(KeyPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "KeyPressed");
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(settings));
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(GlobalSettings.Instance));
|
||||
ClipTrimClient.Instance.SetSelectedCollectionByName(settings.ProfileName);
|
||||
GlobalSettings.Instance.SetCurrentProfile(settings.ProfileName);
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, JsonConvert.SerializeObject(GlobalSettings.Instance));
|
||||
|
||||
await Connection.SetGlobalSettingsAsync(JObject.FromObject(GlobalSettings.Instance));
|
||||
await Connection.SwitchProfileAsync("ClipTrim");
|
||||
}
|
||||
|
||||
public override void KeyReleased(KeyPayload payload)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnTick()
|
||||
{
|
||||
SetTitle();
|
||||
}
|
||||
|
||||
public override void ReceivedSettings(ReceivedSettingsPayload payload)
|
||||
{
|
||||
Tools.AutoPopulateSettings(settings, payload.Settings);
|
||||
SaveSettings();
|
||||
//tTitle();
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
public override void ReceivedGlobalSettings(ReceivedGlobalSettingsPayload payload)
|
||||
{
|
||||
//Logger.Instance.LogMessage(TracingLevel.INFO, "ReceivedGlobalSettings");
|
||||
|
||||
if (payload.Settings == null || payload.Settings.Count == 0)
|
||||
{
|
||||
var inst = GlobalSettings.Instance;
|
||||
//GlobalSettingsManager.Instance.SetGlobalSettings(JObject.FromObject(inst));
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalSettings.Instance = payload.Settings.ToObject<GlobalSettings>();
|
||||
}
|
||||
|
||||
//CheckFile();
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private Task SaveSettings()
|
||||
{
|
||||
return Connection.SetSettingsAsync(JObject.FromObject(settings));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,20 +1,20 @@
|
||||
using BarRaider.SdTools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Uncomment this line of code to allow for debugging
|
||||
//while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }
|
||||
Client.ClipTrimClient.Instance.PortNumber = 5010;
|
||||
SDWrapper.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
using BarRaider.SdTools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ClipTrimDotNet
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Uncomment this line of code to allow for debugging
|
||||
//while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }
|
||||
Client.ClipTrimClient.Instance.PortNumber = 5010;
|
||||
SDWrapper.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1bb90885-9d98-46ef-b983-4a4ef3aea890")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1bb90885-9d98-46ef-b983-4a4ef3aea890")]
|
||||
|
||||
@ -1,45 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head lang="en">
|
||||
<title>Increment Counter Settings</title>
|
||||
<meta charset="utf-8" />
|
||||
<script src="https://sdpi-components.dev/releases/v3/sdpi-components.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--
|
||||
Learn more about property inspector components at https://sdpi-components.dev/docs/components
|
||||
-->
|
||||
<sdpi-item label="Index">
|
||||
<sdpi-select setting="index" placeholder="file index">
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Play Mode">
|
||||
<sdpi-select setting="playtype" placeholder="Play Mode">
|
||||
<option value="Play/Overlap">Play/Overlap</option>
|
||||
<option value="Play/Stop">Play/Stop</option>
|
||||
</sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Volume">
|
||||
<sdpi-range setting="volume" min=".1" max="1" , step="0.05"></sdpi-range>
|
||||
</sdpi-item>
|
||||
</body>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head lang="en">
|
||||
<title>Increment Counter Settings</title>
|
||||
<meta charset="utf-8" />
|
||||
<script src="https://sdpi-components.dev/releases/v3/sdpi-components.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--
|
||||
Learn more about property inspector components at https://sdpi-components.dev/docs/components
|
||||
-->
|
||||
<sdpi-item label="Index">
|
||||
<sdpi-select setting="index" placeholder="file index">
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
</sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Play Mode">
|
||||
<sdpi-select setting="playtype" placeholder="Play Mode">
|
||||
<option value="Play/Overlap">Play/Overlap</option>
|
||||
<option value="Play/Stop">Play/Stop</option>
|
||||
</sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Volume">
|
||||
<sdpi-range setting="volume" min=".1" max="1" , step="0.05"></sdpi-range>
|
||||
</sdpi-item>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,34 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<title>Increment Counter Settings</title>
|
||||
<meta charset="utf-8" />
|
||||
<script src="https://sdpi-components.dev/releases/v3/sdpi-components.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--
|
||||
Learn more about property inspector components at https://sdpi-components.dev/docs/components
|
||||
-->
|
||||
<sdpi-item label="Profile Name">
|
||||
<sdpi-select setting="profileName"
|
||||
datasource="getProfiles"
|
||||
show-refresh="true"
|
||||
placeholder="Select a ClipTrim page"></sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Base Path">
|
||||
<sdpi-file setting="basePath"
|
||||
global="true"
|
||||
webkitdirectory
|
||||
directory
|
||||
multiple></sdpi-file>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Output Device">
|
||||
<sdpi-select setting="outputDevice"
|
||||
global="true"
|
||||
datasource="getOutputDevices"
|
||||
show-refresh="true"
|
||||
placeholder="Select an Ouput Device"></sdpi-select>
|
||||
</sdpi-item>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<title>Increment Counter Settings</title>
|
||||
<meta charset="utf-8" />
|
||||
<script src="https://sdpi-components.dev/releases/v3/sdpi-components.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--
|
||||
Learn more about property inspector components at https://sdpi-components.dev/docs/components
|
||||
-->
|
||||
<sdpi-item label="Profile Name">
|
||||
<sdpi-select setting="profileName"
|
||||
datasource="getProfiles"
|
||||
show-refresh="true"
|
||||
placeholder="Select a ClipTrim page"></sdpi-select>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Base Path">
|
||||
<sdpi-file setting="basePath"
|
||||
global="true"
|
||||
webkitdirectory
|
||||
directory
|
||||
multiple></sdpi-file>
|
||||
</sdpi-item>
|
||||
<sdpi-item label="Output Device">
|
||||
<sdpi-select setting="outputDevice"
|
||||
global="true"
|
||||
datasource="getOutputDevices"
|
||||
show-refresh="true"
|
||||
placeholder="Select an Ouput Device"></sdpi-select>
|
||||
</sdpi-item>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,225 +1,225 @@
|
||||
//using System;
|
||||
//using System.Collections.Concurrent;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.ServiceModel.Security;
|
||||
//using System.Threading.Tasks;
|
||||
//using BarRaider.SdTools;
|
||||
//using NAudio.Wave;
|
||||
//using NAudio.Wave.SampleProviders;
|
||||
//using Newtonsoft.Json;
|
||||
|
||||
//class CachedSound
|
||||
//{
|
||||
// public byte[] AudioData { get; private set; }
|
||||
// public WaveFormat WaveFormat { get; private set; }
|
||||
// public CachedSound(string audioFileName)
|
||||
// {
|
||||
// using (var audioFileReader = new AudioFileReader(audioFileName))
|
||||
// {
|
||||
// // TODO: could add resampling in here if required
|
||||
// WaveFormat = audioFileReader.WaveFormat;
|
||||
// var wholeFile = new List<byte>((int)(audioFileReader.Length));
|
||||
// var readBuffer = new byte[audioFileReader.WaveFormat.SampleRate * audioFileReader.WaveFormat.Channels*4];
|
||||
// int samplesRead;
|
||||
// while ((samplesRead = audioFileReader.Read(readBuffer, 0, readBuffer.Length)) > 0)
|
||||
// {
|
||||
// wholeFile.AddRange(readBuffer.Take(samplesRead));
|
||||
// }
|
||||
// AudioData = wholeFile.ToArray();
|
||||
// }
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"AudioData Length {AudioData.Length}");
|
||||
|
||||
// }
|
||||
//}
|
||||
//class CachedSoundSampleProvider : IWaveProvider
|
||||
//{
|
||||
// private readonly CachedSound cachedSound;
|
||||
// private long position;
|
||||
|
||||
// ~CachedSoundSampleProvider() {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Cache destructor");
|
||||
// }
|
||||
|
||||
// public CachedSoundSampleProvider(CachedSound cachedSound)
|
||||
// {
|
||||
// this.cachedSound = cachedSound;
|
||||
// position = 0;
|
||||
// }
|
||||
|
||||
// public int Read(byte[] buffer, int offset, int count)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Read1 byte");
|
||||
// var availableSamples = cachedSound.AudioData.Length - position;
|
||||
// var samplesToCopy = Math.Min(availableSamples, count);
|
||||
// try
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"{cachedSound.AudioData.GetType()} {buffer.GetType()}");
|
||||
// Array.Copy(cachedSound.AudioData, position, buffer, offset, samplesToCopy);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"{ex.ToString()}");
|
||||
// }
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Read3");
|
||||
// position += samplesToCopy;
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Sending {samplesToCopy} samples");
|
||||
// return (int)samplesToCopy;
|
||||
// }
|
||||
|
||||
// public WaveFormat WaveFormat => cachedSound.WaveFormat;
|
||||
//}
|
||||
|
||||
//public class WavPlayer
|
||||
//{
|
||||
// private static WavPlayer? instance;
|
||||
// public static WavPlayer Instance
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// instance ??= new WavPlayer();
|
||||
// return instance;
|
||||
// }
|
||||
|
||||
// }
|
||||
// public enum PlayMode
|
||||
// {
|
||||
// PlayOverlap,
|
||||
// PlayStop
|
||||
// }
|
||||
|
||||
// private readonly ConcurrentDictionary<string, List<Tuple<WaveOutEvent, IWaveProvider>>> _activePlayers;
|
||||
|
||||
// public WavPlayer()
|
||||
// {
|
||||
// _activePlayers = new ConcurrentDictionary<string, List<Tuple<WaveOutEvent, IWaveProvider>>>();
|
||||
// }
|
||||
|
||||
// public void Play(string filePath, string id, double volume, PlayMode mode)
|
||||
// {
|
||||
// if (string.IsNullOrWhiteSpace(filePath))
|
||||
// throw new ArgumentException("File path cannot be null or empty.", nameof(filePath));
|
||||
|
||||
// if (mode == PlayMode.PlayOverlap)
|
||||
// {
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
// else if (mode == PlayMode.PlayStop)
|
||||
// {
|
||||
// PlayWithStop(filePath, id, volume);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new ArgumentOutOfRangeException(nameof(mode), "Invalid play mode specified.");
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void PlayWithOverlap(string filePath, string id, double volume)
|
||||
// {
|
||||
|
||||
// try
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, "Play overlap");
|
||||
// var player = CreatePlayer(filePath, id);
|
||||
|
||||
// if (!_activePlayers.ContainsKey(filePath))
|
||||
// {
|
||||
// _activePlayers[filePath] = new List<Tuple<WaveOutEvent, IWaveProvider>>();
|
||||
// }
|
||||
|
||||
// _activePlayers[filePath].Add(player);
|
||||
// player.Item1.Volume = (float)volume;
|
||||
// player.Item1.Play();
|
||||
// }
|
||||
// catch(Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, ex.ToString());
|
||||
// }
|
||||
|
||||
// //var playersToDispose = _activePlayers[filePath].Where(x => x.Item1.PlaybackState == PlaybackState.Stopped).ToList();
|
||||
// //foreach (var p in playersToDispose)
|
||||
// //{
|
||||
// // p.Item1.Stop();
|
||||
// // p.Item1.Dispose();
|
||||
// //}
|
||||
// //_activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
// }
|
||||
|
||||
// private void PlayWithStop(string filePath, string id, double volume)
|
||||
// {
|
||||
// if (_activePlayers.TryGetValue(filePath, out var players))
|
||||
// {
|
||||
|
||||
// // Stop and dispose all current players for this file
|
||||
// if (players.Any(x => x.Item1.PlaybackState == PlaybackState.Playing))
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var player in playersToDispose)
|
||||
// {
|
||||
// player.Item1.Stop();
|
||||
// player.Item1.Dispose();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Start a new player
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
|
||||
// _activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
// }
|
||||
|
||||
// private Tuple<WaveOutEvent, IWaveProvider> CreatePlayer(string filePath, string name)
|
||||
// {
|
||||
// var reader = new CachedSoundSampleProvider(new CachedSound(filePath));
|
||||
// //var reader = new AudioFileReader(filePath);
|
||||
// int number = -1;
|
||||
// for (int i = 0; i < WaveOut.DeviceCount; ++i)
|
||||
// {
|
||||
// if (WaveOut.GetCapabilities(i).ProductName == name)
|
||||
// {
|
||||
// number = i;
|
||||
// }
|
||||
// }
|
||||
// var player = new WaveOutEvent() { DeviceNumber = number };
|
||||
// player.Init(reader);
|
||||
// return new Tuple<WaveOutEvent, IWaveProvider>(player, reader);
|
||||
// }
|
||||
|
||||
// private void CleanupPlayer(string filePath)
|
||||
// {
|
||||
// if (_activePlayers.TryGetValue(filePath, out var players))
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var p in playersToDispose)
|
||||
// {
|
||||
// p.Item1.Stop();
|
||||
// p.Item1.Dispose();
|
||||
// }
|
||||
// }
|
||||
// _activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
|
||||
// }
|
||||
|
||||
// public void StopAll()
|
||||
// {
|
||||
// foreach (var players in _activePlayers.Values)
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var player in playersToDispose)
|
||||
// {
|
||||
// player.Item1.Stop();
|
||||
// player.Item1.Dispose();
|
||||
// }
|
||||
// players.Clear();
|
||||
// }
|
||||
|
||||
// _activePlayers.Clear();
|
||||
// }
|
||||
//}
|
||||
//using System;
|
||||
//using System.Collections.Concurrent;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.ServiceModel.Security;
|
||||
//using System.Threading.Tasks;
|
||||
//using BarRaider.SdTools;
|
||||
//using NAudio.Wave;
|
||||
//using NAudio.Wave.SampleProviders;
|
||||
//using Newtonsoft.Json;
|
||||
|
||||
//class CachedSound
|
||||
//{
|
||||
// public byte[] AudioData { get; private set; }
|
||||
// public WaveFormat WaveFormat { get; private set; }
|
||||
// public CachedSound(string audioFileName)
|
||||
// {
|
||||
// using (var audioFileReader = new AudioFileReader(audioFileName))
|
||||
// {
|
||||
// // TODO: could add resampling in here if required
|
||||
// WaveFormat = audioFileReader.WaveFormat;
|
||||
// var wholeFile = new List<byte>((int)(audioFileReader.Length));
|
||||
// var readBuffer = new byte[audioFileReader.WaveFormat.SampleRate * audioFileReader.WaveFormat.Channels*4];
|
||||
// int samplesRead;
|
||||
// while ((samplesRead = audioFileReader.Read(readBuffer, 0, readBuffer.Length)) > 0)
|
||||
// {
|
||||
// wholeFile.AddRange(readBuffer.Take(samplesRead));
|
||||
// }
|
||||
// AudioData = wholeFile.ToArray();
|
||||
// }
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"AudioData Length {AudioData.Length}");
|
||||
|
||||
// }
|
||||
//}
|
||||
//class CachedSoundSampleProvider : IWaveProvider
|
||||
//{
|
||||
// private readonly CachedSound cachedSound;
|
||||
// private long position;
|
||||
|
||||
// ~CachedSoundSampleProvider() {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Cache destructor");
|
||||
// }
|
||||
|
||||
// public CachedSoundSampleProvider(CachedSound cachedSound)
|
||||
// {
|
||||
// this.cachedSound = cachedSound;
|
||||
// position = 0;
|
||||
// }
|
||||
|
||||
// public int Read(byte[] buffer, int offset, int count)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Read1 byte");
|
||||
// var availableSamples = cachedSound.AudioData.Length - position;
|
||||
// var samplesToCopy = Math.Min(availableSamples, count);
|
||||
// try
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"{cachedSound.AudioData.GetType()} {buffer.GetType()}");
|
||||
// Array.Copy(cachedSound.AudioData, position, buffer, offset, samplesToCopy);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"{ex.ToString()}");
|
||||
// }
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Read3");
|
||||
// position += samplesToCopy;
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, $"Sending {samplesToCopy} samples");
|
||||
// return (int)samplesToCopy;
|
||||
// }
|
||||
|
||||
// public WaveFormat WaveFormat => cachedSound.WaveFormat;
|
||||
//}
|
||||
|
||||
//public class WavPlayer
|
||||
//{
|
||||
// private static WavPlayer? instance;
|
||||
// public static WavPlayer Instance
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// instance ??= new WavPlayer();
|
||||
// return instance;
|
||||
// }
|
||||
|
||||
// }
|
||||
// public enum PlayMode
|
||||
// {
|
||||
// PlayOverlap,
|
||||
// PlayStop
|
||||
// }
|
||||
|
||||
// private readonly ConcurrentDictionary<string, List<Tuple<WaveOutEvent, IWaveProvider>>> _activePlayers;
|
||||
|
||||
// public WavPlayer()
|
||||
// {
|
||||
// _activePlayers = new ConcurrentDictionary<string, List<Tuple<WaveOutEvent, IWaveProvider>>>();
|
||||
// }
|
||||
|
||||
// public void Play(string filePath, string id, double volume, PlayMode mode)
|
||||
// {
|
||||
// if (string.IsNullOrWhiteSpace(filePath))
|
||||
// throw new ArgumentException("File path cannot be null or empty.", nameof(filePath));
|
||||
|
||||
// if (mode == PlayMode.PlayOverlap)
|
||||
// {
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
// else if (mode == PlayMode.PlayStop)
|
||||
// {
|
||||
// PlayWithStop(filePath, id, volume);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new ArgumentOutOfRangeException(nameof(mode), "Invalid play mode specified.");
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void PlayWithOverlap(string filePath, string id, double volume)
|
||||
// {
|
||||
|
||||
// try
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, "Play overlap");
|
||||
// var player = CreatePlayer(filePath, id);
|
||||
|
||||
// if (!_activePlayers.ContainsKey(filePath))
|
||||
// {
|
||||
// _activePlayers[filePath] = new List<Tuple<WaveOutEvent, IWaveProvider>>();
|
||||
// }
|
||||
|
||||
// _activePlayers[filePath].Add(player);
|
||||
// player.Item1.Volume = (float)volume;
|
||||
// player.Item1.Play();
|
||||
// }
|
||||
// catch(Exception ex)
|
||||
// {
|
||||
// //Logger.Instance.LogMessage(TracingLevel.INFO, ex.ToString());
|
||||
// }
|
||||
|
||||
// //var playersToDispose = _activePlayers[filePath].Where(x => x.Item1.PlaybackState == PlaybackState.Stopped).ToList();
|
||||
// //foreach (var p in playersToDispose)
|
||||
// //{
|
||||
// // p.Item1.Stop();
|
||||
// // p.Item1.Dispose();
|
||||
// //}
|
||||
// //_activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
// }
|
||||
|
||||
// private void PlayWithStop(string filePath, string id, double volume)
|
||||
// {
|
||||
// if (_activePlayers.TryGetValue(filePath, out var players))
|
||||
// {
|
||||
|
||||
// // Stop and dispose all current players for this file
|
||||
// if (players.Any(x => x.Item1.PlaybackState == PlaybackState.Playing))
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var player in playersToDispose)
|
||||
// {
|
||||
// player.Item1.Stop();
|
||||
// player.Item1.Dispose();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Start a new player
|
||||
// PlayWithOverlap(filePath, id, volume);
|
||||
// }
|
||||
|
||||
// _activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
// }
|
||||
|
||||
// private Tuple<WaveOutEvent, IWaveProvider> CreatePlayer(string filePath, string name)
|
||||
// {
|
||||
// var reader = new CachedSoundSampleProvider(new CachedSound(filePath));
|
||||
// //var reader = new AudioFileReader(filePath);
|
||||
// int number = -1;
|
||||
// for (int i = 0; i < WaveOut.DeviceCount; ++i)
|
||||
// {
|
||||
// if (WaveOut.GetCapabilities(i).ProductName == name)
|
||||
// {
|
||||
// number = i;
|
||||
// }
|
||||
// }
|
||||
// var player = new WaveOutEvent() { DeviceNumber = number };
|
||||
// player.Init(reader);
|
||||
// return new Tuple<WaveOutEvent, IWaveProvider>(player, reader);
|
||||
// }
|
||||
|
||||
// private void CleanupPlayer(string filePath)
|
||||
// {
|
||||
// if (_activePlayers.TryGetValue(filePath, out var players))
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var p in playersToDispose)
|
||||
// {
|
||||
// p.Item1.Stop();
|
||||
// p.Item1.Dispose();
|
||||
// }
|
||||
// }
|
||||
// _activePlayers[filePath].RemoveAll(x => x.Item1.PlaybackState == PlaybackState.Stopped);
|
||||
|
||||
// }
|
||||
|
||||
// public void StopAll()
|
||||
// {
|
||||
// foreach (var players in _activePlayers.Values)
|
||||
// {
|
||||
// var playersToDispose = players.ToList();
|
||||
// foreach (var player in playersToDispose)
|
||||
// {
|
||||
// player.Item1.Stop();
|
||||
// player.Item1.Dispose();
|
||||
// }
|
||||
// players.Clear();
|
||||
// }
|
||||
|
||||
// _activePlayers.Clear();
|
||||
// }
|
||||
//}
|
||||
|
||||
@ -1,62 +1,62 @@
|
||||
{
|
||||
|
||||
"Actions": [
|
||||
{
|
||||
"Icon": "Images/icon",
|
||||
"Name": "Player",
|
||||
"States": [
|
||||
{
|
||||
"Image": "Images/pluginAction",
|
||||
"TitleAlignment": "middle",
|
||||
"FontSize": 11
|
||||
}
|
||||
],
|
||||
"SupportedInMultiActions": false,
|
||||
"Tooltip": "Plays a bound audio file",
|
||||
"UUID": "com.michal-courson.cliptrim.player",
|
||||
"PropertyInspectorPath": "PropertyInspector/file_player.html"
|
||||
},
|
||||
{
|
||||
"Icon": "Images/icon",
|
||||
"Name": "Profile Switcher",
|
||||
"States": [
|
||||
{
|
||||
"Image": "Images/pluginAction",
|
||||
"TitleAlignment": "middle",
|
||||
"FontSize": 11
|
||||
}
|
||||
],
|
||||
"SupportedInMultiActions": false,
|
||||
"Tooltip": "Selects which sub folder to use and opens effect profile",
|
||||
"UUID": "com.michal-courson.cliptrim.profile-switcher",
|
||||
"PropertyInspectorPath": "PropertyInspector/profile_swticher.html"
|
||||
}
|
||||
],
|
||||
"Author": "Michal Courson",
|
||||
"Name": "ClipTrimDotNet",
|
||||
"Description": "Pairs with cliptrim for easy voice recording and trimming",
|
||||
"Icon": "Images/pluginIcon",
|
||||
"Version": "0.1.0.0",
|
||||
"CodePath": "ClipTrimDotNet.exe",
|
||||
"Category": "ClipTrimDotNet",
|
||||
"CategoryIcon": "Images/categoryIcon",
|
||||
"UUID": "com.michal-courson.cliptrim",
|
||||
"OS": [
|
||||
{
|
||||
"Platform": "windows",
|
||||
"MinimumVersion": "10"
|
||||
}
|
||||
],
|
||||
"SDKVersion": 2,
|
||||
"Software": {
|
||||
"MinimumVersion": "6.4"
|
||||
},
|
||||
"Profiles": [
|
||||
{
|
||||
"Name": "ClipTrim",
|
||||
"DeviceType": 0,
|
||||
"Readonly": false,
|
||||
"DontAutoSwitchWhenInstalled": false
|
||||
}
|
||||
]
|
||||
{
|
||||
|
||||
"Actions": [
|
||||
{
|
||||
"Icon": "Images/icon",
|
||||
"Name": "Player",
|
||||
"States": [
|
||||
{
|
||||
"Image": "Images/pluginAction",
|
||||
"TitleAlignment": "middle",
|
||||
"FontSize": 11
|
||||
}
|
||||
],
|
||||
"SupportedInMultiActions": false,
|
||||
"Tooltip": "Plays a bound audio file",
|
||||
"UUID": "com.michal-courson.cliptrim.player",
|
||||
"PropertyInspectorPath": "PropertyInspector/file_player.html"
|
||||
},
|
||||
{
|
||||
"Icon": "Images/icon",
|
||||
"Name": "Profile Switcher",
|
||||
"States": [
|
||||
{
|
||||
"Image": "Images/pluginAction",
|
||||
"TitleAlignment": "middle",
|
||||
"FontSize": 11
|
||||
}
|
||||
],
|
||||
"SupportedInMultiActions": false,
|
||||
"Tooltip": "Selects which sub folder to use and opens effect profile",
|
||||
"UUID": "com.michal-courson.cliptrim.profile-switcher",
|
||||
"PropertyInspectorPath": "PropertyInspector/profile_swticher.html"
|
||||
}
|
||||
],
|
||||
"Author": "Michal Courson",
|
||||
"Name": "ClipTrimDotNet",
|
||||
"Description": "Pairs with cliptrim for easy voice recording and trimming",
|
||||
"Icon": "Images/pluginIcon",
|
||||
"Version": "0.1.0.0",
|
||||
"CodePath": "ClipTrimDotNet.exe",
|
||||
"Category": "ClipTrimDotNet",
|
||||
"CategoryIcon": "Images/categoryIcon",
|
||||
"UUID": "com.michal-courson.cliptrim",
|
||||
"OS": [
|
||||
{
|
||||
"Platform": "windows",
|
||||
"MinimumVersion": "10"
|
||||
}
|
||||
],
|
||||
"SDKVersion": 2,
|
||||
"Software": {
|
||||
"MinimumVersion": "6.4"
|
||||
},
|
||||
"Profiles": [
|
||||
{
|
||||
"Name": "ClipTrim",
|
||||
"DeviceType": 0,
|
||||
"Readonly": false,
|
||||
"DontAutoSwitchWhenInstalled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
544
stream_deck_plugin/ClipTrimDotNet/package-lock.json
generated
544
stream_deck_plugin/ClipTrimDotNet/package-lock.json
generated
@ -1,272 +1,272 @@
|
||||
{
|
||||
"name": "ClipTrimDotNet",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"shx": "^0.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
|
||||
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
||||
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.10",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
|
||||
"integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.16.0",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
|
||||
"integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/shx": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz",
|
||||
"integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.3",
|
||||
"shelljs": "^0.8.5"
|
||||
},
|
||||
"bin": {
|
||||
"shx": "lib/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "ClipTrimDotNet",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"shx": "^0.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
|
||||
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.16.1",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
||||
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.10",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
|
||||
"integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.16.0",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
|
||||
"integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/shx": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz",
|
||||
"integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.3",
|
||||
"shelljs": "^0.8.5"
|
||||
},
|
||||
"bin": {
|
||||
"shx": "lib/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
{
|
||||
"scripts": {
|
||||
"stop": "streamdeck stop com.michal-courson.cliptrim",
|
||||
"copy": "@powershell robocopy bin/Debug/ClipTrimDotNet.sdPlugin bin/Debug/com.michal-courson.cliptrim.sdPlugin/net8.0-windows",
|
||||
"link": "streamdeck link bin/Debug/com.michal-courson.cliptrim.sdPlugin",
|
||||
"restart": "streamdeck restart com.michal-courson.cliptrim",
|
||||
"start": "npm run link && npm run restart",
|
||||
"all": "npm run stop && npm run copy && npm run link && npm run restart",
|
||||
"pack": "streamdeck pack bin/Debug/com.michal-courson.cliptrim.sdPlugin/net8.0-windows/"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shx": "^0.3.4"
|
||||
}
|
||||
}
|
||||
{
|
||||
"scripts": {
|
||||
"stop": "streamdeck stop com.michal-courson.cliptrim",
|
||||
"copy": "@powershell robocopy bin/Debug/ClipTrimDotNet.sdPlugin bin/Debug/com.michal-courson.cliptrim.sdPlugin/net8.0-windows",
|
||||
"link": "streamdeck link bin/Debug/com.michal-courson.cliptrim.sdPlugin",
|
||||
"restart": "streamdeck restart com.michal-courson.cliptrim",
|
||||
"start": "npm run link && npm run restart",
|
||||
"all": "npm run stop && npm run copy && npm run link && npm run restart",
|
||||
"pack": "streamdeck pack bin/Debug/com.michal-courson.cliptrim.sdPlugin/net8.0-windows/"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shx": "^0.3.4"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CommandLineParser" version="2.9.1" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Options" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net48" />
|
||||
<package id="NAudio" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Asio" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Core" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Midi" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Wasapi" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.WinForms" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.WinMM" version="2.2.1" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
|
||||
<package id="NLog" version="6.0.5" targetFramework="net48" />
|
||||
<package id="SocketIOClient" version="4.0.0.2" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Common" version="4.0.0" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Serializer" version="4.0.0.1" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Serializer.NewtonsoftJson" version="4.0.0.1" targetFramework="net48" />
|
||||
<package id="StreamDeck-Tools" version="6.3.2" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Drawing.Common" version="9.0.10" targetFramework="net48" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.IO.Pipelines" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
||||
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Text.Encodings.Web" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Text.Json" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CommandLineParser" version="2.9.1" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Options" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net48" />
|
||||
<package id="NAudio" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Asio" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Core" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Midi" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.Wasapi" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.WinForms" version="2.2.1" targetFramework="net48" />
|
||||
<package id="NAudio.WinMM" version="2.2.1" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
|
||||
<package id="NLog" version="6.0.5" targetFramework="net48" />
|
||||
<package id="SocketIOClient" version="4.0.0.2" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Common" version="4.0.0" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Serializer" version="4.0.0.1" targetFramework="net48" />
|
||||
<package id="SocketIOClient.Serializer.NewtonsoftJson" version="4.0.0.1" targetFramework="net48" />
|
||||
<package id="StreamDeck-Tools" version="6.3.2" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Drawing.Common" version="9.0.10" targetFramework="net48" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.IO.Pipelines" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
||||
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Text.Encodings.Web" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Text.Json" version="10.0.2" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user