Hello,
I would first like to apologize again for the lack of news, we had the opportunity to talk about it briefly, but still.
I've a problem with the audio type block.
As suggested, I tried this :
Groovy: Select all
{
// If multiple language exist ADD MULTi to new filename
if (count(audioLanguages) >= 2) 'MULTi'
}
{ fn.match(/VFF|VOF|VOQ|VFQ|VFI|VF2|VOST|VOSTFR|MUET/) }
{
// If FRENCH exist then ADD FRENCH to new filename
if (audioLanguages =~ /fra/) 'FRENCH'
}
{
// If an audio track language match with original language of the movie
if (audioLanguages =~ language) {
// with FRENCH subtitle, then add VOSTFR to new filename
// without FRENCH subtitle, then add VOST to new filename
// without any subtitle, then add VO to new filename
any{ textLanguages =~ /fra/ ? 'VOSTFR' : 'VOST' }{ 'VO' }
}
}
{ if (fn =~ /FRENCH/ || audioLanguages =~ /fra/) country.match('FR':'VOF', 'CA':'VOQ') ?: 'FRENCH'
}
But it seems I didn't specified something, I need only one match from all for each file.
Here is some example of what I get :
source : And.Hope.to.Die.1972.1080p.BluRay.x264.mkv
destination : La.Course.du.lievre.a.travers.les.champs.1972.tmdbid-91571 - 1080p BluRay x264 FLAC FRENCH VOST VOF.mkv
expected : La.Course.du.lievre.a.travers.les.champs.1972.tmdbid-91571 - 1080p BluRay x264 FLAC MULTi VOF.mkv
{audiolanguages} : fra, eng
{country} : FR
>> corner case, Country is FR but 2 audio tracks so VOF but also MULTi, weird but true, I've only few files in this case I think.
source : Anatomie.d.une.chute.2023.VOF.1080p.BluRay.x264.AC3.mkv
destination : Anatomie.d.une.chute.2023.tmdbid-915935 - 1080p BluRay x264 AC3 VOF FRENCH VOSTFR VOF.
expected : Anatomie.d.une.chute.2023.tmdbid-915935 - 1080p BluRay x264 AC3 VOF.mkv
{audiolanguages} : fra
{country} : FR
source : Anchorman.2.The.Legend.Continues.2013.MULTi.1080p.HDLight.X264.AC3.VFF.mkv
destination : Anchorman.2.The.Legend.Continues.2013.tmdbid-109443 - 109443 1080p HDLight x264 AC3 MULTi VFF FRENCH VOSTFR FRENCH.mkv
expected : Anchorman.2.The.Legend.Continues.2013.tmdbid-109443 - 109443 1080p HDLight x264 AC3 MULTi VFF.mkv
{audiolanguages} : fra, eng
{country} : US
source : Angelique.Marquise.Des.Anges.1964.1080p.FR.x264.AC3.mkv
destination : Angelique.Marquise.Des.Anges.1964.tmdbid-44450 - 1080p x264 AC3 FRENCH VO VOF.mkv
expected : Angelique.Marquise.Des.Anges.1964.tmdbid-44450 - 1080p x264 AC3 VOF.mkv
{audiolanguages} : fra
{country} : FR
source : An.American.Haunting.Cauchemar.Americain.2005.MULTi.VF2.1080p.BluRay.x264.mkv
destination : An.American.Haunting.Cauchemar.Americain.2005.tmdbid-10008 - 1080p BluRay x264 AC3 MULTi VF2 FRENCH VOSTFR VOQ.mkv
expected : An.American.Haunting.Cauchemar.Americain.2005.tmdbid-10008 - 1080p BluRay x264 AC3 MULTi VF2.mkv
{audiolanguages} : fra, eng
{country} : CA
>> I checked in mediainfo, I do have 3 audio tracks : 2 with language French (but one is VFF, the other VFQ), 1 with language English.
This last example is a bit tricky (and a corner case) because we could consider that we may have a movie from CA, with a single FRENCH audio track that may be VFF or VFQ, no way to verify this from metadata (sometime track title say if it's VFF or VFQ, but that not always true) so
if no usable tag
only one FRENCH track
country is CA
= VOQ
if 2 FRENCH audio track
country is CA
= VF2
VOST, VOSTFR and VO either if tag is in source filename or not are well identified.
Let me know if you need some mediainfo or additional information.
Thank in advance