{tags} for Censored/Uncensored issue

All about user-defined episode / movie / file name format expressions
Post Reply
fwun
Posts: 5
Joined: 26 Nov 2025, 09:12

{tags} for Censored/Uncensored issue

Post by fwun »

Hi Rednoah,

I've been using your great program for years, one small issue I've run into is with files tagged 'CENSORED' in the filename, for some reason FileBot is picking up a {tags} entry that shows it as 'Uncut'. I had a look through the docs entry for {tags} and it doesn't seem like this is intended behavior (viewtopic.php?t=12668).

Input: Bluey.(2018).S03E39.Exercise.CENSORED.720p.WEB-DL.x264.AAC-.mp4
Output: Bluey.(2018).S03E39.Exercise.Uncut.CENSORED.720p.WEB-DL.x264.AAC-.mp4

In testing if I add 'CENSORED' to another random episode this same problem does not occur, and if I rename the above file to remove 'censored' it still comes up as 'Uncut' in Filebot. Looking at the episode bindings in Filebot I see 'edition: Uncut' and 'tags: [Uncut]'.
I also have the uncut version of the same episode, and if I tag that file it comes up with no tags/bindings for 'uncensored/uncut' as I'd expect (its not in the filename). So I'm confused why this one file seems to be identifying {tags} as uncut.

To fix this issue would it be possible to add 'censored' to the list of tags FileBot gathers from filenames?
I see {tags} already gathers cut/uncut/uncensored, but not 'censored'.

Worth noting that censored and cut are not identical definitions. A censored version may just have overdub beeps, whereas a cut version may just run shorter due to airtime limitations, likewise 'uncut' may be longer than the aired/screened version while 'uncensored' may be the same length as aired but have no censored words/content. Thats why some movies or TV show releases get advertised as 'uncut & uncensored' to indicate they're the completely original & full version of the release.

Warm regards.

My script for episode naming (highlighted relevant sections - it searches for 'censored' and caps it, it also uses {tags}):

Format: Select all

{n.replaceAll(/[:;|]/," - ").replaceAll(/[`´‘’]/,"'").removeIllegalCharacters()}
/{n.replaceAll(/[:;|]/," - ").replaceAll(/[`´‘’]/,"'").removeIllegalCharacters().space('.')}
.{episode.special?'S00':'S'+s.pad(2)}
.{vf.replace('480p':'SD','360p':'SD','240p':'SD')}
.{vs.replace('LaserRip':'LaserDisc','DVD-R':'DVD')}
{f.dir.name.lower().contains(/.ntsc/)?'.NTSC':''}{f.dir.name.lower().contains(/.pal/)?'.PAL':''}
/{n.replaceAll(/[:;|]/," - ").replaceAll(/[`´‘’]/,"'").removeIllegalCharacters().space('.')}
.{s00e00}
.{t.replaceAll(/[:;|]/," - ").replaceAll(/[`´‘’]/,"'").removeIllegalCharacters().space('.')}
{(f.dir.name.lower().contains(/.dc./))?'.Director\'s.Cut':''}[b]{'.'+tags.join('.').[/b]replace(' ','.').replace(/Directors.Cut/,'Director\'s.Cut')}
[b]{'.'+fn.match(/Uncensored|Censored/).upper()}[/b]
{'.'+fn.matchAll(/fanedit|proper|repack|rerip|remux|internal|limited|recoded|bootleg/)*.upper().join('.').replace(/FANEDIT/,'FanEdit')}
{'.'+fn.matchAll(/subbed|hardsubs/)*.upper().join('.').replace('SUBBED','HARDSUBS')}.{vf}.{vs.replace('LaserRip':'LaserDisc','DVD-R':'DVD')}{'.'+hdr}{bitdepth==10?'.10bit':''}{f.dir.name.lower().contains(/.ntsc/)?'.NTSC':''}
{f.dir.name.lower().contains(/.pal/)?'.PAL':''}
.{vc.replace('Microsoft':'VC-1','AVC':'H.264','Sorenson':'Sorenson.H.263','Zencoder':'x264','HEVC':'x265',)}
.{ac.replace('MP2':'MP','MP3':'MP','MPEGAudio':'MP','MPEG':'MP','MLP':'','DTS':'','EAC3':'','AC3':'','AAC':'',)}
{aco.replace('Layer 2':'2','Layer 3':'3','Dolby Digital Surround EX':'DD-EX','Dolby Surround EX':'DD-EX','Dolby Digital EX':'DD-EX','Dolby Digital Plus with Dolby Atmos':'DDP.Atmos','Dolby TrueHD':'TrueHD','TrueHD with Dolby Atmos':'TrueHD.Atmos','DTS Extended Surround':'DTS-ES','DTS-HD Master Audio':'DTS-HD.MA','DTS-HD MA + DTS:X':'DTS-X','Dolby Digital Plus':'DDP','Dolby Digital':'AC3',)}
-{group}
{'.'+lang}

