Renaming parameter {source}

All your suggestions, requests and ideas for future development
Post Reply
prooshotron
Posts: 3
Joined: 21 Jan 2012, 11:08

Renaming parameter {source}

Post by prooshotron »

Hey folks,

first of all thanks a lot for this really handy tool. It already did save a lot of manual typing and clicking work for me :)

But there's one thing i didn't get working yet. As I use FlexGet to automatically fetch new episodes and FlexGet is quality-aware, I need to have the source (dvdrip, hdtv, web-dl, etc.) in the file name.
I found the {source}-expression in the renaming-dialogs. I think this is the expression I need to use, but I don't know how to use it. It doesn't recognize any of my regular filenames and allways gives a BindingError :(

So is there a bug or am I just doing it wrong?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Should recognize pattern like DVDRip etc (followed and preceded by separators).

E.g. test.dvdrip.avi should def. work, but maybe there is something broken. Let me know your filenames so I can test that.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Also BindingError doesn't necessary mean it doesn't work. Just means with the test data you have set up certain expressions don't evaluate.
:idea: Please read the FAQ and How to Request Help.
prooshotron
Posts: 3
Joined: 21 Jan 2012, 11:08

Re: Renaming parameter {source}

Post by prooshotron »

Thanks for the quick reply :)

I finally figured it out :D I was testing only web-dl files and it seems FileBot doesn't know this format ;) When I used dvdrip, hdtv or anything else, it worked like a charm.

Below are some filenames that didn't recognize the web-dl (source should be "720p web-dl" here):

Code: Select all

Happy.Endings.S02E12.Makin.Changes.720p.WEB.DL.DD5.1.H.264.CtrlHD.mkv
The.Big.Bang.Theory.S05E13.The.Recombination.Hypothesis.720p.WEB.DL.DD5.1.H.264.CtrlHD.mkv
How.I.Met.Your.Mother.S07E01.720p.WEB-DL.DD5.1.H.264-KiNGS.mkv
Two.and.a.Half.Men.S09E14.720p.WEB.DL.DD5.1.H.264-KiNGS
How.I.Met.Your.Mother.S07E14.46.Minutes.720p.WEB.DL.DD5.1.H.264-CtrlHD
....
Also iTunesHD rips to xVid/DivX aren't recognized, but this is quite special and I don't know if there is a common naming format for that:

Code: Select all

How.I.Met.Your.Mother.S07E01.The.Best.Man.iTunesHD.XviD-iON
The.Big.Bang.Theory.S05E01.The.Skank.Reflex.Analysis.iTunesHD.XviD-iON

While searching which formats are recognized I found, that hdtv isn't recognized correct everytime. I've found some files with xxx.720p.hdtv.xxx in their names, which is something different than hdtv. 720p is HD and mkv normally, while hdtv is only a hdtv-rip in divx and SD. Some example:
Fringe.S04E09.720p.HDTV.X264-DIMENSION vs. Fringe.S04E09.HDTV.XviD-LOL

Maybe it's possible to add those source-formats to FileBot?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Ok I will add web-dl as source identifier. But source is only about retaining tokens from the original name. You can however further customise by checking video resolution. There is also the vf and ws bindings predefined.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Also you can check into the match() function which is also about retaining tokens from the original name.
:idea: Please read the FAQ and How to Request Help.
prooshotron
Posts: 3
Joined: 21 Jan 2012, 11:08

Re: Renaming parameter {source}

Post by prooshotron »

Wow, thanks! Using match() works pretty nice for me :) The following does everything I need and I can adjust it easily, when I find a new type of source.

Code: Select all

V:\{n.replaceTrailingBrackets()}\Season {s}\{n.replaceTrailingBrackets()} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´]/, "'").lowerTrail().replacePart(', ($1)')} [{vf} {(fn).lower().replaceAll(/\./,"-").match(/web-dl|dvdrip|hdtv/)} {vc}]
Now I'm going to look into scripting and automation :D

P.S.: Just something else, that came to my mind: Is there an easy way to work with German umlauts and non ASCII-characters? My NAS has a Problem with UTF-8, so I need to use ASCII-only filenames.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Nice. Good to see people making full use of my format engine. :)

You could try this, no idea if it works though:
java.text.Normalizer.normalize(unicodeText, java.text.Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "_");
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming parameter {source}

Post by rednoah »

Found a way to convert any kinda script to latin/ascii representation via ICU, and added it as expression function {s.ascii()}. Also added WEB-DL as {source} pattern.

You can have a look and do some testing with the latest beta:
https://sourceforge.net/projects/filebo ... ebot/HEAD/
:idea: Please read the FAQ and How to Request Help.
Post Reply