diff --git a/Apprise/Apprise.csproj b/Apprise/Apprise.csproj index 579701af..0a789ddf 100644 Binary files a/Apprise/Apprise.csproj and b/Apprise/Apprise.csproj differ diff --git a/Apprise/Communication/Apprise.cs b/Apprise/Communication/Apprise.cs index ab6ba821..03ec3d70 100644 --- a/Apprise/Communication/Apprise.cs +++ b/Apprise/Communication/Apprise.cs @@ -13,16 +13,16 @@ public class Apprise: Node [Required] [TextVariable(1)] - public string Message { get; set; } + public string Message { get; set; } = string.Empty; [StringArray(2)] - public string[] Tag { get; set; } + public string[] Tag { get; set; } = new string[] { }; [DefaultValue("info")] [Select(nameof(MessageTypeOptions), 3)] - public string MessageType { get; set; } + public string MessageType { get; set; } = string.Empty; - private static List _MessageTypeOptions; + private static List _MessageTypeOptions = new List(); public static List MessageTypeOptions { get @@ -78,7 +78,11 @@ public class Apprise: Node type = this.MessageType?.EmptyAsNull() ?? "info" }; - var content = new StringContent(JsonSerializer.Serialize(data), Encoding.UTF8, "application/json"); +#pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code + var json = JsonSerializer.Serialize(data); +#pragma warning restore IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code + + var content = new StringContent(json, Encoding.UTF8, "application/json"); using var httpClient = new HttpClient(); var response = httpClient.PostAsync(url, content).Result; diff --git a/Apprise/PluginSettings.cs b/Apprise/PluginSettings.cs index 19eba52e..6ca6ba2e 100644 --- a/Apprise/PluginSettings.cs +++ b/Apprise/PluginSettings.cs @@ -1,18 +1,25 @@ -namespace FileFlows.Apprise +namespace FileFlows.Apprise; + +using FileFlows.Plugin; +using FileFlows.Plugin.Attributes; +using System.ComponentModel.DataAnnotations; + +/// +/// The plugin settings for Apprise +/// +public class PluginSettings:IPluginSettings { - using FileFlows.Plugin; - using FileFlows.Plugin.Attributes; - using System; - using System.ComponentModel.DataAnnotations; + /// + /// Gets or sets the URL of the Apprise server + /// + [Text(1)] + [Required] + public string ServerUrl { get; set; } = string.Empty; - public class PluginSettings:IPluginSettings - { - [Text(1)] - [Required] - public string ServerUrl { get; set; } - - [Text(2)] - [Required] - public string Endpoint { get; set; } - } + /// + /// Gets or sets the endpoint of the Apprise server + /// + [Text(2)] + [Required] + public string Endpoint { get; set; } = string.Empty; } diff --git a/BasicNodes/BasicNodes.csproj b/BasicNodes/BasicNodes.csproj index ca76b362..e1e53544 100644 Binary files a/BasicNodes/BasicNodes.csproj and b/BasicNodes/BasicNodes.csproj differ diff --git a/BasicNodes/File/CopyFile.cs b/BasicNodes/File/CopyFile.cs index 54ce1c39..b8dd865a 100644 --- a/BasicNodes/File/CopyFile.cs +++ b/BasicNodes/File/CopyFile.cs @@ -80,11 +80,11 @@ namespace FileFlows.BasicNodes.File dest = Path.Combine(destDir!, destFile); } - bool copied = args.CopyFile(dest); + bool copied = args.CopyFile(args.WorkingFile, dest, updateWorkingFile: true); if (!copied) return -1; - var srcDir = AdditionalFilesFromOriginal ? new FileInfo(args.FileName).DirectoryName : new FileInfo(args.WorkingFile).DirectoryName; + var srcDir = AdditionalFilesFromOriginal ? new FileInfo(args.MapPath(args.FileName)).DirectoryName : new FileInfo(args.MapPath(args.WorkingFile)).DirectoryName; if (AdditionalFiles?.Any() == true) { @@ -98,11 +98,11 @@ namespace FileFlows.BasicNodes.File try { string addFileDest = Path.Combine(destDir, addFile.Name); - System.IO.File.Copy(addFile.FullName, addFileDest, true); - + args.CopyFile(addFile.FullName, addFileDest, updateWorkingFile: false); + FileHelper.ChangeOwner(args.Logger, addFileDest, file: true); - args.Logger?.ILog("Copyied file: \"" + addFile.FullName + "\" to \"" + addFileDest + "\""); + args.Logger?.ILog("Copied file: \"" + addFile.FullName + "\" to \"" + addFileDest + "\""); } catch (Exception ex) { diff --git a/BasicNodes/File/ReplaceOriginal.cs b/BasicNodes/File/ReplaceOriginal.cs index be46a591..4bd20b24 100644 --- a/BasicNodes/File/ReplaceOriginal.cs +++ b/BasicNodes/File/ReplaceOriginal.cs @@ -29,7 +29,7 @@ if(moved == false) { args.Logger?.ELog("Failed to move file to: "+ args.FileName); - return -11; + return -1; } } else diff --git a/BasicNodes/Tools/Executor.cs b/BasicNodes/Tools/Executor.cs index b3b7e5ea..89fb7796 100644 --- a/BasicNodes/Tools/Executor.cs +++ b/BasicNodes/Tools/Executor.cs @@ -45,10 +45,12 @@ private NodeParameters args; - public override async Task Cancel() + public override Task Cancel() { args?.Process?.Cancel(); + return Task.CompletedTask; } + public override int Execute(NodeParameters args) { this.args = args; diff --git a/ChecksumNodes/ChecksumNodes.csproj b/ChecksumNodes/ChecksumNodes.csproj index f76b5fc7..1d587c5c 100644 Binary files a/ChecksumNodes/ChecksumNodes.csproj and b/ChecksumNodes/ChecksumNodes.csproj differ diff --git a/CollectionNodes/CollectionNodes.csproj b/CollectionNodes/CollectionNodes.csproj index d4f57c41..e11220f9 100644 Binary files a/CollectionNodes/CollectionNodes.csproj and b/CollectionNodes/CollectionNodes.csproj differ diff --git a/DiscordNodes/DiscordNodes.csproj b/DiscordNodes/DiscordNodes.csproj index c08b44a9..0c29df03 100644 Binary files a/DiscordNodes/DiscordNodes.csproj and b/DiscordNodes/DiscordNodes.csproj differ diff --git a/EmailNodes/EmailNodes.csproj b/EmailNodes/EmailNodes.csproj index ffefd4e8..9f862235 100644 Binary files a/EmailNodes/EmailNodes.csproj and b/EmailNodes/EmailNodes.csproj differ diff --git a/Emby/Emby.csproj b/Emby/Emby.csproj index d923a09a..2f3b21c2 100644 Binary files a/Emby/Emby.csproj and b/Emby/Emby.csproj differ diff --git a/FileFlows.Plugin.dll b/FileFlows.Plugin.dll index ecb4cbf2..92fecd0c 100644 Binary files a/FileFlows.Plugin.dll and b/FileFlows.Plugin.dll differ diff --git a/FileFlows.Plugin.pdb b/FileFlows.Plugin.pdb index 977e87b5..c4af8307 100644 Binary files a/FileFlows.Plugin.pdb and b/FileFlows.Plugin.pdb differ diff --git a/Gotify/Gotify.csproj b/Gotify/Gotify.csproj index b06ec535..ab12d49c 100644 Binary files a/Gotify/Gotify.csproj and b/Gotify/Gotify.csproj differ diff --git a/ImageNodes/ImageNodes.csproj b/ImageNodes/ImageNodes.csproj index 746bc780..bf789a4a 100644 Binary files a/ImageNodes/ImageNodes.csproj and b/ImageNodes/ImageNodes.csproj differ diff --git a/MetaNodes/MetaNodes.csproj b/MetaNodes/MetaNodes.csproj index 67463681..7f87b0c8 100644 Binary files a/MetaNodes/MetaNodes.csproj and b/MetaNodes/MetaNodes.csproj differ diff --git a/MusicNodes/MusicNodes.csproj b/MusicNodes/MusicNodes.csproj index 4066fe6b..f2d6889b 100644 Binary files a/MusicNodes/MusicNodes.csproj and b/MusicNodes/MusicNodes.csproj differ diff --git a/Plex/MediaManagement/PlexAnalyze.cs b/Plex/MediaManagement/PlexAnalyze.cs index 520af0d8..297790f3 100644 --- a/Plex/MediaManagement/PlexAnalyze.cs +++ b/Plex/MediaManagement/PlexAnalyze.cs @@ -9,7 +9,7 @@ public class PlexAnalyze : PlexNode protected override int ExecuteActual(NodeParameters args, PlexDirectory directory, string baseUrl, string mappedPath, string accessToken) { string filename = new FileInfo(args.WorkingFile).Name; - string mappedFile = mappedPath + (mappedPath.IndexOf("/") >= 0 ? "/" : "\\") + filename; + string mappedFile = mappedPath + (mappedPath.IndexOf("/") >= 0 ? "/" : @"\") + filename; using var httpClient = new HttpClient(); string itemId = GetItemId(httpClient, args, baseUrl, $"library/sections/{directory.Key}/all?includeCollections=1&includeAdvanced=1", accessToken, mappedFile); diff --git a/Plex/Plex.csproj b/Plex/Plex.csproj index 5c1ddc9a..001cc0ff 100644 Binary files a/Plex/Plex.csproj and b/Plex/Plex.csproj differ diff --git a/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs b/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs index 7a49dd8d..909d3fee 100644 --- a/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs +++ b/VideoNodes/FfmpegBuilderNodes/Audio/FfmpegBuilderAudioAddTrack.cs @@ -52,7 +52,9 @@ public class FfmpegBuilderAudioAddTrack : FfmpegBuilderNode { new ListOption { Label = "Same as source", Value = 0}, new ListOption { Label = "Mono", Value = 1f}, - new ListOption { Label = "Stereo", Value = 2f} + new ListOption { Label = "Stereo", Value = 2f}, + new ListOption { Label = "5.1", Value = 6}, + new ListOption { Label = "7.1", Value = 8} }; } return _ChannelsOptions; diff --git a/VideoNodes/VideoNodes.csproj b/VideoNodes/VideoNodes.csproj index c4b1d75e..5e3954d8 100644 Binary files a/VideoNodes/VideoNodes.csproj and b/VideoNodes/VideoNodes.csproj differ diff --git a/VideoNodes/VideoNodes.en.json b/VideoNodes/VideoNodes.en.json index 56b0a6ea..6e19aba7 100644 --- a/VideoNodes/VideoNodes.en.json +++ b/VideoNodes/VideoNodes.en.json @@ -191,7 +191,7 @@ "Index": "Index", "Index-Help": "The index where to insert the new audio track. 0 based, so to insert the new audio track as the first track set this to 0.", "Channels": "Channels", - "Channels-Help": "The number of channels to convert this audio track to.", + "Channels-Help": "The number of channels this new audio track will be.\nIf you specify more channels than the source, FFMPEG will automatically upmix it.\nIf you specify fewer channels than the source, FFMPEG will automatically down mix it.", "Bitrate": "Bitrate", "Bitrate-Help": "Bitrate of the new audio track", "Language": "Language", diff --git a/build/buildplugins.ps1 b/build/buildplugins.ps1 index 92bdd35f..ec6ae69d 100644 --- a/build/buildplugins.ps1 +++ b/build/buildplugins.ps1 @@ -23,7 +23,7 @@ $output = $output | Resolve-Path Remove-Item Builds -Recurse -ErrorAction SilentlyContinue $revision = (git rev-list --count --first-parent HEAD) -join "`n" -$version = "0.6.0.$revision" +$version = "0.6.1.$revision" $json = "[`n" diff --git a/build/utils/PluginInfoGenerator/FileFlows.Plugin.dll b/build/utils/PluginInfoGenerator/FileFlows.Plugin.dll index 3305a82c..e9f45cc2 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.Plugin.dll and b/build/utils/PluginInfoGenerator/FileFlows.Plugin.dll differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.Plugin.pdb b/build/utils/PluginInfoGenerator/FileFlows.Plugin.pdb index 82d703d9..628ccef2 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.Plugin.pdb and b/build/utils/PluginInfoGenerator/FileFlows.Plugin.pdb differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.dll b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.dll index 650a0cf2..eaf852c5 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.dll and b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.dll differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.pdb b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.pdb index 5b8381b0..0ae12b44 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.pdb and b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.pdb differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.xml b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.xml index 88b842df..57f8b4fb 100644 --- a/build/utils/PluginInfoGenerator/FileFlows.ServerShared.xml +++ b/build/utils/PluginInfoGenerator/FileFlows.ServerShared.xml @@ -4,6 +4,107 @@ FileFlows.ServerShared + + + Globals variables + + + + + Gets the version of FileFlows + + + + + Gets if this is running on Windows + + + + + Gets if this is running on linux + + + + + Gets if this is running on Mac + + + + + Gets or sets if this node is running inside a docker container + + + + + A helper class to manage the directories used by FileFlows Server and Node + + + + + Gets if this is a Docker instance or not + + + + + Gets if this is a Node or Server + + + + + Gets the base directory of FileFlows + eg %appdata%\FileFlows + + + + + Inits the logging directory and moves any files if they need to be moved + + + + + Inits the data directory and moves any files if they need to be moved + + + + + Gets the logging directory + + + + + Gets the directory where library file logs are stored + + + + + Gets the data directory + + + + + Gets the directory the database is saved in + + + + + Gets the flow runner directory + + + + + Gets the logging directory + + + + + Gets the location of the encryption key file + + + + + Gets the location of the node configuration file + + Removes illegal file/path characters from a string @@ -161,5 +262,50 @@ the current version of the node if there is a node update available, returns the update + + + Worker that will automatically update the system + + + + + Gets if there is an updated pending installation + + + + + Constructs an instance of a Update Worker + + The script to execute in the upgrade zip file + how many minute between checks + + + + Gets if the update can run + + + + + Quits the current application + + + + + Runs a check for update and if found will download it + + A update has been downloaded + + + + Downloads an update + + The update file + + + + Gets if auto updates are enabled + + if auto updates are enabled + diff --git a/build/utils/PluginInfoGenerator/FileFlows.Shared.dll b/build/utils/PluginInfoGenerator/FileFlows.Shared.dll index 72bc19f7..4b18ad0e 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.Shared.dll and b/build/utils/PluginInfoGenerator/FileFlows.Shared.dll differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.Shared.pdb b/build/utils/PluginInfoGenerator/FileFlows.Shared.pdb index 27a18e75..a11fb18b 100644 Binary files a/build/utils/PluginInfoGenerator/FileFlows.Shared.pdb and b/build/utils/PluginInfoGenerator/FileFlows.Shared.pdb differ diff --git a/build/utils/PluginInfoGenerator/FileFlows.Shared.xml b/build/utils/PluginInfoGenerator/FileFlows.Shared.xml index d64d47ab..31d8b24f 100644 --- a/build/utils/PluginInfoGenerator/FileFlows.Shared.xml +++ b/build/utils/PluginInfoGenerator/FileFlows.Shared.xml @@ -4,6 +4,41 @@ FileFlows.Shared + + + Extension methods used by FileFlows + + + + + Converts an object to a json string + + the object to convert + the object as json, or empty if object was null + + + + Returns an empty string as null, otherwise returns the original string + + the input string + the string or null if empty + + + + Tries to find a match + + The regex to use to find the match + The input string to find the match in + The match if found + true if found, false otherwise + + + + Lower cases UPPER case characters, but does not touch umlauts etc + + the string to lowercase + the lowercased string + Clones an object @@ -84,6 +119,175 @@ Gets or sets a list of nodes that were executed against this library file + + + Arguments for hte Next Library File request + + + + + Gets or sets the name of the node + + + + + Gets or sets the Uid of the node + + + + + Gets or sets the Version of the node + + + + + Gets or sets the worker UID + + + + + A processing node used by FileFlows to process Library Files + + + + + Gets or sets the temporary path used by this node + + + + + Gets or sets the address this node is located at, hostname or ip address + + + + + Gets or sets if this node is enabled + + + + + Gets or sets the type of operating system this node is running on + + + + + Gets or sets the FileFlows version of this node + + + + + Gets or sets the number of flow runners this node can run simultaneously + + + + + Gets or sets the SignalrUrl this node uses + + + + + Gets or sets the mappings for this node + + + + + Gets or sets the schedule for this node + + + + + Gets or sets if the owner should not be changed + + + + + Gets or sets if permissions should not be set + + + + + Gets or sets the permissions to set + + + + + Gets or sets if this node can process all libraries + + + + + Gets or sets the libraries this node can process + + + + + Gets or sets the maximum file size this node can process + + + + + The directory separator used by this node + + + + + Maps a path locally for this node + + The path to map + The path mapped locally for this node + + + + Unmaps a path for this node + + The mapped path + The unmapped path + + + + Gets or sets if plugins should automatically be updated when new version are available online + + + + + Gets or sets if the server should automatically update when a new version is available online + + + + + Gets or sets if nodes should be automatically updated when the server is updated + + + + + Gets or sets if telemetry should be disabled + + + + + Gets or sets if the library file logs should be saved in a compressed format to reduce file size + + + + + Gets or sets a list of available URLs to additional plugin repositories + + + + + Gets or sets if this is running on Windows + + + + + Gets or sets if this is running inside Docker + + + + + Gets or sets the FileFlows version number + + Used instead of null diff --git a/build/utils/PluginInfoGenerator/PluginInfoGenerator.dll b/build/utils/PluginInfoGenerator/PluginInfoGenerator.dll index 87d0fd88..478a8033 100644 Binary files a/build/utils/PluginInfoGenerator/PluginInfoGenerator.dll and b/build/utils/PluginInfoGenerator/PluginInfoGenerator.dll differ diff --git a/build/utils/PluginInfoGenerator/PluginInfoGenerator.pdb b/build/utils/PluginInfoGenerator/PluginInfoGenerator.pdb index 8e7f7db8..7ed6fdbb 100644 Binary files a/build/utils/PluginInfoGenerator/PluginInfoGenerator.pdb and b/build/utils/PluginInfoGenerator/PluginInfoGenerator.pdb differ diff --git a/build/utils/spellcheck/ignoredwords.txt b/build/utils/spellcheck/ignoredwords.txt index 6a0a0c59..31eebbf3 100644 --- a/build/utils/spellcheck/ignoredwords.txt +++ b/build/utils/spellcheck/ignoredwords.txt @@ -84,4 +84,6 @@ revenz Fenrus Plex-Token analyze -px \ No newline at end of file +px +upmix +downmix \ No newline at end of file