Page 1 of 1
Adding Subbed to anime
Posted: 20 Feb 2022, 15:53
by TacFlix
Hey guys, so far I've been slowly adding to my anime collection, but I have a few that are not dubbed so have been experimenting with how to go about showing subbed in the rename.
So far I have this for Dual audio (dubbed):
Code: Select all
{folder}/{n} ({y}) - {s00e00} - {t} [e{absolute.pad(3)}] {audio.size() > 2 ? ' [Multi Audio] ' : audio.size() > 1 ? ' [Dual Audio] ' : null}[{vf}] [{vcf} {vc} {bitdepth}bit] [{ac} {channels}]
And that provides me with the following:
Attack on Titan (2013) - S04E01 - The Other Side of the Sea [e060] [Dual Audio] [1080p] [HEVC x265 10bit] [AAC 2.0]
What I'm trying to accomplish is have exactly the above, however if the audio if foreign but it has english subbs, where it says [Dual Audio] I want it to say [Subbed], or if it is just english only from the getgo, I want it to say [Eng] instead of dual audio or subbed if that makes sense?
So in my mind there will be only 4 options;
- [Eng] if it is originally english speaking
- [Subbed] if foreign audio but english subs
- [Dual Audio] if dubbed to english
- [Multi Audio] if dubbed to multiple languages
Is that possible to add that into my format?
Thanks

Re: Adding Subbed to anime
Posted: 21 Feb 2022, 01:40
by rednoah
Well, I'd kinda need examples and test files for each corner case that you want to cover...
You could start with something like this:
Code: Select all
{
if (audioLanguages[0] =~ /eng/)
return "[Eng]"
}
{
if (audioLanguages.size() == 2)
return "[Dual Audio]"
if (audioLanguages.size() > 2)
return "[Multi Audio]"
}
{
if (textLanguages =~ /eng/)
return "[Subbed]"
}
A file where the 1st audio stream is English, and that has 2 audio streams, and that has English subtitles, will would thus yield:
Re: Adding Subbed to anime
Posted: 21 Feb 2022, 17:02
by TacFlix
That is absolutely amazing thank you rednoah, I've tested that in my line and it works fine.
Added to my code as the following:
Code: Select all
{folder}/
{n} ({y})/Season {s00}/
{n} ({y}) - {s00e00} - {t}
[e{absolute.pad(3)}]
{
if (audioLanguages[0] =~ /eng/)
return "[Eng] "
}
{
if (audioLanguages.size() == 2)
return "[Dual Audio] "
if (audioLanguages.size() > 2)
return "[Multi Audio] "
}
{
if (textLanguages =~ /eng/)
return "[Subbed] "
}
[{vf}]
[{vcf} {vc} {bitdepth}bit]
[{ac} {channels}]
However, would it be possible to only show one of those though?
So in order of preferance, if its only English speaking to show [Eng] (i.e. it isn't dual audio it only has one track that is english so its originally only english), if not that, then show either [Dual Audio] if it has enlish audio & Japanese/chinese and so on. And then if it is a 'true anime' so in japanese but with english subtitles to show [Subbed]
So I'd effectively only want one of those three tags at one time, not all 3. If thats not possible, then the 3 that you've already shared will work!

Re: Adding Subbed to anime
Posted: 21 Feb 2022, 17:28
by rednoah
This snippet already shows you you can get either
[Dual Audio] or
[Multi Audio] so you can learn from that and extend from there:
Code: Select all
{
if (audioLanguages.size() == 2)
return "[Dual Audio] "
if (audioLanguages.size() > 2)
return "[Multi Audio] "
}
Just add more conditions in the same
{...} and
return the value you want for each of the conditions you have in mind:
Code: Select all
{
if (audioLanguages[0] =~ /eng/)
return "[Eng] "
if (audioLanguages.size() == 2)
return "[Dual Audio] "
if (audioLanguages.size() > 2)
return "[Multi Audio] "
if (textLanguages =~ /eng/)
return "[Subbed] "
}
Re: Adding Subbed to anime
Posted: 21 Feb 2022, 18:26
by TacFlix
Thank you so much!
Yep now that you say it I have looked and it was quite easy for me to figure it out with what you initially gave, thanks for giving me the code regardless though I appreciate it!
Code: Select all
{folder}/
{n} {n =~ y ? '' : ' ('+y+')'}/
Season {s00}/
{n} {n =~ y ? '' : ' ('+y+')'} - {s00e00} - {t}
[e{absolute.pad(3)}]
{
if (audioLanguages.size() == 2)
return "[Dual Audio] "
if (audioLanguages.size() > 2)
return "[Multi Audio] "
if (audioLanguages[0] =~ /eng/)
return "[Eng] "
if (textLanguages =~ /eng/)
return "[Subbed] "
}
[{vf}]
[{vcf} {vc} {bitdepth}bit]
[{ac} {channels}]
I fiddles them around to the order I want it to take preferance and its working absolutely perfectly! I really need to learn this coding and I will play around more with other stuff, thanks again!