YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

use proper <language> names for all languages, not just english #1444

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 1445 created by Omertron on 2010-04-27T00:21:55.000Z:

What device are you using YAMJ on? Networked Media Tank, PlayonHD, Other?

NMT

Please describe in as much detail as possible what new feature you want:

The movie <language> saved in the xml file is saved as 'English' for english, but only as 'de', 'fr', 'it', ... for all other languages. This looks ugly, on skins that use this data for non-english language movies.

There is already all the necessary code in YAMJ to enable this but it's not populated with data for the other languages.

All that's needed is add the following lines in src/com/moviejukebox/scanner/MovieFilenameScanner.java after line 188:

       put(&quot;German&quot;, &quot;DE de&quot;);
        put(&quot;Chinese&quot;, &quot;ZH zh&quot;);
        put(&quot;French&quot;, &quot;FR fr&quot;);
        put(&quot;Italian&quot;, &quot;IT it&quot;);
        put(&quot;Spanish&quot;, &quot;ES es&quot;);
        put(&quot;Thai&quot;, &quot;TH th&quot;);
        put(&quot;Arabic&quot;, &quot;AR ar&quot;);
        put(&quot;Japanese&quot;, &quot;JA ja&quot;);
        put(&quot;Hindi&quot;, &quot;HI hi&quot;);
        put(&quot;Danish&quot;, &quot;DA da&quot;);
        put(&quot;Dutch&quot;, &quot;NL nl&quot;);
        put(&quot;Georgian&quot;, &quot;KA ka&quot;);
        put(&quot;Greek&quot;, &quot;EL el&quot;);
        put(&quot;Korean&quot;, &quot;KO ko&quot;);
        put(&quot;Polish&quot;, &quot;PL pl&quot;);
        put(&quot;Portugese&quot;, &quot;PT pt&quot;);
        put(&quot;Russian&quot;, &quot;RU ru&quot;);
        put(&quot;Swedish&quot;, &quot;SV sv&quot;);
        put(&quot;Turkish&quot;, &quot;TR tr&quot;);

This should cover most common movie languages.

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2010-04-27T00:22:42.000Z:

Just to add, I have implemented this here on my YAMJ build and it works great for me.

Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2010-04-27T06:40:30.000Z:

You need to update your moviejukebox.properties file because that has the new properties in it that cover this: http://code.google.com/p/moviejukebox/wiki/PropertiesConfiguration#filename.scanner.language.keywords

Omertron commented 9 years ago

Comment #3 originally posted by Omertron on 2010-04-28T05:27:27.000Z:

Thanks, that seems just what I was trying to solve, haven't had time to try it yet though.

Omertron commented 9 years ago

Comment #4 originally posted by Omertron on 2010-04-28T06:49:32.000Z:

<empty>

Omertron commented 9 years ago

Comment #5 originally posted by Omertron on 2010-10-17T06:45:29.000Z:

Unfortunately the solution you suggested doesn't fix my problem. I have added the following to moviejukebox.properties:

filename.scanner.language.keywords.Georgian=KA,ka

And I have an MKV file with a soundtrack where the mediainfo -f output is: Language : ka Language : Georgian Language : Georgian Language : ka Language : geo Language : ka

YAMJ is still only showing "ka" as language, not Georgian.

If I apply the change suggested in the starting comment here, YAMJ displays "Georgian" as expected.

Omertron commented 9 years ago

Comment #6 originally posted by Omertron on 2010-10-17T06:46:51.000Z:

I think the filename.scanner.language really only apply to filename scanning, not to mediainfo output.

Omertron commented 9 years ago

Comment #7 originally posted by Omertron on 2010-10-17T06:58:41.000Z:

Actually after further testing I find that the change suggested in the starting comment DOESN'T fix the issue either, something else must have changed that broke this fix.

I don't see any option for me to reopen this Issue, but I think it needs reopening.

Omertron commented 9 years ago

Comment #8 originally posted by Omertron on 2010-10-17T08:12:56.000Z:

Probably best in future to open a new issue and then refer to this one.

What have you put in the properties file for this language?

Omertron commented 9 years ago

Comment #9 originally posted by Omertron on 2010-10-17T09:32:43.000Z:

this is in moviejukebox.properties for this language:

filename.scanner.language.keywords.Georgian=KA,ka

the resulting xml file for this movie nevertheless only contains 'ka' in the language field (I do expect the audiocodec field to contain 'ka', I just listed it here for completeness):

ka AC3 (ka)
Omertron commented 9 years ago

Comment #10 originally posted by Omertron on 2010-10-17T09:35:49.000Z:

I have a feeling the problem could be located in the following code, but my lack of java skills prevents me from finding the exact issue:

file: MediaInfoScanner.java - line 561 and following

    // TODO Add an option to choose to override FileName language info.
    if (foundLanguages.size() > 0) {// && movie.getLanguage().equalsIgnoreCase(Movie.UNKNOWN)) {
        int index = 0;
        for (String language : foundLanguages) {
            if (index++ > 0) {
                movie.setLanguage(movie.getLanguage() + " / " + language);
            } else {
                movie.setLanguage(language);
            }
        }
    }
Omertron commented 9 years ago

Comment #11 originally posted by Omertron on 2010-10-17T09:57:14.000Z:

I do have filename.scanner.language.detection=false but I always had that and that shouldn't affect audio language detection, only filename language detection (which I don't need as my filenames never contain language tags, only plain movie titles).

Omertron commented 9 years ago

Comment #12 originally posted by Omertron on 2012-12-21T23:31:44.000Z:

Also you must add "Georgian" to following property:

filename.scanner.language.keywords=Chinese,Dual_Language,English,French,German,Hebrew,Hindi,Hungarian,Italian,Japanese,Norwegian,Polish,Portuguese,Russian,Spanish,Swedish,Thai,VO,Danish,Dutch,Tagalog,Georgian

Otherwise the property filename.scanner.language.keywords.Georgian=KA,ka will not be regarded