Subtitles are not copied to the new location

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
c0nfuser
Posts: 2
Joined: 27 Mar 2014, 09:11

Subtitles are not copied to the new location

Post by c0nfuser »

Hello,

I am running a script as a post transmission action which copies the downloaded video in the location which I am defining.
i.e :
filebot.sh -script fn:amc --log-file amc.log --action copy --conflict override -non-strict --def subtitles=en,de,fr --def artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" --def "seriesFormat=/Location/Series/{n}/{n} - {sxe} - {t}"

Problem:
The script runs fine and does almost everything except the subtitle functionality. The problem is that while I am downloading 3 subtitle files(en,de,fr) in the output Folder I have only one.

Reason:
in the log File I can see that the subtitles have been downloaded but while the script is copying them in the new Folder is renaming into the a general name and in the end keeps only one of them

i.e (from log)
[COPY] Rename [/oldLocation/serieSub.eng.srt] to [/newLocation/serieSub.srt]
[COPY] Rename [/oldLocation/serieSub.de.srt] to [/newLocation/serieSub.srt]
[COPY] Rename [/oldLocation/serieSub.fr.srt] to [/newLocation/serieSub.srt]


How I can avoid that?

Cheers,


PS: Thank you for your amazing job Filebot is awesome :)
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles are not copied to the new location

Post by rednoah »

Your custom seriesFormat explicitly ignores language tags. You need to build in {lang} at the end somewhere. ;)

Check the examples:
http://www.filebot.net/forums/viewtopic.php?f=5&t=2
:idea: Please read the FAQ and How to Request Help.
c0nfuser
Posts: 2
Joined: 27 Mar 2014, 09:11

Re: Subtitles are not copied to the new location

Post by c0nfuser »

Hello and thank you for you reply

Still nothing! I added the lang option but nothing.. Here is the hardcoded command inside the .sh script (seriesFormat copied from Ithiel thread and I slightly changed by adding the {lang} in the end.)

Here is my command:

Code: Select all

bash /home/filebot/filebot.sh -script fn:amc --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en,ell,tr artwork=y ut_dir=/i-data/md0/admin/download/Transmission/complete/Family.Guy.S12E02.HDTV.x264-LOL.mp4 ut_kind=multi ut_title=Family.Guy.S12E02.HDTV.x264-LOL.mp4 "seriesFormat=/i-data/1eb42343/TV_Series/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[\`´‘’ʻ\"\"“”]/, \"'\").replaceAll(/[:|]/, \" - \").replaceAll(/[?]/, \"!\").replaceAll(/[*\\s]+/, \" \").replaceAll(/\\b[IiVvXx]+\\b/, { it.upper() }).replaceAll(/\\b[0-9](?i:th|nd|rd)\\b/, { it.lower() }).replaceFirst(/\^(?i)(The)\\s(.+)/, /\$2, \$1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':\"\"} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/\^\\d+\$/, 'PG-\$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':\"\"}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \") + ')'}{\" Part \$pi\"}{\"$lang\"}{\" [\$vf \$vc \$ac \$af]\"}"
Cheers
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles are not copied to the new location

Post by rednoah »

Well, have you tried running it without your customizations? I'd first confirm that it works with my default format. Then you can compare yours and mine and pinpoint where things go wrong.
:idea: Please read the FAQ and How to Request Help.
Post Reply