Jump to content

Automated Tagging


Steve86

Recommended Posts

bakes82
3 minutes ago, rbjtech said:

Not with you 100% ? - currently a tag is applied to a media ID, not an instance ID - so by tagging a movie - you currently tag both.  If @chef is saying that you can individually tag a movie instance - then this solves the problem and you can simply 'deny' 4K to a user.

Its the same amount of steps to deny a library or to deny a tag, thats what Im saying.  Also having multi librarys tends to work better if you run multiple instances of the "arrs" as 1 arr cant download 2 versions of the same file, it will "upgrade" from 1080p to 4k but you cant keep both unless you run multi instances.

Edited by bakes82
Link to comment
Share on other sites

rbjtech

You cannot use tag's today to block resolution based content - that is what I am saying.  Maybe an example would help me to explain .. lol

I have 3 versions of 1917 - 1) 1080p low bitrate streaming, 2) 1080p High Quality and 3) a 4K remux.

c1.PNG

c2.PNG

I don't want any remote user using the 4K version regardless of what bandwidth I/they have available.

I cannot apply a 4K tag on it - because it will apply to all versions.

c3.PNG

So I put the 4K version in it's own library ... and deny the user that way.  Works fine but it's 'messy' and I'd rather keep all the versions together in the same folder if I can.

If I can tag just the 4K version with a 4K Tag - then I can do the permissioning at a User level - which is much more flexible imo.

 

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

21 minutes ago, bakes82 said:

 

Nope, but IDT what I want can be done.  Its in the MediaSources.

You see this drop down:

image.png.c66feccf580a93ec7471741a8143cad8.png

I know if I follow the "Emby" format you can make the names say something.  But I run Plex/Emby/Jelly and well I'm not going to rename/move 20k movies and 200k episodes.  I use the auto group plugin so I have a Library called 1080p, 4k, 4k Remux, 4k DV.  So I would want to change the names to be like some custom format using the "parent" name AKA library name.

EX:


var test = items.Items.First().GetMediaSources(false, false,null).First().Name;

But I dont think you can save back mediasources its a auto generated.  I think @roaku said we cant change it above ;(

GetMediaSources() is still available and returns the right information for the separated BaseItems if there's some data in there you want to display or test against.

GetMediaStreams() behaves like a shortcut to the GetMediaSources()[0].MediaStreams

Link to comment
Share on other sites

bakes82
4 minutes ago, rbjtech said:

You cannot use tag's today to block resolution based content - that is what I am saying.  Maybe an example would help me to explain .. lol

I have 3 versions of 1917 - 1) 1080p low bitrate streaming, 2) 1080p High Quality and 3) a 4K remux.

c1.PNG

c2.PNG

I don't want any remote user using the 4K version regardless of what bandwidth I/they have available.

I cannot apply a 4K tag on it - because it will apply to all versions.

c3.PNG

So I put the 4K version in it's own library ... and deny the user that way.  Works fine but it's 'messy' and I'd rather keep all the versions together in the same folder if I can.

If I can tag just the 4K version with a 4K Tag - then I can do the permissioning at a User level - which is much more flexible imo.

 

Yes Im aware how to do it, its how I have mine setup in Emby lol.  Im saying there way more work involved when you have large scale systems.  Lets says I have 4 radarrs for movies, 1080p, 4k,4k remux, and 4k dolby vision (The DVk and remux will be combined eventually now that the DV has HDR fallback).   Each radarr needs its own path to store the files, so in Emby its "easier" to just keep everything in its own library/folder and merge.  Thats all Im saying.  If you are just doing small scale and doing it manually do whatever you want.  But tags will also case extra strain on the DB as its not setup properly for multi tags to be found efficiently.    So in my case adding a tag or denying a "library" the both result in the same outcome and take the same number of steps, except you now need a special plugin to run to make tags, where you go the library way you dont.  So actually the library way is better as there is less overhead and future updates "shouldnt" cause anything to break.  Or if @chef wins the lotto and retires and doesnt update the plugin.

  • Like 1
Link to comment
Share on other sites

rbjtech
20 minutes ago, bakes82 said:

