Create subfield for language item in database (1 Viewer)

jesseblue

Portal Pro
June 8, 2007
77
3
43
Hello,

I'd like Media Portal to display the language of my movies graphically via country flags. This works fine for one single language. If I however have a movie that has more than one language tracks (e.g. English/Japanese), the information can't be extracted by labels like #MovingPictures.SelectedMovie.extra.language.1 and #MovingPictures.SelectedMovie.extra.language.2 as they apparently do not exist. Would it be possible to change the type of the language entry manually (into a data field with subfield like actors or genres), so that one could address each language item separately as described above?
 

jesseblue

Portal Pro
June 8, 2007
77
3
43
AW: Create subfield for language item in database

Hm, no answers. I don't know if I am in the right forum with this question, but I think it's a moving pictures related topic. I'd try to make the changes myself. The only problem is I don't know where the definition of data types is being done... Anyone?
 

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Hi jesseblue, you are in the right forum. Best thing to do about getting help with coding is jump onto IRC.

    But to solve your problem take a look at DBMovieInfo.cs, in here you find the definition for the 'Language' field:

    Code:
    public string Language {
                get { return _language; }
    
                set {
                    _language = value;
                    commitNeeded = true;
                }
            } private string _language;

    You would need to change the type from 'String' to 'StringList', I think this deserves an enhancement request on the Issue Tracker.

    There is special handling in movingpictures when publishing skin properties when dealing with StringList types.
     

    jesseblue

    Portal Pro
    June 8, 2007
    77
    3
    43
    AW: Create subfield for language item in database

    Hi Damien,

    thank you for your reply. I was exactly looking for something like that. But is DBMovieInfo.cs supposed to be a file? If so, where is it located? Couldn't find anything by searching the directories...

    Cheers, Christian


    Edit: Just found the file in a SVN trunk of Moving Pictures. Hm, so I have to compile myself I guess. Have never done it before but I'm going to try it tomorrow. Hope I will not kill my running system...

    And one more question: What do you mean by:
    There is special handling in movingpictures when publishing skin properties when dealing with StringList types.
     

    Pablik

    Development Group
  • Team MediaPortal
  • August 19, 2010
    680
    1,089
    Home Country
    Czech Republic Czech Republic
    Hi,
    few weeks ago i modified source code for myself, so now i can see audio language icon on the screen with all other icons of the media file.
    In the database i have two more properities of the movie file (audio languages and subtitle languages). By modification of the mediainfowrapper i cen get all languages and subtitles presented in the media file. If the file has my own (Czech) language, then icon of Czech language is shown, otherwise the icon of the first audio language of the file is shown. If media file has unspecified language (und), the icon with "???" symbols is shown. On the attached screens you can see few examples.
    I guess, this additional info could be usefull for other non english speaking users , so it would be nice to add similar enhancement to new version. But this is my opinion only.
    Sorry for my english.
     

    Attachments

    • info1.JPG
      info1.JPG
      23.1 KB
    • info2.JPG
      info2.JPG
      19.6 KB
    • info3.JPG
      info3.JPG
      22.5 KB
    • info4.JPG
      info4.JPG
      14.5 KB
    • info5.JPG
      info5.JPG
      12.8 KB
    • info6.JPG
      info6.JPG
      13 KB

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    This is indeed a great modification.. hope to see this in one of the upcoming Moving Pictures Versions! =)
     

    jesseblue

    Portal Pro
    June 8, 2007
    77
    3
    43
    AW: Create subfield for language item in database

    I'm afraid moving pictures isn't going to change their implementation of the mediainfo wrapper soon as they want to switch to the built-in implementation of mediainfo in Media Portal for consistency reasons (source). Posted this as an enhancement suggestion in the Mediportal forum.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Maybe Pablik can help us then. Is it really only the mediainfowrapper.cs which u have to modify? I mean how can you display the Audio and subtitle languages in MovingPictures then? There must be some String for it in my opinion..

    I found this one here

    PS:
    Is it also possible to show the Video-Bitrate and the Audio-Bitrate like in MyTV-Series?
     

    Users who are viewing this thread

    Top Bottom