AMC multiple subtitle handling

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
cheesemaker
Posts: 49
Joined: 03 Sep 2012, 10:52

AMC multiple subtitle handling

Post by cheesemaker »

Hi,

Filebot with amc has problem handling multiple subtitles of the same language. That caused me some data loss (subtitles), even if option "conflict" is set to "skip", clean option is activated.

The files:
asdf-something-1080p.mkv
asdf-something-1080p-forced.idx
asdf-something-1080p-forced.srt
asdf-something-1080p-forced.sub
asdf-something-1080p-ger1.sub
asdf-something-1080p-ger1.idx
asdf-something-1080p-ger2.sub
asdf-something-1080p-ger2.idx


after filebot renamed it:
Something.[...].mkv
Something.[...].forced.deu.idx
Something.[...].forced.srt
Something.[...].forced.deu.sub
Something.[...].deu.idx
Something.[...].deu.sub
missing: Something.[...].deu2.idx , Something.[...].deu2.sub or maybe Something.[...].ger.idx

I know, this is a special case, that won't happen too often, but it would be nice if filebot at least would not delete the subtitles it couldn't handle.

best regards,
cheesemaker

//Edit:
This is my movieFormat parameter: movieFormat="Filme/{n.upperInitial().space('.')}.({y})/{n.upperInitial().space('.')}.({y}){'.' + file.path.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition|ultimate.edition|warner.fixed/)*.upperInitial()*.lowerTrail().sort().unique().join('.')}{'.3D.' + file.path.matchAll(/h-ou|h-sbs/)*.upper().sort().unique().join('.')}{\".\$ac\"}{\".\$vf\"}{\".\$source\"}{\".\$vc\"}{'.' + file.path.matchAll(/internal|repack|proper|rerip/)*.upper().sort().unique().join('.')}{\"-\$group\"}{'.'+fn.match(/forced/)}{\".\$lang\"}"
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC multiple subtitle handling

Post by rednoah »

This is sort of up to your format... if two files evaluate to the same path according to your format that's what happens, so you need to update your format to take this case into account if you want to deal with it correctly (correct is whatever you say is correct) ;)

Also, this can only happen if you use --action move which is officially not supported and discouraged. My I assumed you also specify --conflict override? ;)
:idea: Please read the FAQ and How to Request Help.
cheesemaker
Posts: 49
Joined: 03 Sep 2012, 10:52

Re: AMC multiple subtitle handling

Post by cheesemaker »

Thanks for your reply,

I couldn't figure out how I should adjust my "Format" to manage this problem. As you see my movieFormat in the post above, I'm using the parameter "{".$lang"}" to add the language. So FileBot recognizes the language correct, but because it's already existing FileBot can't handle the file. So I need a conflict handler, that if "Something.[...].deu.srt" already exists, Filebot adds a number to the language like: "Something.[...].deu2.srt".

Unfortunately, I haven't found out yet how to manage this just with the format...
rednoah wrote:Also, this can only happen if you use --action move which is officially not supported and discouraged. My I assumed you also specify --conflict override? ;)
No, I'm using --conflict skip. I assume the file got deleted because it couldn't be moved, then it was a ghost in the folder and the cleaner script removed it.

Best Regards,
cheesemaker
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC multiple subtitle handling

Post by rednoah »

Well, if you use the cleaner script, and all videos do get moved, then it will of course clean up whatever remains. If you're worried about that kinda stuff then you can't use --def clean=y ;)

ger1 is a really weird language tag to begin with. It may accidentally work, but it may not always work. At best {lang} will be "deu" and at worst lang will be undefined. In any case you have to figure out the rest in your format. You could use fn.match(...) for subs but there's no built-in logic that magically deals with this case. :D
:idea: Please read the FAQ and How to Request Help.
cheesemaker
Posts: 49
Joined: 03 Sep 2012, 10:52

Re: AMC multiple subtitle handling

Post by cheesemaker »

rednoah wrote:Well, if you use the cleaner script, and all videos do get moved, then it will of course clean up whatever remains. If you're worried about that kinda stuff then you can't use --def clean=y ;)

ger1 is a really weird language tag to begin with. It may accidentally work, but it may not always work. At best {lang} will be "deu" and at worst lang will be undefined. In any case you have to figure out the rest in your format. You could use fn.match(...) for subs but there's no built-in logic that magically deals with this case. :D
Thanks for your reply.

Then, I think I will just add {'.'+fn.match(/deu1|deu2|deu3|ger1|ger2|ger3|eng1|eng2|eng3/)} to my naming format.

Best Regards,
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC multiple subtitle handling

Post by rednoah »

For the sake of brevity :geek:

Code: Select all

{fn.match(/(deu|ger|eng)[0-9]/)}
:idea: Please read the FAQ and How to Request Help.
Post Reply