TeamB 2414 Posted September 21, 2022 Posted September 21, 2022 (edited) Question 1: Is there a way of filtering on tags to not include an item if it has a certain tag i.e. {server}/emby/Users/{userid}/Items?tags=!SomeTag Question 2: Is it possible to delete an items tag like when adding it using /Items/{Id}/Tags/Add Is there an /Items/{Id}/Tags/Delete Edited September 21, 2022 by TeamB
Cheesegeezer 3102 Posted September 21, 2022 Posted September 21, 2022 5 hours ago, TeamB said: Question 1: Is there a way of filtering on tags to not include an item if it has a certain tag i.e. {server}/emby/Users/{userid}/Items?tags=!SomeTag Question 2: Is it possible to delete an items tag like when adding it using /Items/{Id}/Tags/Add Is there an /Items/{Id}/Tags/Delete Hey bud, So the way i do this is in c# is to get the library items you want and then iterate thru each item and interogate the tags which is a LinkedItemInfo You will need to pass the BaseItem into your method as a param so that the item's complete info is populated for you. Here is a snippet that i use to remove existing tags List<string> vidList = new List<string>(); vidList = _videoTrackTitle.Split(' ').ToList(); var itemTags = item.TagItems; if (config.RemoveTags) { Log.Debug("Removing Video Tags"); var tagList = itemTags.ToList(); foreach (var vidTag in vidList) { foreach (var itemTag in itemTags) { if (itemTag.Name == vidTag) { Log.Debug("Removing Video Tag - {0}", itemTag.Name); item.RemoveTag(itemTag.Name); } } } ItemRepository.SaveItem(item, CancellationToken.None); }
TeamB 2414 Posted September 21, 2022 Author Posted September 21, 2022 thanks, this is for a client (EmbyCon) I dont want to have to have a server plugin to accomplish this. I was just looking for a Web API way.
Cheesegeezer 3102 Posted September 21, 2022 Posted September 21, 2022 16 minutes ago, TeamB said: thanks, this is for a client (EmbyCon) I dont want to have to have a server plugin to accomplish this. I was just looking for a Web API way. Ah ok sorry. No worries 1
horstepipe 377 Posted September 21, 2022 Posted September 21, 2022 7 hours ago, TeamB said: Question 2: Is it possible to delete an items tag like when adding it using /Items/{Id}/Tags/Add Is there an /Items/{Id}/Tags/Delete This still seems to be true. 2
Luke 40086 Posted September 21, 2022 Posted September 21, 2022 15 hours ago, TeamB said: Question 1: Is there a way of filtering on tags to not include an item if it has a certain tag i.e. {server}/emby/Users/{userid}/Items?tags=!SomeTag Question 2: Is it possible to delete an items tag like when adding it using /Items/{Id}/Tags/Add Is there an /Items/{Id}/Tags/Delete There isn't. I added the /Add api for you specifically, so I'd have to do a corresponding delete api. 1
quickmic 1610 Posted February 21, 2024 Posted February 21, 2024 Just asking, was this "delete" ever been added?
Luke 40086 Posted February 23, 2024 Posted February 23, 2024 On 2/21/2024 at 12:07 PM, quickmic said: Just asking, was this "delete" ever been added? Adding it now. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now