Page 1 of 1

Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 07 Nov 2016, 15:23
by FadeAway12
Sorry for the double post.. i figured out i posted this in the wrong subforum:

Hey there,

i did not change my script but all of a sudden my configuration leads to the deletion of external subtitle files.

Here is the latest log:

Code: Select all

Run script [dev:amc] at [Fri Nov 04 17:54:49 CET 2016]
Parameter: seriesFormat = TV-Serien/{n.ascii()}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{s00e00} - {t.ascii()}/{fn}
Parameter: movieFormat = {file =~ /(?i)AC3D|AC3LD|AC3M|AC3LineDubbed|AC3.Dubbed|DTSD|Line.dubbed|Dubbed|Line.Dubbed|mic.dub|telesync|WebRip|Web-Rip|Web.Rip|WebDl|Web-Dl|Web.Dl|Web-Hd|WebHd|Web.Hd/ ? 'Pre-Release' : file =~ /(?i)3D|HSBS|H-SBS|HOU|H-OU/ ? 'Filme(3D)' : 'Filme'}/{n.ascii()} - [{y}] - [{vc}, {vf}, {ac}, {source}{file =~ /3D/ ? file =~ /(?i)AC3D|HSBS|H-SBS|HOU|H-OU/ ? '' : ', 3D' : ''}{file =~/(?i)HSBS|H-SBS/ ? ', 3D-HSBS' : ''}{file =~/(?i)HOU|H-OU/ ? ', 3D-HOU' : ''}]/{n.ascii()} - {y}.{fn}
Parameter: gmail = *****
Parameter: mailto = *****
Parameter: pushbullet = *****
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: excludeList = .excludes
Parameter: ut_dir = /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to
Parameter: ut_kind = multi
Parameter: ut_title = spy-klapperschlange-1080p-uploaded.to
Parameter: ut_label = N/A
Parameter: clean = y
Parameter: plex = *****
Use excludes: /Volumes/Plex/.excludes (1596)
Ignore orphaned subtitles: /Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Subs/spy-klapperschlange-1080p.idx
Ignore orphaned subtitles: /Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Subs/spy-klapperschlange-1080p.sub
Input: /Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/spy-klapperschlange-1080p.mkv
spy-klapperschlange-1080p.mkv [series: Spy, movie: Escape from New York (1981)]
Exclude Series: Spy
Group: [tvs:null, mov:escape from new york 1981] => [spy-klapperschlange-1080p.mkv]
Rename movies using [TheMovieDB]
[MOVE] Rename [/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/spy-klapperschlange-1080p.mkv] to [/volumes/Plex/Filme/Escape from New York - [1981] - [x264, 1080p, DTS, BluRay]/Escape from New York - 1981.spy-klapperschlange-1080p.mkv]
Processed 1 files
Notify Plex: [host:192.168.0.23, token:xxxx]
GET: http://192.168.0.23:32400/library/sections/all/refresh?X-Plex-Token=xxxx
Sending PushBullet report
Server returned HTTP response code: 401 for URL: https://api.pushbullet.com/v2/pushes
java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.pushbullet.com/v2/pushes
	at net.filebot.web.WebRequest.post(WebRequest.java:202)
	at net.filebot.web.WebRequest.post(WebRequest.java:175)
	at net.filebot.cli.ScriptShellMethods.post(ScriptShellMethods.java:301)
	at PushBulletClient$_closure1.doCall(Script3.groovy:102)
	at Script1$_run_closure69.doCall(Script1.groovy:624)
	at Script1$_run_closure69.doCall(Script1.groovy)
	at net.filebot.cli.ScriptShellBaseClass.tryLogCatch(ScriptShellBaseClass.java:127)
	at Script1.run(Script1.groovy:623)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.pushbullet.com/v2/pushes
	at net.filebot.web.WebRequest.post(WebRequest.java:199)
	... 12 more
     [mail] Sending email: [FileBot] spy-klapperschlange-1080p-uploaded.to
     [mail] Sent email with 0 attachments
