Source Media {vs} and {source}

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Source Media {vs} and {source}

Post by rednoah »

The source media (e.g. BluRay, WEB-DL, etc) can only be detected based on the file name.

  • {vs} ... the standardized source media value regardless of which exact pattern was a match (e.g. any match for BluRay / BDRip / BD50 / etc yields BluRay)
  • {source} ... the exact pattern match based on the file name (e.g. match for BD50 yields BD50)


:idea: {vs} and {source} are filename-based bindings.


:idea: FileBot uses the following patterns:
https://github.com/filebot/data/blob/master/media-sources.txt


:idea: Changes in classification and additional patterns can be added upon request. Please post change requests (including example file paths) here.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Source Media {vs} and {source}

Post by devster »

Is source now an exact match for case as well?
It seems that the following happens:

Code: Select all

fn: aaaaa.s01e01.hdtv.mkv => nice name - S01E01 - hdtv.mkv
fn: aaaaa.s01e01.HDTV.mkv => nice name - S01E01 - HDTV.mkv
As a corollary, how could I get the same behaviour as before (capital HDTV on non-capital match) or alternatively how could I choose {vs} over {source} only for specific values?
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

You can do {vs.upper()} and {source.upper()} if you want an uppercase value.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Source Media {vs} and {source}

Post by devster »

Not quite, I want BluRay and HDTV from {vs}, but I do my own matching for anything WEB.*
Hence the difference.
I'm currently doing:

Code: Select all

String src
if (['BluRay', 'HDTV'].contains(vs) {
  src = vs
} else {
  src = source
} 
just wondering if there's a better way.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

Well, I guess I'd write it like this:

Code: Select all

def src = vs =~ /BluRay|HDTV/ ? vs : source
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Source Media {vs} and {source}

Post by DevXen »

So.. VOD Isn't a valid source anymore?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Source Media {vs} and {source}

Post by kim »

Code: Select all

VODR|VODRip

Code: Select all

WEB-DL	(?:(?:ABC|ATVP|AMZN|BBC|CBS|CC|CR|CW|DCU|DSNP|DSNY|FBWatch|FREE|FOX|HMAX|HULU|iP|LIFE|MTV|NBC|NICK|NF|RED|TF1|STZ)[.-])?(?:WEB.?DL|WEB.?DLRip|WEB.?Cap|WEB.?Rip|HC|HD.?Rip|VODR|VODRip|PPV|PPVRip|iTunesHD|ithd|AmazonHD|NetflixHD|NetflixUHD|(?<=\d{3,4}[p].)WEB|WEB(?=.[hx]\d{3}))
so same as before, but now converted to WEB-DL
mterrill
Posts: 32
Joined: 21 May 2018, 21:08

Re: Source Media {vs} and {source}

Post by mterrill »

kim wrote: 14 Jun 2020, 21:40

Code: Select all

WEB-DL	(?:(?:ABC|ATVP|AMZN|BBC|CBS|CC|CR|CW|DCU|DSNP|DSNY|FBWatch|FREE|FOX|HMAX|HULU|iP|LIFE|MTV|NBC|NICK|NF|RED|TF1|STZ)[.-])?(?:WEB.?DL|WEB.?DLRip|WEB.?Cap|WEB.?Rip|HC|HD.?Rip|VODR|VODRip|PPV|PPVRip|iTunesHD|ithd|AmazonHD|NetflixHD|NetflixUHD|(?<=\d{3,4}[p].)WEB|WEB(?=.[hx]\d{3}))
I get "SyntaxError: Unexpected input: ','; Expecting <EOF>" when trying to use this, can I get some help on this one?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Source Media {vs} and {source}

Post by kim »

it's not format code

standardized =

Code: Select all

{vs}
correct way ;) =

Code: Select all

{source}
but you can use this:

Code: Select all

{fn.replaceAll(/(?i)(?:(?:ABC|ATVP|AMZN|BBC|CBS|CC|CR|CW|DCU|DSNP|DSNY|FBWatch|FREE|FOX|HMAX|HULU|iP|LIFE|MTV|NBC|NICK|NF|RED|TF1|STZ)[.-])?(?:WEB.?DL|WEB.?DLRip|WEB.?Cap|WEB.?Rip|HC|HD.?Rip|VODR|VODRip|PPV|PPVRip|iTunesHD|ithd|AmazonHD|NetflixHD|NetflixUHD|(?<=\d{3,4}[p].)WEB|WEB(?=.[hx]\d{3}))/,'WEB-DL')}
mterrill
Posts: 32
Joined: 21 May 2018, 21:08

