AMC: Subtitle isn't getting the same name as the movie

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

AMC: Subtitle isn't getting the same name as the movie

Post by AbedlaPaille »

The movie gets renamed like i want it to:
F:\Plex\Edge of Tomorrow (2014)\Edge of Tomorrow (2014) [BluRay 1080p 5.1 HEVC 10bit 2.2 Mbps].mp4
The .srt gets renamed in a more simple fashion:
F:\Plex\Edge of Tomorrow (2014)\Edge of Tomorrow (2014).en.srt
I'd want the .srt renamed like that:
F:\Plex\Edge of Tomorrow (2014)\Edge of Tomorrow (2014) [BluRay 1080p 5.1 HEVC 10bit 2.2 Mbps].en.mp4
relevant log

Code: Select all

Auto-detect movie from context [C:\Users\Zeus\Downloads\Torrents\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG.mp4]
[DUPLICATE] from [C:\Users\Zeus\Downloads\Torrents\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG.mp4] to [F:\Plex\Edge of Tomorrow (2014)\Edge of Tomorrow (2014) [BluRay 1080p 5.1 HEVC 10bit 2.2 Mbps].mp4]
Processed 1 files
Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\Users\Zeus\Downloads\Torrents\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG\Subs\2_English.srt]
[DUPLICATE] from [C:\Users\Zeus\Downloads\Torrents\Edge.of.Tomorrow.2014.1080p.BluRay.x265-RARBG\Subs\2_English.srt] to [F:\Plex\Edge of Tomorrow (2014)\Edge of Tomorrow (2014).en.srt]
Processed 1 files
How do i make it happen?
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: AMC: Subtitle isn't getting the same name as the movie

Post by AbedlaPaille »

Now another movie from the same release group (subtitles in a subfolder too) but it works.

log :

Code: Select all

Rename movies using [TheMovieDB]
Auto-detect movie from context [C:\Users\Zeus\Downloads\Torrents\Whiplash.2014.1080p.BluRay.x265-RARBG\Whiplash.2014.1080p.BluRay.x265-RARBG.mp4]
Auto-detect movie from context [C:\Users\Zeus\Downloads\Torrents\Whiplash.2014.1080p.BluRay.x265-RARBG\Subs\12_English.srt]
[DUPLICATE] from [C:\Users\Zeus\Downloads\Torrents\Whiplash.2014.1080p.BluRay.x265-RARBG\Whiplash.2014.1080p.BluRay.x265-RARBG.mp4] to [F:\Plex\Whiplash (2014)\Whiplash (2014) [BluRay 1080p 5.1 HEVC 10bit 2.2 Mbps].mp4]
[DUPLICATE] from [C:\Users\Zeus\Downloads\Torrents\Whiplash.2014.1080p.BluRay.x265-RARBG\Subs\12_English.srt] to [F:\Plex\Whiplash (2014)\Whiplash (2014) [BluRay 1080p 5.1 HEVC 10bit 2.2 Mbps].en.srt]
Processed 2 files
Seems like the variable is "processed 2 files" vs "Processed 1 files", "processed 1 files" but i don't understand why the script act one way or the other.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: AMC: Subtitle isn't getting the same name as the movie

Post by AbedlaPaille »

So this seems to be responsible for grouping .srt with movie

Code: Select all

Group: {Movie=Whiplash (2014)} => [12_English.srt, Whiplash.2014.1080p.BluRay.x265-RARBG.mp4]
And in most cases for me it fails to group and shows something like :

Code: Select all

Group: {Movie=The Name of the Rose (1986), Series=null} => [6_English.srt]
Group: {Movie=The Name of the Rose (1986)} => [The.Name.Of.The.Rose.1986.1080p.BluRay.x265-RARBG.mp4]
or in the other order

Code: Select all

Group: {Movie=Moonrise Kingdom (2012)} => [Moonrise.Kingdom.2012.1080p.BluRay.x265-RARBG.mp4]
Group: {Movie=Moonrise Kingdom (2012), Series=null} => [2_English.srt]
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Subtitle isn't getting the same name as the movie

Post by rednoah »

That's just part of the process. It works for {plex} and other simple formats. If you use MediaInfo in your format, and expect it to be implicitly based on nearby video files, then those video files need to be in nearby easy-to-find location.


If you need improved support for orphaned subtitles, then you will need to pre-process the files first, and move subtitles into their correct paths first. Typically that's not necessary, but in some special circumstances pre-processing files might help.


e.g. this will work best:

Code: Select all

/path/to/Avatar.mp4
/path/to/Avatar.eng.mp4
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: AMC: Subtitle isn't getting the same name as the movie

Post by AbedlaPaille »

The format is simple enough and Plex compatible, i just add infos after the year.

The subtitles files are in nearby easy-to-find locations, RARBG uses a movie folder and a subs subfolder, like a lot of groups.

The amc script has no problem with attaching the subtitle to the movie on some of them, i was wondering what might cause some to fail despite the same structure and environment (qbit complete download post process)

How do i pre-process them?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Subtitle isn't getting the same name as the movie

Post by rednoah »

You'd have to make multiple calls. You can always have one command that calls other commands.

Code: Select all

cmd /c /path/to/my/script.cmd <args>


:?: Are you using the latest revision? I think there's some more recent changes which extended the search for "nearby" video files to include parent folders, parent parent folder, and parent parent parent folder.



EDIT:

You can also use --def ut_label=Movie to to force Movie Mode for all files and thus make grouping easier. Otherwise the amc script has to assume that each file may or may not be unrelated and treated as such.
:idea: Please read the FAQ and How to Request Help.
Post Reply