Clean clutter files and empty folders
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY.imdb.html
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Proof/spy-klapperschlange-1080p-proof.jpg
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/spy-klapperschlange-1080p.jpg
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/spy-klapperschlange-1080p.nfo
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Subs/spy-klapperschlange-1080p.idx
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Subs/spy-klapperschlange-1080p.sub
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Subs
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY/Proof
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to/Die.Klapperschlange.1981.German.DL.REMASTERED.1080p.BluRay.x264-SPiCY
Delete /Volumes/Macintosh Fusion Drive/Volumes/Plex/Download/spy-klapperschlange-1080p-uploaded.to
Done ヾ(@⌒ー⌒@)ノ
Until recently the .idx and .sub files (as well as all other subtitle files that were either in the same folder as the mkv or in a separate subfolder like "subs") were copied over with the mkv and renamed correctly..

I did update filebot though.. is there anything i can do in order to get back the old behavior?

Thanks a lot :)

Sysinfo:

Code: Select all

FileBot 4.7 (r3923)
JNA Native: 4.0.1
MediaInfo: 0.7.78
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
Script Bundle: 2016-10-31 (r448)
Groovy: 2.4.6
JRE: Java(TM) SE Runtime Environment 1.8.0_74
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 489 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
Data: /Users/xx/.filebot
uname: Darwin Mac-mini.fritz.box 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64

------------------- UPDATE AVAILABLE: FileBot 4.7.2 (r4178) --------------------

Done ヾ(@⌒ー⌒@)ノ
I just updated Filebot and test if it works now:

Code: Select all

