Page 1 of 1

Subtitles accompany main file in different folder

Posted: 09 Mar 2021, 16:52
by Phileas50
The subtitles are in a separate folder named “subs” named eng.srt How to rename them accordingly and extract them on the same folder as the main (avi,mkv...) file

Re: Subtitles accompany main file in different folder

Posted: 09 Mar 2021, 17:33
by rednoah
Assuming that video and subtitle file are matched to the same movie, your custom format will ensure that each of those files then ends up in the same destination folder.

e.g.

Code: Select all

X:/Media/{plex}

:idea: Please read FAQ #1 and learn how format expressions work.

Re: Subtitles accompany main file in different folder

Posted: 10 Mar 2021, 22:37
by Phileas50
This works for me:
ilebot -script fn:amc "C:/down" --output "E:/" --log-file amc.log --action move --conflict skip -non-strict --def music=y --def unsorted=y --def subtitles=en artwork=n --def "seriesFormat=TV Shows/{n}/{n} - {s+'x'}{e.pad(2)} - {t}"
but as I said before it brings subtitles named 2_english, 3_english etc without renaming them as it does for the video files. How to do that?

Re: Subtitles accompany main file in different folder

Posted: 11 Mar 2021, 04:40
by rednoah
If you're using the amc script, then you may not be able to import orphaned subtitles, i.e. that are not in the same folder as the video file and don't have the same name as the video file.


:idea: You may be able to use --apply import to copy along those extra files and folders though:
viewtopic.php?t=11079


:idea: The amc script console output will start with a detailed list files that are considered for processing, including reasons why some files may be excluded from processing. Please read the console output.

Re: Subtitles accompany main file in different folder

Posted: 31 Mar 2021, 22:22
by Phileas50
By using this AMC script I manage to get subtitles renamed and copied:

Code: Select all

filebot -script fn:amc "//10.0.0.24/TV/" --output "E:/TV Shows/" --log-file amc.log --action move --conflict skip -non-strict --def ignore="RARGB.txt|3_English.srt" --def minFileSize=1  --def subtitles=en --def "seriesFormat={n}/{n} - {s+'x'}{e.pad(2)} - {t}" 
this copies and renames one subtitle file named 2_english.srt.

My question is how to isolate things when there are multiple language subtiltles. The script picks up the first one (not necessarily in English).

Thank you and keep up the good work

Re: Subtitles accompany main file in different folder

Posted: 01 Apr 2021, 02:52
by rednoah
Phileas50 wrote: 31 Mar 2021, 22:22 My question is how to isolate things when there are multiple language subtiltles. The script picks up the first one (not necessarily in English).
Using the {plex} format for the file name should take care this corner case:

Code: Select all

{n}/{kodi.name}