Jump to content

Recommended Posts

Posted (edited)

Lifetime Premiere user here, I searched around but I couldn't find anything related.

I have a pretty large movie collection and about 30 frequent users. 

Every now and then when I talk to them I get the surprised "Is that the remastered version" or "is it from the blu-ray?"
I find myself adding tags that are already available in my filenames but since my users are on android/firetv-apps and using remotes they can't see the filenames easily.

I'm looking for a method to pull the "Remastered", "Enhanced", "AI Upscaled", "Upscaled", "Bluray", "Blu-ray", "DC", "Directors Cut" from the movie-filenames (I'm VERY picky about my file naming) and put them in an .nfo file containing only the tags next to every movie and then have Emby pull the tags from the .nfo. 
I've tested it manually creating the moviename.nfo with only <movie><tag>Blu-ray</tag></movie> and it works just fine.
I'm really not interested in scraping more data or having some utility poke around inside my movie-files.

I know I can write a cmd or powershell script to do this recursively on all my movies but I wanted to check if anyone is already doing something like this before I go all in.
I've downloaded a bunch of metadata utilities but they more or less do what Emby already does.

Edited by JoLarsson
  • Like 1
Posted

Hi, we don't have anything built-in that does this, but maybe this will help you?

 

Posted

If your naming is consistent adding tag's to an emby item is very easy to do via the API.

As you say, just recursively get the items you want (by ItemId), read the filename, parse the tags and add them into the API command.

curl -X POST "http://<HOST>:8096/emby/Items/2237191/Tags/Add?api_key=<MYAPIKEY>" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"Tags\": [ { \"Name\": \"TestTag\", \"Id\": \"TestTag\" }{ \"Name\": \"TestTag2\", \"Id\": \"TestTag2\" } ]}"

I don't believe the above utility would do the above automation but I haven't used it in a while..

  • 3 weeks later...
Posted

Just a quick follow-up.
I solved this in a maybe not so elegant way, but it's working for me.

I created and compiled an AutoIT-script that I run from powershell as a weekly scheduled task in Windows.

This script creates a Moviename.nfo file in the same folder as the movie containing nothing but the tags extracted from the movie filename.
Since I didn't use .nfo files previously this works just fine.


The tags I create now from the filenames are: 
.bluray. / .blu-ray. / .brrip. / .bdrip. / .bd-remux. - creates tag "Blu-ray"
.final cut. / .final.cut. - creates tag "Final Cut"
.remastered. - creates tag "Remastered"
.dc. / .directors cut. / .directors.cut. - creates tag "Directors Cut"
.unrated. - creates tag "Unrated"
.limited. - creates tag "Limited"
.extended. - creates tag "Extended"
.720p. - creates tag "720p"
.1080p. - creates tag "1080p"

  • Like 1
Posted
2 minutes ago, JoLarsson said:

Just a quick follow-up.
I solved this in a maybe not so elegant way, but it's working for me.

I created and compiled an AutoIT-script that I run from powershell as a weekly scheduled task in Windows.

This script creates a Moviename.nfo file in the same folder as the movie containing nothing but the tags extracted from the movie filename.
Since I didn't use .nfo files previously this works just fine.


The tags I create now from the filenames are: 
.bluray. / .blu-ray. / .brrip. / .bdrip. / .bd-remux. - creates tag "Blu-ray"
.final cut. / .final.cut. - creates tag "Final Cut"
.remastered. - creates tag "Remastered"
.dc. / .directors cut. / .directors.cut. - creates tag "Directors Cut"
.unrated. - creates tag "Unrated"
.limited. - creates tag "Limited"
.extended. - creates tag "Extended"
.720p. - creates tag "720p"
.1080p. - creates tag "1080p"

Nice - a more elegant way may be to just use the API (via curl) to directly write the tag from the scraped filename - but the NFO reader is doing this for you anyway in your version. 