FileBot 4.7.2 (r4178)
JNA Native: 4.0.1
MediaInfo: 0.7.87
7-Zip-JBinding: 9.20
Chromaprint: 1.1.0
Extended Attributes: OK
Script Bundle: 2016-10-31 (r448)
Groovy: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_74
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 156 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
Data: /Users/xx/.filebot
uname: Darwin Mac-mini.fritz.box 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64
Done ヾ(@⌒ー⌒@)ノ
EDIT: Nope, still ignoring the subtiles :(

EDIT 2: To clear something up: My other Filebot Setup (a raspberry pi with raspbian running filebot 4.6.2 with the same jdownloader-postprocess.sh i edited) still includes the subs.. just tested it. Is this a new thing with 4.7.x?

EDIT 3: To have every information in one place: The first script is the one that leads to the ignorance of the subtitles, the second one is the one where everything still works:

Code: Select all

#!/bin/sh

printenv > /users/xx/Documents/printenv.txt
filebot -script fn:sysenv > /users/xx/Documents/printenv2.txt 2>&1


# org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json
# [{"eventTrigger":"ON_PACKAGE_FINISHED","enabled":true,"name":"Execute FileBot (PackageFinished)","script":"var script = 'Users/xx/Documents/jdownloader-postprocess.sh'\n\nvar path = package.getDownloadFolder()\nvar name = package.getName()\nvar label = package.getComment() ? package.getComment() : 'N/A'\n\nvar command = [script, path, name, label, 'PACKAGE_FINISHED']\n\nlog(command)\nlog(callSync(command))\n","eventTriggerSettings":{}} ]

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/volumes/Plex"

filebot -script dev:amc --output "$CONFIG_OUTPUT" --action move --conflict skip -non-strict --log-file amc.log --def "seriesFormat=TV-Serien/{n.ascii()}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{s00e00} - {t.ascii()}/{fn}" "movieFormat={file =~ /(?i)AC3D|AC3LD|AC3M|AC3LineDubbed|AC3.Dubbed|DTSD|Line.dubbed|Dubbed|Line.Dubbed|mic.dub|telesync|WebRip|Web-Rip|Web.Rip|WebDl|Web-Dl|Web.Dl|Web-Hd|WebHd|Web.Hd/ ? 'Pre-Release' : file =~ /(?i)3D|HSBS|H-SBS|HOU|H-OU/ ? 'Filme(3D)' : 'Filme'}/{n.ascii()} - [{y}] - [{vc}, {vf}, {ac}, {source}{file =~ /3D/ ? file =~ /(?i)AC3D|HSBS|H-SBS|HOU|H-OU/ ? '' : ', 3D' : ''}{file =~/(?i)HSBS|H-SBS/ ? ', 3D-HSBS' : ''}{file =~/(?i)HOU|H-OU/ ? ', 3D-HOU' : ''}]/{n.ascii()} - {y}.{fn}" gmail=xx mailto=xx pushbullet=xx skipExtract=y unsorted=y music=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" clean=y plex=xx

Code: Select all

#!/bin/sh

# org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json
# [{"eventTrigger":"ON_PACKAGE_FINISHED","enabled":true,"name":"Execute FileBot (PackageFinished)","script":"var script = 'home/pi/.jd2/jdownloader-postprocess.sh'\n\nvar path = package.getDownloadFolder()\nvar name = package.getName()\nvar label = package.getComment() ? package.getComment() : 'N/A'$

# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"

# Configuration
CONFIG_OUTPUT="/media/usbdrive"

filebot -script dev:amc --output "$CONFIG_OUTPUT" --action move --conflict skip -non-strict --log-file amc.log --def "seriesFormat=TV-Serien/{n.ascii()}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{s00e00} - {t.ascii()}/{fn}" "movieFormat={file =~ /(?i)AC3D|AC3LD|AC3M|AC3LineDubbed|AC3.Dubbed|DTSD|Line.dubbed|Dubbed|Line.Dubbed|mic.dub|telesync|WebRip|Web-Rip|Web.Rip|WebDl|Web-Dl|Web.Dl|Web-Hd|WebHd|Web.Hd/ ? 'Cinedubs' : file =~ /(?i)3D|HSBS|H-SBS|HOU|H-OU/ ? '3D-Filme' : 'Filme'}/{n.ascii()} - [{y}] - [{vc}, {vf}, {ac}, {source}{file =~ /3D/ ? file =~ /(?i)AC3D|HSBS|H-SBS|HOU|H-OU/ ? '' : ', 3D' : ''}{file =~/(?i)HSBS|H-SBS/ ? ', 3D-HSBS' : ''}{file =~/(?i)HOU|H-OU/ ? ', 3D-HOU' : ''}]/{n.ascii()} - {y}.{fn}" gmail=xx mailto=xx pushbullet=xx plex=xx unsorted=y skipExtract=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" clean=y -no-xattr



Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 07 Nov 2016, 15:31
by rednoah
The amc script will only include / process subtitle files that are in the same folder and have the same name as the corresponding video file. If orphaned subtitles are left behind and if you use --def clean=y then I guess the cleaner will get rid of them.

The details of how this behaviour is implemented may have changed recently. Older versions of that FileBot are no longer supported / incompatible with the latest scripts won't get the latest scripts.


EDIT:

I guess I'll add explicit support for Subs folders.


EDIT 2:

Done. https://github.com/filebot/scripts/comm ... 664f950abf

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 08 Nov 2016, 16:24
by FadeAway12
Thank you! Works perfectly :)

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 08 Jan 2017, 17:12
by balmalu
Hi

Very good to have it reenabled - what am I missing ?

this is in master right ? I'm seeing the subs dir being cleaned.

do i need to run without def clean=y to get the subs in /subs to get rpocessed ?

thanks !

will donate - way overdue !

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 08 Jan 2017, 17:15
by rednoah
Automated processing of subtitles is not always possible depending on how the existing subtitles are organized.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 30 Jun 2017, 16:49
by dauntless101
The problem is that sometimes the .sub file will be compressed in a rar file alongside the .idx and .mkv files. Filebot will decompress the rar to get the .sub file but it creates an additional directory which contains the .sub file. That .sub file is then considered "orphaned" by this newer filebot behavior and only the .idx file is coped to the destination.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 30 Jun 2017, 17:00
by rednoah
idx/sub subtitles are image-based and not text-based. You don't want those. Best to just fetch proper text-based subtitles from OpenSubtitles.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 30 Jun 2017, 19:11
by dauntless101
I actually DO want the idx/sub files, and this used to work properly. The current way only moves the .idx file which is useless and a waste.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 02:59
by dauntless101
Can you change the extraction process to extract to the current directory rather than creating a new one with the extracted file inside? That should solve this.

