blob: 4ff016f33dfb25bb9ccfea828bfa110065732f98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using System.Management.Automation;
namespace HyperBooru.PowerShell;
[Alias("shbmt")]
[Cmdlet(VerbsCommon.Set, "HyperBooruMediaTag")]
public class SetMediaTagCmdlet : SessionCmdlet {
[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.ReplaceTagsAsync(MediaId, TagId)
.GetAwaiter()
.GetResult();
}
|