Combining scripts

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
badrabbit
Posts: 7
Joined: 10 Jul 2013, 18:27

Combining scripts

Post 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
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Combining scripts

Post 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.
:idea: Please read the FAQ and How to Request Help.
badrabbit
Posts: 7
Joined: 10 Jul 2013, 18:27

Re: Combining scripts

Post 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?
badrabbit
Posts: 7
Joined: 10 Jul 2013, 18:27

Re: Combining scripts

Post 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
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Combining scripts

Post by rednoah »

Some improvements for subtitle auto-selection with r1675
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Combining scripts

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply