mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-20 23:39:30 -06:00
filedrop
This commit is contained in:
@@ -1,43 +1,43 @@
|
|||||||
namespace FileFlows.FileDropPlugin.FlowElements;
|
// namespace FileFlows.FileDropPlugin.FlowElements;
|
||||||
|
//
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Sets the display name ot a file drop friendly name
|
// /// Sets the display name ot a file drop friendly name
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
public class SetFileDropDisplayName : Node
|
// public class SetFileDropDisplayName : Node
|
||||||
{
|
// {
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override int Inputs => 1;
|
// public override int Inputs => 1;
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override int Outputs => 1;
|
// public override int Outputs => 1;
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override string HelpUrl => "https://fileflows.com/docs/plugins/file-drop/set-file-drop-display-name";
|
// public override string HelpUrl => "https://fileflows.com/docs/plugins/file-drop/set-file-drop-display-name";
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override string Group => "File Drop";
|
// public override string Group => "File Drop";
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override FlowElementType Type => FlowElementType.Process;
|
// public override FlowElementType Type => FlowElementType.Process;
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override string Icon => "fas fa-file-signature";
|
// public override string Icon => "fas fa-file-signature";
|
||||||
|
//
|
||||||
/// <inheritdoc />
|
// /// <inheritdoc />
|
||||||
public override int Execute(NodeParameters args)
|
// public override int Execute(NodeParameters args)
|
||||||
{
|
// {
|
||||||
var username = Variables["FileDropUser"]?.ToString() ??
|
// var username = Variables["FileDropUser"]?.ToString() ??
|
||||||
Variables["FileDropUserUid"]?.ToString();
|
// Variables["FileDropUserUid"]?.ToString();
|
||||||
if (string.IsNullOrWhiteSpace(username))
|
// if (string.IsNullOrWhiteSpace(username))
|
||||||
{
|
// {
|
||||||
args.Logger?.WLog("Failed to get file drop username");
|
// args.Logger?.WLog("Failed to get file drop username");
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
var shortname = Variables["ShortName"]?.ToString();
|
// var shortname = Variables["ShortName"]?.ToString();
|
||||||
if (string.IsNullOrWhiteSpace(shortname))
|
// if (string.IsNullOrWhiteSpace(shortname))
|
||||||
{
|
// {
|
||||||
args.Logger?.WLog("Failed to get shortname");
|
// args.Logger?.WLog("Failed to get shortname");
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
args.SetDisplayName($"{username}: {shortname}");
|
// args.SetDisplayName($"{username}: {shortname}");
|
||||||
|
//
|
||||||
return base.Execute(args);
|
// return base.Execute(args);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
@@ -12,7 +12,7 @@ public class Plugin : FileFlows.Plugin.IPlugin
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string MinimumVersion => "24.12.4.4168";
|
public string MinimumVersion => "24.12.4.4168";
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string Icon => "fas fa-people-carry";
|
public string Icon => "fas fa-tint";
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void Init()
|
public void Init()
|
||||||
|
|||||||
Reference in New Issue
Block a user