How to distinguish Subtitles from Groupname?
Posted: 03 Aug 2020, 19:49
Hello,
I want to name all the external Subtitles as the name of the Movie and only add the language and if it´s forced or not.
My problem i that often "forced" is taken as the groupname then or even the full eng-forced as it.
It is due to this additional group check:
I have now:
If I use it like that I will get:
What can I do to recognize the correct Subtitle names and most of the groups?
If I remove everything relating to the Subtitles from the Scheme then the recognition is higher, but still not very good. eg.:
Is there an easy way to recognize the Subtitles correctly and at least more Groupnames?
2.)
How do I define an own method?
The "fileFolder" part is not working and I have no idea why.
I just want to move less kid friendly movies into other folders.
I want to name all the external Subtitles as the name of the Movie and only add the language and if it´s forced or not.
My problem i that often "forced" is taken as the groupname then or even the full eng-forced as it.
It is due to this additional group check:
which is matching forced and such. However, I cannot not use it since then a lot of groupnames would not be recognized.{" ["+fn.match(/(?<=[-])\w+$/) +"]"}
I have now:
Code: Select all
{fileFolder={
def genre=null;
if(genres.contains("Horror")){
genre= "Horror Movies";
}
else if (genres.contains("Animation")){
genre= "Animation Movies";
}
else if (genres.contains("Komödie")){
genre= "Comedy Movies";
}
else if (genres.contains("Drama")){
genre= "Drama Movies";
}
else if (genres.contains("Science Fiction")){
genre= "SciFi Movies";
}
else if (genres.contains("Action")){
genre= "Action Movies";
}
else if (genres.contains("Abenteuer")){
genre= "Adventure Movies";
}
else{
genre="Movies";
}
return genre;
}};
{file.path[0]}:/Movies/{fileFolder}/ {collection+'/'}
{ny}/
{f.subtitle ? "Subs/" : null}
{ny}
{' - ' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|Theatrical|Theatrical.Cut|Theatrical.edition|directors.cut|special.edition|imax|anniversary/)*.toUpperCase().sort().join(', ').replaceAll(/[._]/, " ")}
[{allOf{audio.language.contains("de") ? "Ger" : null}{audio.language.contains("en") ? "Eng" : null}{audio.language.contains("ja") ? "Jap" : null} join ""}]
[{allOf{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{source.replace(/BluRay/,"BD").replace(/BDRip/,"BD")}{vf}{hdr}{video.bitdepth=='10' ? '10Bit' : null}{ac.replace(/MPEG Audio/,"mpg")}{channels}{vc} join "_"}]
{any{" ["+ group +"]"}{" ["+fn.match(/(?<=[-])\w+$/) +"]"}}{any{subt}{if(f.subtitle)fn.match(/.\w+$/).replaceAll(/\P{Alpha}+/,'.').toLowerCase().removeAll(/.(p|pro|contribution)$/).removeAll(/[.]$/)}{fn =~ /forced$/ ? '.forced' : null}}
So, the Subtitles are at least correctly recognized but they are also often recognized as groupname due to the phrase above. Obviously that means that the groupname is wrong anyway.filename-Englisch-Forced -> filename [FORCED].eng.forced
filename_4608-eng1080 -> filename [eng1080].eng
filename-1080p-eng -> filename [eng].eng
What can I do to recognize the correct Subtitle names and most of the groups?
If I remove everything relating to the Subtitles from the Scheme then the recognition is higher, but still not very good. eg.:
If I remove the "fn.match.." from the group the recognition is way worse, but forced and such is not recognized as a Sub anymore.filename.x264-FDHQ -> filename [FDHQ]
filename.x265-FD -> filename [FD]
filename [WodkaE] -> filename
filename [EXQUISITE] ->filename
filename-Wodkae ->filename[Wodkae]
Is there an easy way to recognize the Subtitles correctly and at least more Groupnames?
2.)
How do I define an own method?
The "fileFolder" part is not working and I have no idea why.
I just want to move less kid friendly movies into other folders.