list of "names" to add to file name

Support for Windows users
Post Reply
allineedis
Posts: 13
Joined: 14 Oct 2017, 17:13

list of "names" to add to file name

Post by allineedis »

I searched for this, but list and names combinations are too common and I could not find any answer.

What I am trying to get is the following.

For movies I have a list of lets say versions, like Theatrical, Director's Cut, Roadshow, etc... I already have a small part in the naming scheme that "preserves" the naming when it is in the file name, but I am looking at a list of all available versions to choose from when adding a new movie to the collection.

As an example:

When I am adding 2 new versions, like Theatrical and Extended, is it possible to somehow pre-define the list of choices and pick and choose? Movie (2021) [HDR10] [Theatrical] (where the later would be somehow a drop list of all version names available or pre-defined).
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: list of "names" to add to file name

Post by rednoah »

Do you mean to drop different versions of the same movie into "Original Files", match them, and then have FileBot ask you to select one specific version when clicking "Rename" and thus only process one of the files? That seems out of scope. You could just press the DELETE key for items you don't want to process before pressing "Rename" though.
:idea: Please read the FAQ and How to Request Help.
allineedis
Posts: 13
Joined: 14 Oct 2017, 17:13

Re: list of "names" to add to file name

Post by allineedis »

Something like that yes. Or that the version names (tags binding?) provide a list to choose from in the rename window at the spot in the new filename and once done with all files hit rename.

I just manually add this now when needed during renaming, via the edit name option. I see so many nifty tricks and flexibility in filebot, maybe it was possible, but I just did not crack the case yet :-).

Thanks for the reply.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: list of "names" to add to file name

Post by rednoah »

I see. So it's more like you're using Edit Name to manually add tags to some of your files, because {tags} doesn't work for files that don't already have a tag like [Extended] in the file name.

There's definitely no UI for anything like that. But your format code could certainly conjure up a value based on the file path, media properties, sibling files, etc. Presumably, you're already following some kind of "algorithm" in your head that decides when to add [Extended] or [Theatrical] or [Director's Cut] to some file and when not to. How do you know which is which?
:idea: Please read the FAQ and How to Request Help.
allineedis
Posts: 13
Joined: 14 Oct 2017, 17:13

Re: list of "names" to add to file name

Post by allineedis »

How I know which is which is based on the rip of a movie itself? In 90% of my discs I rip there is only 1 version on them, in case there are 2 versions I just add them at that point.

Was just thinking of this for case of consistency. I do have filenames with Extended, Extended Cut, Extended version and some typo versions as well :-). The consistency is important when doing a large renaming. I once did this when adding the {hdr} binding to all movies. That is also when I saw the version mess I created and was looking at a more robust approach.

But you are right if it is not in the filename, filebot has no way of knowing which version it is. So from automation perspective there is no solution.

For now I will keep adding them manually and update the part of the code that keeps them in the filename.

I will also read more about the tags binding, it sounds more robust than just the below naming preservation. If I understand it correctly if I add " Theatrical Cut" to the tag of that movie, it will always be preserved, even if I screw up the filename for some reason?

Code: Select all

  {'['+fn.replaceAll(/(?i)directors|theatrical|extended|ultimate|canadian|french|criterion|Collectors Extended|dcp|japanese|Roadshow|noir|Coppola Restoration|capture|Final|Douche|US|Bravia Core/, '$0 Cut')
.matchAll(/DIRECTORS|THEATRICAL|EXTENDED|ULTIMATE|CANADIAN RELEASE|FRENCH RELEASE|CRITERION|COLLECTORS EXTENDED|DCP|JAPANESE|ROADSHOW VERSION|NOIR|COPPOLA RESTORATION|CAPTURE|FINAL CUT|DOUCHE CUT|US RELEASE|BRAVIA CORE/).join('] [').upperInitial().lowerTrail()+']'}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: list of "names" to add to file name

Post by rednoah »

1.
As for normalization, that would work like so; check for some known patterns, yield some constant value in response:

Code: Select all

{ f =~ /Extended|Extentet|Long.Version/ ? ' [Extended Cut]' : null }
:idea: You might end up with lots of pattern / value pairs. You could maintain those in an external text file, and have the format code read them from there.


2.
The {tags} binding merely matches the file name and folder name against some known patterns. FileBot just so happens to store the previous file name to Extended Attributes when you rename files, and so {tags} will check that as well, and so that can make {tags} work even if the information is lost in the current file name.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: list of "names" to add to file name

Post by kim »

there is no "automation" way of adding new "tags"...
but you can compare and then "flag" your files

Code: Select all

{
	def fileRuntime = (duration.seconds / 60)
	def dbRuntime = runtime
	def dif = (fileRuntime / runtime)
	dif > 1 ? 'longer' : 'shorter'
}
sample

Code: Select all

longer
or

Code: Select all

{
def dif = minutes - runtime
dif > 1 ? "$dif min longer" : dif < -1 ? "${dif.toString().drop(1)} min shorter" : 'same'
}
sample

Code: Select all

2 min longer
and if you have a list with the runtime of all versions you can make it better
allineedis
Posts: 13
Joined: 14 Oct 2017, 17:13

Re: list of "names" to add to file name

Post by allineedis »

Thanks kim, I need to study and get my head around the code. Sometimes it is easier to just manually edit the name.
Post Reply