AMC script cutting off first line of downloaded subtitles

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
jamauai
Posts: 24
Joined: 20 Oct 2014, 10:33

AMC script cutting off first line of downloaded subtitles

Post by jamauai »

I assume this happens during the export process.

Script:

Code: Select all

filebot -script fn:amc "I:/Btsync/files" --output "I:/Movies" --log-file "C:/Logs/Filebot/filebot.log" --action move --conflict auto -non-strict  --def subtitles=en excludeList="C:/Logs/Filebot/filebot-completed.txt" movieFormat="I:/Movies/{n} ({y}) [{vf}]/{fn}"
Log:

Code: Select all

Parameter: subtitles = en
Parameter: excludeList = C:/Logs/Filebot/filebot-completed.txt
Parameter: movieFormat = I:/Movies/{n} ({y}) [{vf}]/{fn}
Argument: I:\Btsync\files
Using excludes: C:\Logs\Filebot\filebot-completed.txt (1821)
Ignore hidden: I:\Btsync\files\.sync
Input: I:\Btsync\files\Spider Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4
Exclude: I:\Btsync\files\Spider Man 3 (2007) [1080p]\WWW.YIFY-TORRENTS.COM.jpg
Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4 [series: Spider Man, movie: Spider-Man 3 (2007)]
Exclude Series: Spider Man
Group: [tvs:null, mov:spider man 3 2007, anime:null] => [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Matched [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4] to [Spider.Man.3.2007.1080p.BluRay.x264.YIFY] via hash
Fetching [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.srt]
Export [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.srt] as: SubRip / UTF-8
Writing [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.srt] to [Spider.Man.3.2007.1080p.BluRay.x264.YIFY.eng.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [I:\Btsync\files\Spider Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4]
[MOVE] Rename [I:\Btsync\files\Spider Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4] to [I:\Movies\Spider-Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.mp4]
[MOVE] Rename [I:\Btsync\files\Spider Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.eng.srt] to [I:\Movies\Spider-Man 3 (2007) [1080p]\Spider.Man.3.2007.1080p.BluRay.x264.YIFY.eng.srt]
Processed 2 files
subs%20cut%20off.PNG
Please advise. This has happened to nearly all movies (1400+)
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script cutting off first line of downloaded subtitle

Post by rednoah »

BOM issues... Fixed with r2975.
:idea: Please read the FAQ and How to Request Help.
jamauai
Posts: 24
Joined: 20 Oct 2014, 10:33

Re: AMC script cutting off first line of downloaded subtitle

Post by jamauai »

Will it be available for download soon? So far the latest version I see is r2971.

Thanks for all your hard work!
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script cutting off first line of downloaded subtitle

Post by rednoah »

Uploading a new build for you to test. Check back in an hour.
:idea: Please read the FAQ and How to Request Help.
jamauai
Posts: 24
Joined: 20 Oct 2014, 10:33

Re: AMC script cutting off first line of downloaded subtitle

Post by jamauai »

Will do.
jamauai
Posts: 24
Joined: 20 Oct 2014, 10:33

Re: AMC script cutting off first line of downloaded subtitle

Post by jamauai »

Getting this error with r2976:

Code: Select all

Run script [fn:amc] at [Sun May 17 01:38:59 HST 2015]
Parameter: subtitles = en
Parameter: excludeList = C:/Logs/Filebot/filebot-completed.txt
Parameter: movieFormat = I:/Movies/{n} ({y}) [{vf}]/{fn}
Argument: I:\Btsync\files
InvalidPathException: Illegal char <:> at index 2: I:\Btsync\files\A Lot Like Love (2005) [1080p]\A.Lot.Like.Love.2005.1080p.BrRip.x264.BOKUTOX.YIFY.mp4
java.nio.file.InvalidPathException: Illegal char <:> at index 2: I:\Btsync\files\A Lot Like Love (2005) [1080p]\A.Lot.Like.Love.2005.1080p.BrRip.x264.BOKUTOX.YIFY.mp4
	at net.filebot.util.FileSet.getPath(FileSet.java:84)
	at net.filebot.util.FileSet.add(FileSet.java:44)
	at net.filebot.util.FileSet.lambda$feed$45(FileSet.java:48)
	at net.filebot.util.FileSet$$Lambda$2/13226198.accept(Unknown Source)
	at net.filebot.util.FileSet.feed(FileSet.java:48)
	at net.filebot.util.FileSet$feed.call(Unknown Source)
	at Script1.run(Script1.groovy:139)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
	at net.filebot.Main.main(Main.java:168)
Failure (°_°)
Running same script on same file (removed from exclude list). The actual file is Spider-Man 3 (2007) but it is detecting it as A Lot Like Love (2005).

EDIT: exclude list, not exceptions list
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script cutting off first line of downloaded subtitle

Post by rednoah »

The exclude list made by FileBot MUST be UTF-8 encoded WITHOUT BOM.

Whatever weird Windows editor you're using to edit text files, don't use it. Do yourself a favour and switch to Notepad2 / Notepad++ / Sublime or any other proper editor that doesn't mess with encodings or starts adding BOMs to the beginning of each file.
:idea: Please read the FAQ and How to Request Help.
jamauai
Posts: 24
Joined: 20 Oct 2014, 10:33

Re: AMC script cutting off first line of downloaded subtitle

Post by jamauai »

You're right I've been editing it with Windows Notepad. Apologies.

Not sure what BOM is or does, but the script ran perfectly after removing the exclude list. Also, the downloaded subs are no longer missing any lines, issue resolved (r2976).

Is there a way to manually re-generate an exclude list?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC script cutting off first line of downloaded subtitle

Post by rednoah »

1)
You can fix your exclude list by opening the file with Sublime Editor and then Save with Encoding -> UTF-8.

2)
The amc script doesn't keep any other records.

You can probably partially recreate it using the FileBot history:

Code: Select all

filebot -script fn:history --format '${from.canonicalPath}' --log off > excludeList.txt
:idea: Please read the FAQ and How to Request Help.
Post Reply