audio.language ISO 3166-1

Any questions? Need some help?
Post Reply
clonemaster
Posts: 1
Joined: 31 Mar 2015, 00:39

audio.language ISO 3166-1

Post by clonemaster »

Hello All,

I'm Josh and I've been using FileBot since v2.4 and have never had any problems. Back in 2010 I made the decision to cut the cable cord and bought the first generation Roku. Initially I hacked together my own private channel to play my video library, but when Plex became available I started using it. I knew that Plex was forked from XBMC/Kodi and even tried out XBMC on my Raspberry Pi, but the convenience of Plex on my Roku swayed my decision to stick with Plex.

Fast forward to the present, recently the strain of transcoding 1080p video files to multiple devices while transferring files to and from several NAS's (where I keep my video library), coupled with the limitations of Roku's audio output has become intolerable. So I bought a Nexus Player and installed Kodi; I have fallen love with Kodi in the same way I fell in love with Plex, but more!

I've decided to clean up my massive video library, which spans five NAS devices with various multi terabyte capacities. With my new found enthusiasm for developing a better organization system, I've decided to change the way I rename my files.

Here is my current (new) renaming format:

Movie Format

Code: Select all

{n} ({y})/{n} ({y}) - {vf} {vc.lower()} {af} {ac.lower()} {audio.language}
Example: Godzilla (1954)/Godzilla (1954) - 1080p x264 1ch dts ja.mkv

Episode Format

Code: Select all

{n}/{'Season '+s.pad(2)}/{n} - {s00e00.lower()} - {t} - {vf} {vc.lower()} {af} {ac.lower()} {audio.language}
Example: Return to the Planet of the Apes/Season 01/Return to the Planet of the Apes - s01e01 - Flames of Doom - 480p ac3 en.mkv

I've searched high and low, but cannot find the answer to my problem. I want to use the ISO 3166-1 language code for renaming my video's instead of the 2-letter language code.
Example: Metropolis (1927) - 1080p x264 6ch dts deu.mkv
Example: Batman The 1943 Serial - s01e01 - The Electrical Brain - 480p ac3 eng.mkv

Based on my research, this cannot (currently) be done; however, I may be wrong. I would appreciate it if someone could give me some advice or point me in the right direction.

Thanks In Advance,
Josh (clonemaster)
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: audio.language ISO 3166-1

Post by rednoah »

Not officially supported. But easy to do nevertheless.

Code: Select all

Locale.forLanguageTag('ja').ISO3Language
@see https://docs.oracle.com/javase/8/docs/a ... ocale.html
:idea: Please read the FAQ and How to Request Help.
Post Reply