newby tv episode renaming question

All about user-defined episode / movie / file name format expressions
Post Reply
fnerraw
Posts: 6
Joined: 28 Feb 2016, 15:17

newby tv episode renaming question

Post by fnerraw »

I save tv episodes with the firdt letters being 01, 02, etc so they don't end up alphabetized. Is ther a way to rename the subtitles to match my tv naming scheme?

example
01 Hawaii Five-0 S06e10
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: newby tv episode renaming question

Post by rednoah »

FileBot will name new subtitles after the corresponding video file, so what you are asking for is default behaviour:
https://www.youtube.com/watch?v=q-oZ_hovsTY11
:idea: Please read the FAQ and How to Request Help.
fnerraw
Posts: 6
Joined: 28 Feb 2016, 15:17

Re: newby tv episode renaming question

Post by fnerraw »

If I use the numbering system I described and download subtitles from ther internet, then rename the subs to match the episodes, it seems to rename the videos to match the subs but I want to rename the subs to match the videos.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: newby tv episode renaming question

Post by rednoah »

If you download subtitles with filebot then they will most certainly match the filename, and not the other way around.

If you already have subtitles and videos, and you just want to rename the subtitle files to match the videos, then you can do the following:

1. Drop subtitles into "Original Files".
2. Drop videos into "New Names".
3. Click Rename.
:idea: Please read the FAQ and How to Request Help.
fnerraw
Posts: 6
Joined: 28 Feb 2016, 15:17

Re: newby tv episode renaming question

Post by fnerraw »

Thanks, I'll give it a try. Seems kind of counter intuitive. I would have thought the files in the original slot would stay the same and the new names would be replaced.
autotek
Posts: 4
Joined: 01 May 2020, 14:34

Re: newby tv episode renaming question

Post by autotek »

rednoah wrote: 28 Feb 2016, 17:57 If you download subtitles with filebot then they will most certainly match the filename, and not the other way around.

If you already have subtitles and videos, and you just want to rename the subtitle files to match the videos, then you can do the following:

1. Drop subtitles into "Original Files".
2. Drop videos into "New Names".
3. Click Rename.
I already have subtitles , how do I do the above in my deluge-postprocess script , this is my current test script

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action test --conflict skip -non-strict --log-file amc.log --apply artwork nfo subtitles --def movieFormat="Movies/{n} /{fn}" seriesFormat="TVShows/{n} /Season {s.pad(2)}/{fn}" unsorted=y music=y clean=y subtitles=en excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi"

Also have a situation with cleaner removing the folder , that deluge uses to move completed files to , if it happens to be empty at the time. Is there a way to use the "def root=n , used with cleaner script , in my above script.

Thank you for your time
autotek
Posts: 4
Joined: 01 May 2020, 14:34

Re: newby tv episode renaming question

Post by autotek »

sorry first time on forum , here is my proper code display and output of command

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action test --conflict skip -non-strict --log-file amc.log --apply artwork nfo subtitles --def movieFormat="Movies/{n} /{fn}" seriesFormat="TVShows/{n} /Season {s.pad(2)}/{fn}" unsorted=y music=y clean=y subtitles=en excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi"

Code: Select all

autotek@Medusa:~$ ./deluge-postprocesstest.sh
+ ARG_PATH=/drv1/Start
+ CONFIG_OUTPUT=/drv1/Done
+ filebot -script fn:amc --output /drv1/Done --action test --conflict skip -non-strict --log-file amc.log --apply artwork nfo subtitles --def movieFormat=Movies/{n} /{fn} seriesFormat=TVShows/{n} /Season {s.pad(2)}/{fn} unsorted=y music=y clean=y subtitles=en excludeList=.excludes ut_dir=/drv1/Start ut_kind=multi
Run script [fn:amc] at [Fri May 01 06:46:17 PDT 2020]
Parameter: movieFormat = Movies/{n} /{fn}
Parameter: seriesFormat = TVShows/{n} /Season {s.pad(2)}/{fn}
Parameter: unsorted = y
Parameter: music = y
Parameter: clean = y
Parameter: subtitles = en
Parameter: excludeList = .excludes
Parameter: ut_dir = /drv1/Start
Parameter: ut_kind = multi
Use excludes: /drv1/Done/.excludes (25)
Input: /drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/Subs/2_English.srt
Input: /drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4
Group: {Movie=The Hateful Eight (2015), Series=null} => [2_English.srt]
Group: {Movie=The Hateful Eight (2015)} => [The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4]
Rename movies using [TheMovieDB]
Auto-detect movie from context [/drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/Subs/2_English.srt]
[TEST] from [/drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/Subs/2_English.srt] to [/drv1/Done/Movies/The Hateful Eight/2_English.srt]
Processed 1 files
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4
Rename movies using [TheMovieDB]
Auto-detect movie from context [/drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4]
[TEST] from [/drv1/Start/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4] to [/drv1/Done/Movies/The Hateful Eight/The.Hateful.Eight.2015.1080p.BluRay.x265-RARBG.mp4]
Processed 1 files
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: newby tv episode renaming question

Post by rednoah »

Use --def seriesFormat="{plex}" if you want to ensure that video files and subtitle files end up with the same name.
:idea: Please read the FAQ and How to Request Help.
autotek
Posts: 4
Joined: 01 May 2020, 14:34

Re: newby tv episode renaming question

Post by autotek »

Thank you for your quick response
I had tried that argument but didn't like the format , IE: I don't want date in name of folder and I want file name untouched ... I know picky picky , thats what my wife says , LOL ... I will do some more research and find a format that I can make work for me , are there any switches for the {plex} argument ?
Do you have any idea about my other issue , the clean argument removing the root folder that deluge is moving completed torrents to.
Also have a situation with cleaner removing the folder , that deluge uses to move completed files to , if it happens to be empty at the time. Is there a way to use the "def root=n , used with cleaner script , in the above script.
or similar argument that would tell cleaner to not remove a root or named folder

Thanks again for your help
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: newby tv episode renaming question

Post by rednoah »

Your log doesn't show any logs related to cleaner logic, so I can't comment on that.


Generally speaking, --def ut_dir is expected to be the newly completed file or folder, and not your entire download folder:
https://github.com/filebot/plugins/blob ... cess.sh#L4


You can also make your own cleaner call, instead of relying on amc script defaults for that, if you need more fine-grained control:
viewtopic.php?p=1341#p1341
:idea: Please read the FAQ and How to Request Help.
autotek
Posts: 4
Joined: 01 May 2020, 14:34

Re: newby tv episode renaming question

Post by autotek »

Thanks for the response

Now that I read your message
Generally speaking, --def ut_dir is expected to be the newly completed file or folder, and not your entire download folder:
that makes since that it is looking at each video folder and not the root folder. I havent tried calling script from deluge yet as I wanted to make sure it was working to my liking first.
Im going to make a cleaner script in a day or so (got to get to some honeydos) and will let you know how it goes.
By the way is it possible to call several scripts thru deluge-postprocess bash and if so do I just put them in another line or same line.

Thanks again
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: newby tv episode renaming question

Post by rednoah »

You can always add --action TEST to the filebot call to see what kind of arguments Deluge is passing in and what filebot would do in response:
https://github.com/filebot/plugins/blob ... ess.sh#L11
:idea: Please read the FAQ and How to Request Help.
Post Reply