Page 1 of 1

Combining scripts

Posted: 10 Jul 2013, 18:38
by badrabbit
Hi all,

i have little to no experience to scripting with Terminal on Mac OS X, so...


My current workflow:
--> download videos via jDownloader to an external HDD --> have jDownloader do the extracting and put the files into a "Completed"-folder --> let Filebot rename and move the video to the Movies-HDD

For this i use this script:

Code: Select all

filebot -script fn:watcher  -rename -non-strict  /Volumes/PLEX-TEMP/_JD/Completed/ --output /Volumes/PLEX-MOVIES-01/MOVIES-01 --format "{n} ({y})/{n} ({y})" --db TheMovieDB
So far this works perfectly. But now i'd like to add subtitles to the renamed movies.
For that i would need this script:

Code: Select all

filebot -get-missing-subtitles -non-strict -r --lang ro  /Volumes/PLEX-MOVIES-01/MOVIES-01

Is there a way to combine this two scripts, so i only need to run one script in the background?

Thanks!

hubert

Re: Combining scripts

Posted: 11 Jul 2013, 03:06
by rednoah
The watcher script supports downloading of subtitles, just set the -get-subtitles flag.

e.g.

Code: Select all

filebot -script fn:watcher -rename -get-subtitles ...
But to set rename language different from subtitle language you'd have to modify the script.

Re: Combining scripts

Posted: 30 Jul 2013, 11:52
by badrabbit
I'm using the following script and it works except for the subtitles part:

Code: Select all

filebot -script fn:watcher -get-subtitles --lang ro -rename -non-strict /Volumes/PLEX-TEMP/_JD/Completed/ --output /Volumes/PLEX-MOVIES-01/MOVIES-01 --format "{n} ({y})/{n} ({y})" --db TheMovieDB --db OpenSubtitles
I'm looking for romanian subtitles but it never finds anything, although they exist on OpenSubtitles.org:

Code: Select all

Get [Romanian] subtitles for 1 files
Looking up subtitles by filehash via OpenSubtitles
Searching for [Hatchet] at [OpenSubtitles]
No matching subtitles found: /Volumes/PLEX-TEMP/_JD/Completed/Hatchet.III.2013.1080p.BluRay.x264-ROVERS/Hatchet.III.2013.1080p.BluRay.x264-ROVERS.mkv
Rename movies using [OpenSubtitles]
Auto-detect movie from context: [/Volumes/PLEX-TEMP/_JD/Completed/Hatchet.III.2013.1080p.BluRay.x264-ROVERS/Hatchet.III.2013.1080p.BluRay.x264-ROVERS.mkv]
Jul 30, 2013 1:43:54 PM net.sourceforge.filebot.media.MediaDetection storeMetaInfo
WARNING: Failed to set xattr: null
[MOVE] Rename [/Volumes/PLEX-TEMP/_JD/Completed/Hatchet.III.2013.1080p.BluRay.x264-ROVERS/Hatchet.III.2013.1080p.BluRay.x264-ROVERS.mkv] to [/Volumes/PLEX-MOVIES-01/MOVIES-01/Hatchet III (2013)/Hatchet III (2013).mkv]
Has it something to do with the order of executing the script? By now it seems that the script is first looking for a subtitle and secondly renaming it correctly. Can it be reversed and would that help?

Re: Combining scripts

Posted: 30 Jul 2013, 12:03
by badrabbit
I tried to reverse it but it doesn't change it. Still searches for subtitles first and gets no result:

Code: Select all

filebot -script fn:watcher -rename -non-strict -get-subtitles --lang ro /Volumes/PLEX-TEMP/_JD/Completed/ --output /Volumes/PLEX-MOVIES-01/MOVIES-01 --format "{n} ({y})/{n} ({y})" --db OpenSubtitles --db TheMovieDB

Re: Combining scripts

Posted: 30 Jul 2013, 18:15
by rednoah
Some improvements for subtitle auto-selection with r1675

Re: Combining scripts

Posted: 05 Mar 2016, 00:03
by rednoah