[audio] Shorten [ru, ru, ru, en] to [3ru, en]

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[audio] Shorten [ru, ru, ru, en] to [3ru, en]

Post by rednoah »

IIeTp_I wrote:{audio.LanguageString} prints the string (ru, ru, ru, en). can I shorten it to show the string (3ru, en) for example
e.g. Use groupBy to map {audioLanguages} by ISO2 language code, and then collect String values for each group:

Format: Select all

{ audio.groupBy{ it.Language }.collect{ k, v -> v.size() > 1 ? v.size() + k : k } }
:idea: Please read the FAQ and How to Request Help.
Post Reply