Different Language on different Series (1 Viewer)

barneh

MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Hi!
    I have stared looking into creating a patch for adding different language for different Series the plugin...
    I followed the Developer Guide, but what is the best way to test in MP-TVSeries?
    Is it to copy the dll to a installed MP, or as it done in the Developer Guide, adding src of MP?

    Why I ask is because I can't start MP Configuration without it crashes... :(
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    The Dev guide is a tad outdated. You don't need the MP source as the source already has the external MP libraries included.

    All you need to do is build the project and copy the dll/pdb to the plugins directory (post build step or similar).
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    You can debug as well, you just wont be able to step into any MediaPortal code unless you have the source for that. You shouldn't need to anyway, I never do.

    All you need to do is ensure the dll and pdb are copied to the mediaportal's plugin directory and then have Visual Studio start MediaPortal in the Debug/Start External Program text box. All should be good from there.
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Hi again!
    First of all thanks ltfearme for the support in getting me going!

    For my MP setup I have some series that are original Swedish or Norwegian and English.
    And I have had some nag about not getting my Norwegian and Swedish series in the native language.
    Therefore I have looked into this!

    In OnlineAPI.cs there is a method called SelLanguageAsString. This is set as language for everything, series, episodes and banner you name it! (this SelLanguageAsString comes from the language selected in the ComboBox in Online Data tab).


    So my solution is this
    :
    Implement a checkbox that is named "Override Language".
    Implement a method in OnlineAPI.cs that is called GetOverrideLanguage(String SeriesID)
    And in every method that uses SelLanguageAsString today (in OnlineAPI.cs), implement the following:
    Check if the "Override Language" is set too true?
    If Yes call the GetOverrideLanguage() method that get the language sat in online_series language field, otherwise use the SelLanguageAsString.


    How to change language
    :
    For changing the language it has to make the "Override Language" option true.
    The the user have to go to the Details Tab -> Select a Series and the change the preferred language for this Series. (see attached picture).

    For now you can see that the language is just a editable field, but the goal is to have a combobox where there is possible to select between the same language that are present in the Language combobox in the Online Data tab.


    So my question is, is this a good solution?
    Have I missed something?
    Are there other solution that is better?
    What do you think?
     

    Attachments

    • TvSeriesScreen.jpg
      TvSeriesScreen.jpg
      105.3 KB

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I think the solution sounds good.

    I would also make it possible to change the language the from within MediaPortal GUI when invoking the context menu on a selected series e.g. 'Set Language for Series' -> Display list of available languages.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    +1 for GUI solution. I can't remember when I opened config last time while I'm using MP-TVSeires every day.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    @barneh, can you do a get of the latest source as I made changes to configuration recently which might screw up a merge later. The Configuration tool has been notorious in the past for screwing up merges so its best that we're on the same revision.
     

    barneh

    MP Donator
  • Premium Supporter
  • February 4, 2010
    245
    54
    Malmö
    Home Country
    Sweden Sweden
    Great!
    I proceed with this solution then....

    I would also make it possible to change the language the from within MediaPortal GUI when invoking the context menu on a selected series e.g. 'Set Language for Series' -> Display list of available languages.
    Sound like a excellent idea! I have to look into this... I shout if I need some help in the right direction!

    can you do a get of the latest source as I made changes to configuration recently which might screw up a merge later.
    Okay I do an update!
     

    Users who are viewing this thread

    Top Bottom