Subtitles accompany main file in different folder

Support for Windows users
Post Reply
Phileas50
Posts: 4
Joined: 04 Nov 2019, 09:32

Subtitles accompany main file in different folder

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

Re: Subtitles accompany main file in different folder

Post 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.
:idea: Please read the FAQ and How to Request Help.
Phileas50
Posts: 4
Joined: 04 Nov 2019, 09:32

Re: Subtitles accompany main file in different folder

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

Re: Subtitles accompany main file in different folder

Post 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.
:idea: Please read the FAQ and How to Request Help.
Phileas50
Posts: 4
Joined: 04 Nov 2019, 09:32

Re: Subtitles accompany main file in different folder

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

Re: Subtitles accompany main file in different folder

Post 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}
:idea: Please read the FAQ and How to Request Help.
Post Reply