A seperate folder is created for .srt

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Amishman
Donor
Posts: 56
Joined: 29 Dec 2013, 15:54

A seperate folder is created for .srt

Post by Amishman »

When I get some media, everything is processed as it should but sometimes a separate folder is created just for a srt file. Here is the log file from one where it created the folder.

Code: Select all

Run script [fn:amc] at [Wed Feb 28 05:16:06 EST 2024]

[PSA] Important Discussion of Changes effective as of 28 Apr 2023:
https://www.filebot.net/forums/viewtopic.php?t=13406

Parameter: movieDB = TheMovieDB
Parameter: seriesDB = TheTVDB
Parameter: seriesFormat = {['//MULE2/Disk_01', '//MULE2/Disk_02', '//MULE2/Disk_03', '//MULE2/Disk_04', '//MULE2/Disk_05', '//MULE2/Disk_06', '//MULE2/Disk_07', '//MULE2/Disk_08', '//MULE2/Disk_09', '//MULE2/Disk_10', '//MULE2/Disk_11', '//MULE2/Disk_12', '//MULE2/Disk_13', '//MULE2/Disk_14', '//MULE2/Disk_17', '//MULE2/Disk_19', '//MULE2/Disk_20', '//MULE2/Disk_24'].collect{ drive -> def a=n; return new File(drive+"/TV/", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()} {"{tvdb-$id}"}/{episode.special ? 'Specials' : 'Season '+s}/{"$n - $s00e00 - $t"}
Parameter: movieFormat = {['//MULE2/Disk_01', '//MULE2/Disk_02', '//MULE2/Disk_03', '//MULE2/Disk_04', '//MULE2/Disk_05', '//MULE2/Disk_06', '//MULE2/Disk_07', '//MULE2/Disk_08', '//MULE2/Disk_09', '//MULE2/Disk_10', '//MULE2/Disk_11', '//MULE2/Disk_12', '//MULE2/Disk_13', '//MULE2/Disk_14', '//MULE2/Disk_17', '//MULE2/Disk_19', '//MULE2/Disk_20', '//MULE2/Disk_24'].collect{ it / any{'Movies' / collection}{'Movies'} }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) { "{tmdb-${tmdbid}}" } {"[$vf]"} { vc == 'x264' ? null : {"[$vc]"}}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y})
Parameter: plex = *****
Parameter: pushbullet = *****
Parameter: deleteAfterExtract = y
Parameter: clean = y
Parameter: ut_label = none
Parameter: ut_title = Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1 [YTS.MX]
Parameter: ut_kind = multi
Parameter: ut_dir = D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]
Invalid usage: output folder must exist and must be a writable directory: Y:
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].mp4
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].srt
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\English.srt
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\fre.srt
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\Latin American.spa.srt
Input: D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\SDH.eng.HI.srt
Group files by movie or series
Group: {Movie=Poor Things (2023)} => [Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].mp4, Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].srt]
Group: {Movie=Poor Things (2023), Series=null} => [English.srt, fre.srt, Latin American.spa.srt, SDH.eng.HI.srt]
Rename movies using [TheMovieDB]
Auto-detect movie from context [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].mp4]
[MOVE] from [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].mp4] to [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).mp4]
[MOVE] from [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].srt] to [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).srt]
Failed to write xattr key: net.filebot.metadata: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).mp4:net.filebot.metadata: The filename, directory name, or volume label syntax is incorrect
Failed to write xattr key: net.filebot.filename: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).mp4:net.filebot.filename: The filename, directory name, or volume label syntax is incorrect
Failed to write xattr key: net.filebot.metadata: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).srt:net.filebot.metadata: The filename, directory name, or volume label syntax is incorrect
Failed to write xattr key: net.filebot.filename: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).srt:net.filebot.filename: The filename, directory name, or volume label syntax is incorrect
Processed 2 files
Rename movies using [TheMovieDB]
Auto-detect movie from context [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\English.srt]
Auto-detect movie from context [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\fre.srt]
Auto-detect movie from context [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\Latin American.spa.srt]
Auto-detect movie from context [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\SDH.eng.HI.srt]
[MOVE] from [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\English.srt] to [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]
[AUTO] Skipped [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\fre.srt] because [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt] already exists
[AUTO] Delete [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]
[MOVE] from [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\Latin American.spa.srt] to [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]
[AUTO] Delete [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]
[MOVE] from [D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\SDH.eng.HI.srt] to [\\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]
Failed to write xattr key: net.filebot.metadata: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt:net.filebot.metadata: The filename, directory name, or volume label syntax is incorrect
Failed to write xattr key: net.filebot.filename: \\MULE2\Disk_14\Movies\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt:net.filebot.filename: The filename, directory name, or volume label syntax is incorrect
Processed 3 files
Notify Plex [10.0.0.15]
Sending PushBullet report
Clean clutter files and empty folders
Delete D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs\fre.srt
Delete D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\www.YTS.MX.jpg
Delete D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\YTSProxies.com.txt
Delete D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]\Subs
Delete D:\Torrents\Poor Things (2023) [1080p] [WEBRip] [x265] [10bit] [5.1] [YTS.MX]
Done ヾ(@⌒ー⌒@)ノ
This is my script.

Code: Select all

