Removing extra periods ('..') from name added by theTVDB

All about user-defined episode / movie / file name format expressions
Post Reply
RamRaider
Posts: 2
Joined: 06 Mar 2015, 13:27

Removing extra periods ('..') from name added by theTVDB

Post by RamRaider »

Hi all. I've recently had theTVDB add a period to the end of some series names. This is occurring in both the GUI and via the CMD line. I've been trying to fix this the last couple of days, but I can't get it to work. I've tried searching the forum, using the .replaceAll() and .tr() and looked at the groovy documentation, but I don't think I understand it all that well. This just recently started as the series' that are affected, didn't do this in the past. Any help is appreciated. Thanks.

amc.log of a relevant file:
Parameter: clean = y
Parameter: excludeList = amc.txt
Parameter: seriesFormat = F:/Media/TV/{n.space('.').replaceTrailingBrackets().tr('..','.')}/{n.space('.').replaceTrailingBrackets().tr('..','.')}.{'S'+s.pad(2)}/{n.space('.').replaceTrailingBrackets().tr('..','.')}.{'S'+s.pad(2)}E{e.pad(2)}.{t.space('.')}
Parameter: movieFormat = F:/Media/Movies/{n.space('.')}.{y}.{vf}
Argument: F:\Media\New\Complete
Using excludes: F:\Media\amc.txt (31)
Input: F:\Media\New\Complete\Archer.2009.S06E05.HDTV.x264-KILLERS.mp4
Group: [tvs:archer 2009] => [Archer.2009.S06E05.HDTV.x264-KILLERS.mp4, Archer.2009.S06E06.HDTV.x264-KILLERS.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Archer 2009]
Fetching episode data for [Archer (2009)]
Stripping invalid characters from new path: F:/Media/TV/Archer./Archer..S06/Archer..S06E05.Vision.Quest
[TEST] Rename [F:\Media\New\Complete\Archer.2009.S06E05.HDTV.x264-KILLERS.mp4] to [F:\Media\TV\Archer\Archer..S06\Archer..S06E05.Vision.Quest.mp4]

my most recent try:

Code: Select all

filebot -script fn:amc --output "F:/Media" --log-file amc.log --action test --def clean=y -non-strict "F:/Media/new/complete" --def excludeList=amc.txt --def "seriesFormat=F:/Media/TV/{n.space('.').replaceTrailingBrackets().tr('..','.')}/{n.space('.').replaceTrailingBrackets().tr('..','.')}.{'S'+s.pad(2)}/{n.space('.').replaceTrailingBrackets().tr('..','.')}.{'S'+s.pad(2)}E{e.pad(2)}.{t.space('.')}" --def "movieFormat=F:/Media/Movies/{n.space('.')}.{y}.
sysinfo:
FileBot 4.5.6 (r2818)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (C:\Program Files\FileBot\fpcalc.exe)
Extended Attributes: OK
Groovy Engine: 2.3.9
JRE: Java(TM) SE Runtime Environment 1.8.0_25
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 293 MB Used Memory
OS: Windows 8.1 (amd64)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Removing extra periods ('..') from name added by theTVDB

Post by rednoah »

Keep in mind that you're working with regex and that . DOT has special meaning "any character"

e.g.

Code: Select all

{'Archer...'.replaceAll(/[.]+$/, '')}
:idea: Please read the FAQ and How to Request Help.
RamRaider
Posts: 2
Joined: 06 Mar 2015, 13:27

Re: Removing extra periods ('..') from name added by theTVDB

Post by RamRaider »

Thanks!! I was looking at the replaceAll() but couldn't quite understand it in the documentation. I'll go back and try to understand what you did.
Post Reply