Also having multi librarys tends to work better if you run multiple instances of the "arrs" as 1 arr cant download 2 versions of the same file, it will "upgrade" from 1080p to 4k but you cant keep both unless you run multi instances.

This is a totally valid point though - thanks - multi-instance here for the reason you say - one step forward, one step back as they say ... Grr....

  • Haha 1
Link to comment
Share on other sites

bakes82
7 minutes ago, roaku said:

GetMediaSources() is still available and returns the right information for the separated BaseItems if there's some data in there you want to display or test against.

GetMediaStreams() behaves like a shortcut to the GetMediaSources()[0].MediaStreams

GetMediaSources is just a DTO it looks like that combines the stuff from Items and Streams into 1 object, MediaStreams doesnt have a "name" field, so they are doing custom logic on the "name" of the MediaSources when its called in the "/emby/Items/1038368/PlaybackInfo" endpoint.

 

image.png.55079fa3cecf24156866b1661d6899fe.png

Link to comment
Share on other sites

8 minutes ago, bakes82 said:

GetMediaSources is just a DTO it looks like that combines the stuff from Items and Streams into 1 object, MediaStreams doesnt have a "name" field, so they are doing custom logic on the "name" of the MediaSources when its called in the "/emby/Items/1038368/PlaybackInfo" endpoint.

 

image.png.55079fa3cecf24156866b1661d6899fe.png

I may be understanding what you're looking for...but I'm saying from C# land he can use MediaSources[0] to read and display everything on the current BaseItem's MediaSourceInfo object, whether that's its Name property or Video3dFormat or Bitrate or whatever.

Edited by roaku
Link to comment
Share on other sites

bakes82
1 minute ago, roaku said:

I may be understanding what you're looking for...but I'm saying from C# land he can use MediaSources[0] to read and display everything on the MediaSourceInfo object, whether that's its Name property or Video3dFormat or Bitrate or whatever.

I want to modify what the UI sees, Im not using it for tagging :P.  Lets say I want the UI to say A, B C, instead of whats in the name field, I cant update the data since it doesnt exist anywhere.

Edited by bakes82
Link to comment
Share on other sites

3 minutes ago, bakes82 said:

I want to modify what the UI sees, Im not using it for tagging :P.  Lets say I want the UI to say A, B C, instead of whats in the name field, I cant update the data since it doesnt exist anywhere.

I keep forgetting you're here to *stop* the plugin from being developed with distractions and such. My bad. 😆

Ya, I don't think there's any flexibility on that end like you said.

Edited by roaku
Link to comment
Share on other sites

bakes82
Just now, roaku said:

I keep forgetting you're here to *stop* the plugin from being developed. My bad. 😆

Ya, I don't think there's any flexibility on that end like you said.

Im not stopping anything lol.  Id make another plugin to do what I want :P  IDC if people use tags or not.  Its not going to fix anything for those us with large scale systems and multiple ARRs.   Its fine for average joe and his you know 10tb collection, but when you have 600tb well tags not going to fix how you have things already automated.

Link to comment
Share on other sites

tagconfig.thumb.png.75adf2a64010023a19a77a0a7f768f3c.png

 

There are some required params in the config, but it is possible to control both "add" and "Remove" tag  from baseItems.

Very close to something useable. 

Link to comment
Share on other sites

bakes82
40 minutes ago, chef said:

tagconfig.thumb.png.75adf2a64010023a19a77a0a7f768f3c.png

 

There are some required params in the config, but it is possible to control both "add" and "Remove" tag  from baseItems.

Very close to something useable. 

Just out of curiosity why not just make some basic ones where people just check off like Year, Resolution, Audio or Video Codec etc,  Then the plugin just adds a tag w/out this config unless they want to do custom stuff?   Like the Year one would just write the year of the movie as a tag, or the resolution, doesnt need to be overly complex, then if you want "custom" things you can do Year >= 1980 <= 1988 tag = 80s.

  • Like 1
Link to comment
Share on other sites

bakes82

Just remember if you have multiple rules, you shouldnt loop over the items N times, you should loop over the rules N times for 1x occurrence of the base item.