Re: Source Media {vs} and {source}

Post by mterrill »

kim wrote: 15 Jun 2020, 01:11 it's not format code
Thanks, I think i need to work out what is doing what in there..... i.e. the basics of what (?<=\d{3,4}[p].) does etc....

I guess what I was looking for was a spaced out output and keeping it sort of simple, i.e. only naming a webrip, webdl and if not labelled then I know it is blu ray...

Thanks for explaining the error though :)
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Source Media {vs} and {source}

Post by kim »

it's Regular Expressions
https://regexr.com/

Code: Select all

\d{3,4}[p]
= e.g. 720p or 1080p
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Source Media {vs} and {source}

Post by devster »

Is there a way to customise the map {vs} uses?
I find it a bit too restrictive.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

You can always create your own map and your own code and conditions. A couple of lines of Groovy code at most, so it's more straight-forward to just write your own code.

Things can be added to the map though, if you find something missing.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Source Media {vs} and {source}

Post by devster »

Any examples for these lines of code?
My customisation is related to web sources, which you currently bundle in WEB-DL, I have some lines to match them separately.
Another small issue is that {source} seems to respect original case now dvdrip will result in dvdrip instead of DVDRip as before, not sure if it's because of my code.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

e.g.

Code: Select all

def input = 'Avatar DVDRip'
def patterns = [
	'DVD' : 'DVD|DVDRip'
]
patterns.findResult{ s, p -> input.findMatch(p) ? s : null }
:idea: {source} is supposed to return the pattern match, but one or two older versions did indeed incorrectly force uppercase.
:idea: Please read the FAQ and How to Request Help.
andy22
Posts: 10
Joined: 17 Aug 2020, 16:59

Re: Source Media {vs} and {source}

Post by andy22 »

Anidb uses 'www' as web-dl tag and also has 'HD-DVD' see: https://wiki.anidb.net/Content:Files#Qu ... itle_files
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

I've added www but if it causes false positives or other indirect issues I might remove it again.
:idea: Please read the FAQ and How to Request Help.
infamous
Posts: 8
Joined: 07 Jan 2022, 03:33

Re: Source Media {vs} and {source}

Post by infamous »

Regarding Web sources, could you add keywords for

Code: Select all

MAX

Code: Select all

STAN
MAX in particular since HBO MAX rebranded.

Also is there a way for {source} to pick up when spaces separate the words in the filename? As it is now it works if the filename contains something like

Code: Select all

Example.AMZN.WEB.mp4
but not

Code: Select all

Example AMZN WEB.mp4
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

:?: Can you provide real-world file paths for context and testing?
:idea: Please read the FAQ and How to Request Help.
infamous
Posts: 8
Joined: 07 Jan 2022, 03:33

Re: Source Media {vs} and {source}

Post by infamous »

Just noticed you implemented it already, thanks @rednoah!
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Can we add CRAV and iT to accecptable networks that can be used for figuring out {source}

examples are:

Code: Select all

Anne.with.an.E.2017.S03E01.A.Secret.Which.I.Desired.to.Divine.1080p.iT.WEB-DL.DD5.1.H.264-NYH (all of season 3 uses this)
Letterkenny.2016.S10E01.King.of.Suckers.1080p.CRAV.WEB-DL.DD5.1.H.264-NTb (all of season 10 uses this)
Thanks!
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Can PCOK get added as well please?
Poker Face 2023 - Network Peacock.

eg. Poker.Face.2023.S01E05.Time.of.the.Monkey.2160p.PCOK.WEB-DL.HDR10.DDP5.1.H.265-NTb.mkv

Thanks in advance!
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Can PMTP get added as well?
Rabbit Hole 2023 - Network Paramount+

eg. Rabbit.Hole.2023.S01E04.The.Person.In.Your.Ear.2160p.PMTP.WEB-DL.HDR10+.DDP5.1.H.265-NTb.mkv

Thanks!
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

Added. Deployment might take 1-2 weeks.
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

rednoah wrote: 21 Oct 2023, 18:37 Added. Deployment might take 1-2 weeks.
THANK YOU!!! Just wondering if PCOK above it got added? I can give many more examples if need be!
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