Thanks!

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 03:36
by rednoah
Unfortunately no, while that behaviour might be beneficial for idx/sub pairs, would also cause issues with movie/series auto-detection in certain corner cases. idx/sub is officially unsupported, as are "subtitle" folders that contain subtitles such as "English.srt". It's more trouble maintaining than it's worth considering that FileBot can just grab new ones from OpenSubtitles.


You can also write your own preprocessing script to extract and move the idx/sub pairs in a manner that filebot can pick up before calling the amc script. ;)


:idea: Why not just add --def subtitles=en and be done with it? It might not always work, but it will mostly work, and somewhat alleviate the issue. Plus you get resolution-independent searchable subtitles.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 03:49
by dauntless101
This is not just idx/sub... if ANY subtitle file bundled with the movie (srt included) is in an archive, Filebot will extract that file into a new directory, which AMC then considers "orphaned". The subtitles that bundled with a release are always going to be more reliable than pulling from someplace else.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 03:52
by rednoah
1. This works:

Code: Select all

Foobar.avi
Foobar.sub
(if not, please post the logs)


2. This also works:

Code: Select all

Foobar.avi
subs/Foobar.sub
(if not, please post the logs)


3. This is not supported and does not work:

Code: Select all

Foobar.avi
subs/something.sub

By making many assumptions, you can easily transform (3) to (1) with your own preprocessing script, which you could share with everyone who has this particular use case.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 04:18
by dauntless101
Yeah, but if you have:

Code: Select all

moviename.mkv
moviename.rar
in which moviename.rar contains subtitles, Filebot will extract moviename.rar to a new directory of the same name, so now you have

Code: Select all

moviename.mkv
moviename/moviename.srt
Filebot considers moviename.srt orphaned beacuse it's not in the same directory as the .mkv and not in a directory called "subs".

Thank you

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 04:48
by rednoah
dauntless101 wrote: 03 Jul 2017, 04:18 Filebot considers moviename.srt orphaned because it's not in the same directory as the .mkv and not in a directory called "subs".
Maybe. Maybe not. What have you tried so far to check if this is indeed the case?


:idea: As far as I can tell, it works for arbitrary folders and I have the logs to proof it:

Code: Select all