-script
fn:amc
--output
Y:
--log-file
amc.log
--action
move
--conflict
auto
-non-strict
--def
movieDB=TheMovieDB
seriesDB=TheTVDB
--def
seriesFormat={['//MULE2/Disk_01', '//MULE2/Disk_02', '//MULE2/Disk_03', '//MULE2/Disk_04', '//MULE2/Disk_05', '//MULE2/Disk_06', '//MULE2/Disk_07', '//MULE2/Disk_08', '//MULE2/Disk_09', '//MULE2/Disk_10', '//MULE2/Disk_11', '//MULE2/Disk_12', '//MULE2/Disk_13', '//MULE2/Disk_14', '//MULE2/Disk_17', '//MULE2/Disk_19', '//MULE2/Disk_20'].collect{ drive -> def a=n; return new File(drive+"/TV/", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()} {"{tvdb-$id}"}/{episode.special ? 'Specials' : 'Season '+s}/{"$n - $s00e00 - $t"}
movieFormat={['//MULE2/Disk_01', '//MULE2/Disk_02', '//MULE2/Disk_03', '//MULE2/Disk_04', '//MULE2/Disk_05', '//MULE2/Disk_06', '//MULE2/Disk_07', '//MULE2/Disk_08', '//MULE2/Disk_09', '//MULE2/Disk_10', '//MULE2/Disk_11', '//MULE2/Disk_12', '//MULE2/Disk_13', '//MULE2/Disk_14', '//MULE2/Disk_17', '//MULE2/Disk_19', '//MULE2/Disk_20'].collect{ it / any{'Movies' / collection}{'Movies'} }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y}) { "{tmdb-${tmdbid}}" } {"[$vf]"} {tmdb-${tmdbid}}}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'} ({y})
--def
plex=10.0.0.15:***********
--def
pushbullet=***********
--def
deleteAfterExtract=y
--def
clean=y
As I was writing this, I noticed the .srt files are different.

One folder is named Poor Things (2023) {tmdb-792307} and only contains 1 file Poor Things (2023).srt that is 132 KB.
This is what the srt has inside.

Code: Select all

3
00:01:04,438 --> 00:01:07,107
(EMOTIONAL STRING MUSIC
PLAYING)

4
00:01:21,668 --> 00:01:23,734
(UNSETTLING MUSIC PLAYING)

5
00:01:51,667 --> 00:01:53,206
(UNSETTLING MUSIC STOPS)

6
00:01:57,038 --> 00:01:58,272
(HEART BEATING)

7
00:02:07,808 --> 00:02:09,305
(PIANO KEYS BLARE)

8
00:02:10,940 --> 00:02:12,800
(PIANO KEYS BLARE)

9
00:02:23,007 --> 00:02:25,206
(PLAYING RANDOM KEYS)
The other folder is Poor Things (2023) {tmdb-792307} [1080p] [x265] with 2 files, the media and another Poor Things (2023).srt that is 103 KB.

Code: Select all

3
00:04:37,500 --> 00:04:38,500
Ba.

4
00:04:39,458 --> 00:04:41,167
Ba! Ba!

5
00:04:43,500 --> 00:04:45,583
Ba, ba, ba.

6
00:04:46,542 --> 00:04:48,500
- Bye.
- Ba, ba.

7
00:04:51,667 --> 00:04:55,458
A pile of organs without the spark of self
from a brain...

8
00:04:55,625 --> 00:04:57,708
or the pump of blood from a heart.
User avatar
rednoah
The Source
Posts: 23001
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: A seperate folder is created for .srt

Post by rednoah »

:!: You cannot use {vf} or {vc} on the folder level if you plan on processing files that do not have a video format or a video codec into the same target folder.


e.g. when processing subtitle files that are paired with a video file of the same name, then media info bindings will be based on that video file, and so you get the path you want in this special case even though the subtitles don't actually have a video resolution or video codec:

Code: Select all

[MOVE] from [...\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].mp4] to [...\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).mp4]
[MOVE] from [...\Poor.Things.2023.1080p.WEBRip.x265.10bit.AAC5.1-[YTS.MX].srt] to [...\Poor Things (2023) {tmdb-792307} [1080p] [x265]\Poor Things (2023).srt]

e.g. when processing standalone subtitle files, then all media info bindings will fail, as there is no corresponding video file, and in this case the video file was already moved away and was no longer in the parent folder when processing the extra subtitle files in the Subs folder:

Code: Select all

[MOVE] from [...\Subs\English.srt] to [...\Poor Things (2023) {tmdb-792307}\Poor Things (2023).srt]


:!: Note that your format does not even account for movies with multiple subtitles, so in this specific example you could just add --def ignore=Subs to ignore all the subtitle files in the Subs folder:

Shell: Select all

--def ignore=Subs


EDIT:

:idea: Forcing Movie Mode via --def ut_label=Movie if you already know in advance that you're processing a movie might also make things work better, because it'll slightly change grouping of input files, and that might result in formatting happening for all video / subtitle files at once:

Shell: Select all

--def ut_label=Movie
:idea: --action copy might also make things work, by ensuring that the video files is there at format time even for standalone subtitles, but you'll have to manage file deletion yourself:

Shell: Select all

--action copy



EDIT 2:

FileBot r10201 improves support for this specific corner case.
:idea: Please read the FAQ and How to Request Help.
Post Reply