I see. I missed that one.


Both have been added now:
https://github.com/filebot/data/commits ... ources.txt
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Just looking to get AMC added!

Eg.

Code: Select all

Ride.With.Norman.Reedus.S03.1080p.AMC.WEB-DL.AAC2.0.H.264-BOOP
Thanks!
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Looking to get VICE added!

eg.

Code: Select all

Nirvanna.the.Band.the.Show.S01.UNCENSORED.1080p.VICE.WEBRip.AAC2.0.x264-RTN
Fubar.Age.of.Computer.S01.1080p.VICE.WEB-DL.AAC2.0.x264-BTN
Thanks!
LaserBones
Posts: 8
Joined: 07 Apr 2020, 08:47

Re: Source Media {vs} and {source}

Post by LaserBones »

I'm currently using {'['+source+']'} which renames "AMZN.WEB-DL" to "[AMZN.WEB-DL]". However, I would like "AMZN.WEB-DL" to display as "[AMZN][WEB-DL]". Is this possible?
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

LaserBones wrote: 29 May 2024, 04:27 I would like "AMZN.WEB-DL" to display as "[AMZN][WEB-DL]"
e.g.

Format: Select all

{ source.tokenize('.').joining('][', '[', ']') }
:idea: Please read the FAQ and How to Request Help.
LaserBones
Posts: 8
Joined: 07 Apr 2020, 08:47

Re: Source Media {vs} and {source}

Post by LaserBones »

Format: Select all

{ source.tokenize('.').joining('][', '[', ']') }
Thank you. Is there a way to make this also work if there are spaces instead of periods?
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

LaserBones wrote: 29 May 2024, 06:08 Thank you. Is there a way to make this also work if there are spaces instead of periods?
e.g.

Format: Select all

{ source.space('.').tokenize('.').joining('][', '[', ']') }
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Looking to get MY5 added:

eg.

Code: Select all

Into.the.Amazon.with.Robson.Green.2024.S01E01.Episode.1.1080p.MY5.WEB-DL.AAC2.0.H.264-SLAG
Accused.Guilty.or.Innocent.S03.1080p.MY5.WEB-DL.AAC2.0.H.264
Accused.Guilty.or.Innocent.S04.1080p.MY5.WEB-DL.AAC2.0.H.264
Thanks!
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

VICE and MY5 have been added.
:idea: Please read the FAQ and How to Request Help.
cza
Posts: 3
Joined: 28 Aug 2024, 18:38

Re: Source Media {vs} and {source}

Post by cza »

hi, please add DSCP and GLBO

eg.
90.Day.Diaries.S02.1080p.DSCP.WEB-DL.AAC2.0.x264-WhiteHat
90.Day.Diaries.S02E01.1080p.DSCP.WEB-DL.AAC2.0.x264-WhiteHat.mkv
Justica.S01.1080p.GLBO.WEB-DL.AAC5.1.H.264-RiPER
Justica.S01E01.Episodio.1.1080p.GLBO.WEB-DL.AAC5.1.H.264-RiPER.mkv
tks
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

DSCP.WEB-DL and GLBO.WEB-DL have been added. I was not able to figure out what those abbreviations mean though...
:idea: Please read the FAQ and How to Request Help.
cza
Posts: 3
Joined: 28 Aug 2024, 18:38

Re: Source Media {vs} and {source}

Post by cza »

rednoah wrote: 29 Aug 2024, 03:59 DSCP.WEB-DL and GLBO.WEB-DL have been added. I was not able to figure out what those abbreviations mean though...
DSCP - Discovery+
GLBO - Globoplay (a Brazilian digital platform for streaming videos and audio on demand, developed and operated by Globo TV).
cza
Posts: 3
Joined: 28 Aug 2024, 18:38

Re: Source Media {vs} and {source}

Post by cza »

hi, please add PLAY

its for Google Play movies.

eg.
Bad.Boys.Ride.or.Die.2024.1080p.PLAY.WEB-DL.DDD5.1.H.264.DUAL-C76.mkv
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Please add NOW.WEB-DL

examples:
Britains.Most.Evil.Killers.S07.1080p.NOW.WEB-DL.AAC2.0.H.264-RAWR
Britains.Most.Evil.Killers.S08.1080p.NOW.WEB-DL.AAC2.0.H.264-RAWR