Input: Avatar.2009.mp4
Input: foo/Avatar.2009.srt
Group: [mov:avatar 2009] => [Avatar.2009.mp4, Avatar.2009.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [Avatar.2009.mp4]
Rank [Avatar 2009] => [Avatar (2009)]
[COPY] from [Avatar.2009.mp4] to [Movies/Avatar (2009)/Avatar (2009).mp4]
[COPY] from [foo/Avatar.2009.srt] to [Movies/Avatar (2009)/Avatar (2009).srt]

Code: Select all

Input: Avatar.2009.mp4
Input: Avatar.2009/Avatar.2009.srt
Group: [mov:avatar 2009] => [Avatar.2009.mp4, Avatar.2009.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [Avatar.2009.mp4]
Rank [Avatar 2009] => [Avatar (2009)]
[COPY] from [Avatar.2009.mp4] to [Movies/Avatar (2009)/Avatar (2009).mp4]
[COPY] from [Avatar.2009/Avatar.2009.srt] to [Movies/Avatar (2009)/Avatar (2009).srt]

:?: How did you test your test case? What's different? What did the log say?

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 03 Jul 2017, 18:48
by dauntless101
I just tested this out as an example:

Code: Select all

zachary@pms101:~$ ls -lash downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS
total 11G
4.0K drwxr-xr-x 2 zachary zachary 4.0K Jul  3 11:36 .
4.0K drwxr-xr-x 4 zachary zachary 4.0K Jul  3 11:36 ..
 76K -rw-r--r-- 1 zachary zachary  70K Jun 30 21:08 The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.idx
 11G -rw-r--r-- 1 zachary zachary  11G Jun 30 22:56 The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.mkv
4.0K -rw-r--r-- 1 zachary zachary 3.3K Jul  2 16:04 the.lost.city.of.z.2016.1080p.bluray.x264-geckos.nfo
3.0M -rw-r--r-- 1 zachary zachary 3.0M Jun 30 22:59 the.lost.city.of.z.2016.1080p.bluray.x264-geckos.rar
Running Filebot...

Code: Select all

Read archive [the.lost.city.of.z.2016.1080p.bluray.x264-geckos.rar] and extract to [/home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/the.lost.city.of.z.2016.1080p.bluray.x264-geckos/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS]
Extracting files [/home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/the.lost.city.of.z.2016.1080p.bluray.x264-geckos/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.sub]
Ignore orphaned subtitles: /home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/the.lost.city.of.z.2016.1080p.bluray.x264-geckos/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.sub
Input: /home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.idx
Input: /home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.mkv
Group: [mov:the lost city of z 2017] => [The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.idx, The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /home/zachary/downloads/complete/movies/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS/The.Lost.City.of.Z.2016.1080p.BluRay.x264-GECKOS.mkv
Rename movies using [TheMovieDB]
In this case the movie happens to have been bundled with idx/sub files. You'll notice Filebot decompressed the rar file into an additional 2 directories. It then considers the decompressed file to be orphaned and ignores it. Notice Filebot was also unable to match this movie to an srt file with opensubtitles.

As the OP said, this used to work fine but broke between the aformentioned releases. I noticed this at the time too and it's been driving me nuts ever since :lol:

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 04 Jul 2017, 01:53
by rednoah
idx/sub was not supported originally, it was only added for a bit because somebody asked for it, which broke other things in unexpected ways, and so it was removed again.


Just run this command before calling the amc script:

Code: Select all

find /path/to/input -name '*.rar' -execdir 7z e -y '{}' ';'

1. Find all RAR files
2. Extract them into their current folder
3. Call amc script

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 07 Jul 2017, 15:58
by dauntless101
rednoah wrote: 04 Jul 2017, 01:53 idx/sub was not supported originally, it was only added for a bit because somebody asked for it, which broke other things in unexpected ways, and so it was removed again.


Just run this command before calling the amc script:

Code: Select all

find /path/to/input -name '*.rar' -execdir 7z e -y '{}' ';'

1. Find all RAR files
2. Extract them into their current folder
3. Call amc script
Works for me... thanks for this!

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 20 Jan 2019, 14:01
by hRVkRs33Y0Kb
Hi!

I was searching for "orphaned subtitles" looking for a way to have filebot use included subtitles located in a subs folder. I found this topic with the same question - and a nice solution but can't get the Mac/Linux command
find /path/to/input -name '*.rar' -execdir 7z e -y '{}' ';'
to work under windows 10 (I'm using WindowsApps\filebot.exe).

Is there a nice cmd or filebot command doing the same thing for me under win10? What i'm looking/hoping for is to get any rarredtvshowdir\subs\ extracted in such a way it's picked up by WindowsApps\filebot.exe" -script fn:amc for each show in a main source location.

rednoah; I looked around for a donate link thinking I would donate a beer or something for you reading time but couldn't find any :|

Thanks!

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 20 Jan 2019, 14:19
by rednoah
You could probably re-create the command above with only FileBot calls.


Maybe like this:

Code: Select all

filebot -mediainfo /path/to/input --file-filter f.archive -exec filebot -extract {folder} --output {folder}

:!: Untested. But should work more or less like this. Use filebot -mediainfo with -exec to call a program for each archive and then call filebot -extract for each of those archive folders.

:!: Might need cmd /c filebot instead of filebot in both instances due to Windows being Windows.

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 21 Jan 2019, 10:34
by hRVkRs33Y0Kb
Thanks rednoah! :)

Unfortunatley I can't get it to work. All I'm getting is the command input. Adding --log-file s:/log.txt (first in the command) generates an empty log file. I tried filebot and a combination of cmd /c filebot as well as the full filebot path. Here's the full cmd info/output (command starting with filebot -version):

Code: Select all

FileBot 4.8.4 (r5829) / Java(TM) SE Runtime Environment 10.0.2 / Windows 10 10.0 (amd64)

Code: Select all

C:\Users\usr\Desktop>cmd /c filebot --log-file s:/log.txt -mediainfo \\NAS\FileBot-Input\Movies --file-filter f.archive -exec cmd /c filebot -extract {folder} --output {folder}
Locking s:\log.txt
The workings of --file-filter and -extract logic to the base dir (cd ..) is probably far beyond me but I wouldn't mind tinkering more if you have any other suggestions!


Source dir looks like this:

Code: Select all

\\NAS\FileBot-Input\Movies\My.Movie.2018.1080p.BluRay.x264-SPARKS\(movie rar files)
\\NAS\FileBot-Input\Movies\My.Movie.2018.1080p.BluRay.x264-SPARKS\Subs\My.Movie.2018.1080p.bluray.x264-sparks.subs.rar (containing .idx and a Rar(My.Movie.2018.1080p.bluray.x264-sparks.rar) in turn containing .sub file)

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 21 Jan 2019, 11:00
by rednoah
Maybe -r is missing.

Let's play:

Code: Select all

cmd /c filebot -mediainfo \\NAS\FileBot-Input\Movies

Code: Select all

cmd /c filebot -mediainfo -r \\NAS\FileBot-Input\Movies

Code: Select all

cmd /c filebot -mediainfo -r \\NAS\FileBot-Input\Movies --format {f}

Code: Select all

cmd /c filebot -mediainfo -r \\NAS\FileBot-Input\Movies --format {f} --file-filter f.archive

Code: Select all

cmd /c filebot -mediainfo -r \\NAS\FileBot-Input\Movies --format {f} --file-filter f.archive -exec cmd /c echo {f}

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 21 Jan 2019, 13:47
by hRVkRs33Y0Kb
You're the best! :D

Last one output the files subs.rar and movie.rar in CMD:)

Combining the commands....

Code: Select all

cmd /c filebot -mediainfo -r \\NAS\FileBot-Input\Movies --format {f} --file-filter f.archive -exec cmd /c  filebot -extract {folder} --output {folder}
results in:
  • Main movie extracted in its parent folder OK!
  • \Subs\My.Movie.2018.1080p.bluray.x264-sparks.subs.rar extracted into subs folder:
    My.Movie.2018.1080p.BluRay.x264-SPARKS.idx
    and My.Movie.2018.1080p.bluray.x264-sparks.rar extracted from subs.rar
Now how in the world would you go about extracting the just extracted .rar in the same pass, avoiding full re-extraction? Well, running it again simply works! :lol: It doesn't even attempt to overwrite the old files:

Code: Select all

Skipped extracting files [\\NAS\FileBot-Input\Movies\My.Movie.2018.1080p.BluRay.x264-SPARKS\My.Movie.2018.1080p.BluRay.x264-SPARKS.mkv]
:mrgreen:

Hopefully the AMC script will now pick up the .idx and .sub and add them to the target location.

edit:
It seems my AMC script re-extracts the main movie into a folder instead of using the already extracted movie

Code: Select all

Read archive [My.Movie.2018.1080p.bluray.x264-sparks.rar] and extract to [\\NAS\FileBot-Input\Movies\My.Movie.2018.1080p.BluRay.x264-SPARKS\My.Movie.2018.1080p.bluray.x264-sparks\My.Movie.2018.1080p.BluRay.x264-SPARKS]
and use both files as CD1 and CD2.

It did copy the .idx and .sub though so that's a total success! :P Thank you rednoah!
Now to try to figure out how to avoid re-extraction of the movie into sub folders and avoid CD1/CD2.

Any idea how to avoid having AMC re-extract the main movie 2 subfolders deep inside the main movie parent folder?

Thanks yet again rednoah! /bow Of course, --def skipExtract=y is the obvious solution! It works really nice!
Now what about those beers I owe you! :lol: :D Toss me a link please :idea:

Re: Suddenly FileBot removes Subtitles ("Ignore orphaned subtitles:")

Posted: 21 Jan 2019, 15:09
by rednoah
rednoah wrote: 01 Aug 2012, 13:04 --def skipExtract=y Do not extract archives
Just have the amc script not extract archives. This will do.