Code: Select all

FileBot 5.2.0 (r10714)
JNA Native: 7.0.0
MediaInfo: 25.07
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2025-09-04 (r1016)
Groovy: 4.0.28
JRE: OpenJDK Runtime Environment 21.0.4
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 8 GB Max Memory / 159 MB Used Memory
OS: Windows 10 (amd64)
User avatar
rednoah
The Source
Posts: 24405
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {tags} for Censored/Uncensored issue

Post by rednoah »

Sure, we can add Censored to the {tags} pattern.


:!: Note that {tags} is a filename-based binding, so if you get Uncut then Uncut is in the file name, or the original file name, or the embedded media title, or the folder name. That would suggest that your current file name is now missing information that was originally there.
:idea: Please read the FAQ and How to Request Help.
fwun
Posts: 5
Joined: 26 Nov 2025, 09:12

Re: {tags} for Censored/Uncensored issue

Post by fwun »

Wow, thanks for such a quick response. And that would be great.

I've dug through all the info you suggested and eventually found in the History/log of Filebot that the original file had 'uncut' in the title - so thanks for helping me find the source.

I can't seem to delete or edit the field in Episode Bindings nor remove that entry from History, so it seems like this file is stuck with the 'uncut' tags/edition. I'm sure there something simple I'm missing. Is there a way I can remove this from the Filebot history/logs/metadata or tags for the episode?

Cheers
fwun
Posts: 5
Joined: 26 Nov 2025, 09:12

Re: {tags} for Censored/Uncensored issue

Post by fwun »

Sorry to waste your time, I found viewtopic.php?t=12133 and am looking over it now. I presume the data is stored in the xattr data.. will keep trying. Maybe just revert this individual file. Cheers
User avatar
rednoah
The Source
Posts: 24405
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {tags} for Censored/Uncensored issue

Post by rednoah »

The original file name is stored to xattr metadata so that's probably where the information is coming from.


:idea: You can use PowerShell to add / remove / modify xattr metadata:

Shell: Select all

Remove-Item -Path "/path/to/file" -Stream "net.filebot.filename"
:idea: Please read the FAQ and How to Request Help.
fwun
Posts: 5
Joined: 26 Nov 2025, 09:12

Re: {tags} for Censored/Uncensored issue

Post by fwun »

Thanks so much, I just used this which has done it:

Code: Select all

filebot -script fn:xattr "the file.mp4" --action clear
Is it generally better to use the PowerShell commands?
User avatar
rednoah
The Source
Posts: 24405
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {tags} for Censored/Uncensored issue

Post by rednoah »

Either is fine. The difference is that your command clears all xattr and not just the net.filebot.filename one.


:idea: You can clear specific xattr with the filebot command as well, that has the upside that it works the same on all platforms, not just Windows:

Shell: Select all

filebot -script fn:xattr /path/to/files --def net.filebot.filename=
:idea: Please read the FAQ and How to Request Help.
fwun
Posts: 5
Joined: 26 Nov 2025, 09:12

Re: {tags} for Censored/Uncensored issue

Post by fwun »

Thanks for clearing that up for me. Appreciate the help
Post Reply