Thanks!
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Please add BCORE.WEB-DL

a few examples:

The.Father.2020.2160p.BCORE.WEB-DL.x265.10bit.HDR.DTS-HD.MA.5.1-SWTYBLZ
The.Night.Before.2015.2160p.BCORE.WEB-DL.x265.10bit.HDR.DTS-HD.MA.5.1-SWTYBLZ
White.Boy.Rick.2018.2160p.BCORE.WEB-DL.x265.10bit.HDR.DTS-HD.MA.7.1-SWTYBLZ

Thanks!
WalterWhite1312
Posts: 17
Joined: 04 Sep 2024, 16:16

Re: Source Media {vs} and {source}

Post by WalterWhite1312 »

Please add

Code: Select all

azuhd
for "AmazonUHD"
JaxMedia
Posts: 2
Joined: 29 May 2025, 06:01

Re: Source Media {vs} and {source}

Post by JaxMedia »

Hi there,

Can the following source-media/services be added? (Oceania):
AUBC - ABC iView
SBS - SBS on Demand
7PLUS - 7Plus
9NOW - 9Now
TEN - 10Play
TVNZ - TVNZ+
3NOW - ThreeNow
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

JaxMedia wrote: 29 May 2025, 06:07 AUBC - ABC iView
SBS - SBS on Demand
7PLUS - 7Plus
9NOW - 9Now
TEN - 10Play
TVNZ - TVNZ+
3NOW - ThreeNow
Please add a sample file name for each of these media sources like this.
:idea: Please read the FAQ and How to Request Help.
JaxMedia
Posts: 2
Joined: 29 May 2025, 06:01

Re: Source Media {vs} and {source}

Post by JaxMedia »

Code: Select all

Gruen.S16E07.1080p.AUBC.WEB-DL.AAC2.0.H.264-JAX
Insight.S2025E01.SBS.WEB-DL.AAC2.0.H.264-JAX
Below.Deck.Down.Under.S02E18.720p.7PLUS.WEB-DL.AAC2.0.H.264-JAX
Paramedics.S05E10.720p.9NOW.WEB-DL.AAC2.0.H.264-JAX
MasterChef.S16E45.720p.TEN.WEB-DL.AAC2.0.H.264-JAX
The.Responder.S01E06.720p.TVNZ.WEB-DL.AAC2.0.H.264-JAX
Thirst.With.Shay.Mitchell.S01E01.720p.3NOW.WEB-DL.AAC2.0.H.264-JAX
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

I see. It's all variants of WEB-DL. AUBC|SBS|7PLUS|9NOW|TEN|TVNZ|3NOW has been added to the pattern: https://github.com/filebot/data/commit/ ... 157ad71d7d
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Please add APPS.WEB-DL

a few examples:

Code: Select all

Andor.S02.2160p.APPS.WEB-DL.DDP5.1.Atmos.H.265-VARYG
The.Parent.Trap.1998.2160p.APPS.WEB-DL.TrueHD.7.1.Atmos.H.265-DRX
Percy.Jackson.and.the.Olympians.S02.2160p.APPS.WEB-DL.DDP5.1.Atmos.H.265-VARYG
Thanks!
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

Thanks. Added.
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Please add

Code: Select all

CORE.WEB-DL
Some examples:

Code: Select all

Life.2017.2160p.CORE.WEB-DL.DDP5.1.Atmos.HDR.H.265-TheBigBeautifulRelease
Elysium.2013.2160p.CORE.WEB-DL.DDP5.1.Atmos.HDR.H.265-TheBigBeautifulRelease
Thanks!
User avatar
rednoah
The Source
Posts: 24636
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Source Media {vs} and {source}

Post by rednoah »

CORE.WEB-DL has been added.
:idea: Please read the FAQ and How to Request Help.
PukeStinkLikeRye
Posts: 55
Joined: 19 Mar 2022, 18:49

Re: Source Media {vs} and {source}

Post by PukeStinkLikeRye »

Please add

Code: Select all

ATV.WEB-DL
Some examples:

Code: Select all

Criminal.Minds.S19E03.Body.Count.2160p.ATV.WEB-DL.DDP5.1.DV.H.265-NTb
Dutton.Ranch.S01E05.Peaceful.Find.Peace.2160p.ATV.WEB-DL.DDP5.1.DV.HDR.H.265-NTb
Thanks!
Post Reply