Also, if you are happy to share, it would be good to share the PS script in the Tools section on the forum - just so people inclined can have a play/modify if they wish.

  • Agree 2
  • 1 year later...
Posted

Is there an update to this? I have a lot of images with tags in the filename e.g., containing people's names, pets, "woods", "beach" etc..

What's the best way to have those automatically added as emby tags? I would be willing to write a script or plugin for that. Can someone point me to a good path forward for that?

Posted

Update: I noticed, emby is automatically pulling the IPTC "Keywords" of a file. Could the same logic be amended to look for #beach #woods #pet_cinnamon #pet_rufus as well?

rbjtech
Posted (edited)

 

On 11/01/2023 at 09:59, JoLarsson said:

The tags I create now from the filenames are: 
.bluray. / .blu-ray. / .brrip. / .bdrip. / .bd-remux. - creates tag "Blu-ray"
.final cut. / .final.cut. - creates tag "Final Cut"
.remastered. - creates tag "Remastered"
.dc. / .directors cut. / .directors.cut. - creates tag "Directors Cut"
.unrated. - creates tag "Unrated"
.limited. - creates tag "Limited"
.extended. - creates tag "Extended"
.720p. - creates tag "720p"
.1080p. - creates tag "1080p"

A majority of this (in bold) is now done in my version of the emby MediaInfo plugin (1.0.1.42 onwards)

As an example below - it's pulling the details from the filename and adding them as Tags - thus allowing you to filter etc.

image.png.56b95b9568e0784481367b561a5bb966.png

 

Edited by rbjtech
Posted

Thanks, that would be of course much nicer.

Are you talking about the Nfo Metadata plugin? If not, could you provide a link? I cannot find it in the plugin catalog.

Also, your screenshot shows "#2000's". Is this an arbitrary hashtag then?

rbjtech
Posted
4 hours ago, AlexGrae said:

Are you talking about the Nfo Metadata plugin? If not, could you provide a link? I cannot find it in the plugin catalog.

Hi - No, this is the mediainfo plugin - Media Info Plugin

It's a big thread - so for the latest update - see here

https://emby.media/community/index.php?/topic/108984-mediainfo-for-emby-pluginhdr-vision-atmos-dtsx/&do=findComment&comment=1376137

4 hours ago, AlexGrae said:

Also, your screenshot shows "#2000's". Is this an arbitrary hashtag then?

No this was me adding the functionality to the Plugin - the decade is now automatically added to movies and episodes as a Tag.

For some reason emby can't appear to do this ☺️ - so using a Tag allows you to filter by #1980's movies for example.

Posted

Great, I was wondering why this plugin wouldn't be part of the core and/or isn't shown in the Plugin catalog? This seems pretty crucial to use.

Regarding custom tags, Emby is pulling IPTC tags from image files and making them Emby tags. Any chance something like that could be used for filenames too?

As an example: IMG_2837 #Samantha_Barber #Beach #Florida.jpg adding the respective tags Samantha Barber, Beach, Florida to an image to be easily used.

Especially as soon as AI could automatically recognize certain items, those could then be easily searched for by people.

rbjtech
Posted (edited)
16 hours ago, AlexGrae said:

Great, I was wondering why this plugin wouldn't be part of the core and/or isn't shown in the Plugin catalog? This seems pretty crucial to use.

I can't comment on the Core (agreed, there is a LOT of crucial functionality missing .. 🤪) but the base version which we collaborated on is in the catalogue.   My enhanced versions are not because the original coder (cheesegeezer) is no longer active and he has the catalogue upload account.   The other aspect is if it's in the catalogue, then you have to officially support it.   I don't want that commitment (I'm not a Dev) - so If you want to use the many Plugin's outside the catalogue - that's entirely up to you but you need to accept the risk and low levels of support .. ;) 

Re the hash for tags - that seems a good idea as # would not normally be used as part of a filename - not promising but I'll see what I can do. 

Edited by rbjtech
  • Thanks 1

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...