From ed0fb341e62a94e3e467a016b955b3808d2b15c4 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Sat, 9 May 2026 02:59:46 +1000 Subject: v0.15a --- RemoveMediaTag.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 RemoveMediaTag.cs (limited to 'RemoveMediaTag.cs') diff --git a/RemoveMediaTag.cs b/RemoveMediaTag.cs new file mode 100644 index 0000000..d41980d --- /dev/null +++ b/RemoveMediaTag.cs @@ -0,0 +1,22 @@ +using HyperBooru.ApiClient; +using System.Management.Automation; + +namespace HyperBooru.PowerShell; + +[Alias("rhbmt")] +[Cmdlet(VerbsCommon.Remove, "HyperBooruMediaTag")] +public class RemoveMediaTagCmdlet : PSCmdlet { + [Parameter(Position = 0, Mandatory = true)] + public required HBSession Session { get; set; } + + [Parameter(Position = 1, Mandatory = true)] + public Guid MediaId { get; set; } + + [Parameter(Position = 2, Mandatory = true)] + public Guid[] TagId { get; set; } + + protected override void ProcessRecord() => + Session.Media.DeleteTagsAsync(MediaId, TagId) + .GetAwaiter() + .GetResult(); +} -- cgit v1.3