Link to comment
Share on other sites

I've taken up some web site development as a side job during the pandemic, while all the restaurants are shut down. It is way more monotonous then what I expected. LOL

But, I also wrote this.

ItemTagEditor.zip

 

Goodness knows its not perfect.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

  • 4 weeks later...

I've been testing it with 4K movies (un-/tagging) and it works fine.
Thank you, chef! 🙂

One question though:

@chef, is it possible to add "Subtitle Language" as criterium as well?
Background is, I family abroad that only understands portuguese but most of my files are either in English only.
So, some of them I decided to gather portuguese subs for them to understand but tagging them manually is big effort and with this filter it would be done automated.
Thank you for considering. 🙂

 

Edit: Another criterium that could be useful is "HDR" yes/no but I am not sure if that information is already available in Emby.

Edited by neik
Link to comment
Share on other sites

rbjtech
3 hours ago, neik said:

Edit: Another criterium that could be useful is "HDR" yes/no but I am not sure if that information is already available in Emby.

 

Video RangeHDR
Colour Primariesbt2020
Colour Spacebt2020nc
Colour Transfersmpte2084
Bit Depth10 bit
Pixel Formatyuv420p10le

'Video Range' specifies if HDR - I'd love for this extended for the type of HDR (HDR10, HDR10+,DV,HLG etc) - it would then start to be more useful. 

I think @FrostByte has already extended his Feature Request to include these.  However, i think the key blocker at the moment is what FFMPEG/Probe returns - if it doesn't know, then nor does Emby.

 

Edited by rbjtech
Link to comment
Share on other sites

6 hours ago, rbjtech said:

However, i think the key blocker at the moment is what FFMPEG/Probe returns - if it doesn't know, then nor does Emby.

That's what I meant when I wrote this: 😉

10 hours ago, neik said:

Edit: Another criterium that could be useful is "HDR" yes/no but I am not sure if that information is already available in Emby.

But I think we agree it would be a nice criterium to add once it is available.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
neik

 

Anyone tested this with multi-versioning as described here by Happy2Play?
Does the plugin pick the 4k version when multi-versioning is used?

Link to comment
Share on other sites

roaku
7 hours ago, neik said:

 

Anyone tested this with multi-versioning as described here by Happy2Play?
Does the plugin pick the 4k version when multi-versioning is used?

The multiversion metadata limitation was accounted for, so it should be applying the tags to individual movies, regardless of how they're grouped.

I haven't tested it myself though.

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
1 hour ago, NitroKyx said:

Can someone link me to the download and setup of this plugin?

I'm guessing you're looking for this:

 

Link to comment
Share on other sites

  • 5 weeks later...
neik
On 2/24/2021 at 10:31 AM, neik said:

@chef, is it possible to add "Subtitle Language" as criterium as well?
Background is, I family abroad that only understands portuguese but most of my files are either in English only.
So, some of them I decided to gather portuguese subs for them to understand but tagging them manually is big effort and with this filter it would be done automated.
Thank you for considering. 🙂

@chef, just trying to get your on idea on this.
Is this something you are interested in adding when you get some spare time or is it something you won't consider at all?

Link to comment
Share on other sites

chef
14 hours ago, neik said:

@chef, just trying to get your on idea on this.
Is this something you are interested in adding when you get some spare time or is it something you won't consider at all?

Sorry for the delay. Yes I believe we could add subtitles as a criteria. I'll have to take a look and see where the subtitle data is stored, and then add it to the config. 

 

I should probably make sure to do some through testing of this plugin. 

I seem to remember I got caught up trying to remove tags from items. 

 

There was definitely a hold up in the code somewhere. I had better take a look, if people are using this. 😳

  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
deej1978

I imagine one box where I can type the tag I want e.g. "Long Movies". Then underneath a tick box next to each movie title with an apply button at the bottom thereafter.

Link to comment
Share on other sites

Cheesegeezer

Good effort @chef.... i was thinking about writing something like this myself.but no need, i will give it a test tomorrow.

cheers and thanks for sharing 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...