Hi,
So I want to rename some files in a mounted Google Drive without many API calls and the slow process
But I want FileBot to guess things like {vf}, {source}, {aco}, {channels}, {ac}, {group} from filename instead of mediainfo, is it possible?
Example of filename: Mare.of.Easttown.S01E01.Miss.Lady.Hawk.Herself.1080p.AMZN.WEB-DL.DDP5.1.H.264-TEPES (most infos are already there in the filename)
Getting infos from filenames instead of mediainfo
Re: Getting infos from filenames instead of mediainfo
You can use match() to match arbitrary patterns from the file name.
e.g. match 720p / 1080p / etc patterns from the current file name: 1080p
e.g. match an entire section of the current file name: 1080p.AMZN.WEB-DL.DDP5.1.H.264-TEPES
e.g. match 720p / 1080p / etc patterns from the current file name: 1080p
Code: Select all
{ fn.match(/[0-9]{3,4}p/) }
e.g. match an entire section of the current file name: 1080p.AMZN.WEB-DL.DDP5.1.H.264-TEPES
Code: Select all
{ fn.match(/[0-9]{3,4}p.+/) }
Re: Getting infos from filenames instead of mediainfo
For subtitles ending with .eng using (/[0-9]{3,4}p.+/) keep the .eng like (1080p.AMZN.WEB-DL.DDP5.1.H.264-TEPES.eng) anyway to remove the .eng part?rednoah wrote: ↑07 Jun 2021, 10:33 You can use match() to match arbitrary patterns from the file name.
e.g. match 720p / 1080p / etc patterns from the current file name: 1080pCode: Select all
{ fn.match(/[0-9]{3,4}p/) }
e.g. match an entire section of the current file name: 1080p.AMZN.WEB-DL.DDP5.1.H.264-TEPESCode: Select all
{ fn.match(/[0-9]{3,4}p.+/) }
Re: Getting infos from filenames instead of mediainfo
Re: Getting infos from filenames instead of mediainfo
Thanks it worked!
In case of anime, like [Erai-raws] Shingeki no Kyojin - The Final Season - 01 [1080p][Multiple Subtitle]
What if I want to put (Erai-raws 1080p) at the end?
Re: Getting infos from filenames instead of mediainfo
You can match different patterns at different times in your format.
e.g.
Code: Select all
{ plex.name }
(
{ fn.match(/^\[(.*?)\]/) }
{ fn.match(/[0-9]{3,4}p/) }
)
Re: Getting infos from filenames instead of mediainfo
This one worked too, I'll start testing with regexr to figure out matching for different kind of releases, thanksrednoah wrote: ↑07 Jun 2021, 11:39You can match different patterns at different times in your format.
e.g.Code: Select all
{ plex.name } ( { fn.match(/^\[(.*?)\]/) } { fn.match(/[0-9]{3,4}p/) } )