blob: 638a85c853160be59e8975d07d356ddda5e9b3df (
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("ghbmt")]
[Cmdlet(VerbsCommon.Get, "HyperBooruMediaTag")]
public class GetMediaTagCmdlet : SessionCmdlet {
[Parameter(Position = 1, Mandatory = true)]
public Guid MediaId { get; set; }
protected override void ProcessRecord() {
var tags = Session.Media.GetTagsAsync(MediaId)
.GetAwaiter()
.GetResult();
foreach(var td in tags)
WriteObject(td);
}
}
|