Info.original language doesn't seem to work for series
Posted: 03 Jul 2020, 06:53
After reading the forums I managed to make a working expression for renaming movies:
So I adapted the expression to work for series:
Problem is it won't work, it ends up something like:
If I use:
That works just fine.
Basically, I would like shows in Spanish to retain their original name and episode naming, and everything else can be renamed to English (default). The expression for movies works rather well, but for series it isn't working for me. I would like some insight on how to fix the expression.
Code: Select all
{collection.colon(' - ')+'/'}{ (info.OriginalLanguage ==~ /es/) ? primarytitle.colon(' - ') : n.colon(' - ')} ({y})/{ (info.OriginalLanguage ==~ /es/) ? primarytitle.colon(' - ') : n.colon(' - ')} ({y}) {vc.replace('H.264', 'x264').replace('HEVC', 'x265').replace('ATEME','x265').replace('AVC', 'x264').replace('V_MS VFW FOURCC','Xvid')} {vf} {def x = fps.round(0,); if (x > 50) "$x fps"} {vs} {audio[0].language.replace('es','es-lat')} {audio[1].language.replace('es','es-lat')} {audio[2].language.replace('es','es-lat')} {def x = text.language.findResults{ it.toLocale() }.join(' '); if (x) "subt $x"}
Code: Select all
{ (info.OriginalLanguage ==~ /es/) ? primarytitle.colon(' - ') : n.colon(' - ')} ({y})/{'S'+s00}/{ (info.OriginalLanguage ==~ /es/) ? primarytitle.colon(' - ') : n.colon(' - ')} - {s00e00} - {t} ({vf} {audio[0].language.replace('es','es-lat')} {audio[1].language.replace('es','es-lat')} {audio[2].language.replace('es','es-lat')} {def x = text.language.findResults{ it.toLocale() }.join(' '); if (x) "subt $x"})
Code: Select all
(2019)/- S02E02 - Leeches
Code: Select all
{n.colon(' - ')} ({y})/{'S'+s00}/{n.colon(' - ')} - {s00e00} - {t} ({vf} {audio[0].language.replace('es','es-lat')} {audio[1].language.replace('es','es-lat')} {audio[2].language.replace('es','es-lat')} {def x = text.language.findResults{ it.toLocale() }.join(' '); if (x) "subt $x"})
Basically, I would like shows in Spanish to retain their original name and episode naming, and everything else can be renamed to English (default). The expression for movies works rather well, but for series it isn't working for me. I would like some insight on how to fix the expression.