Different Language on different Series

Discussion in 'My TVSeries' started by barneh, December 30, 2014.

  1. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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... :(


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,448
    Likes Received:
    4,228
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,368 / 0
    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).
     
    • Agree Agree x 1
  4. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Okay... But then I can't debug right? Juste build, run and see?
     
  5. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,448
    Likes Received:
    4,228
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,368 / 0
    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.
     
  6. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Aha... I try it out. Thanks
     
  7. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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?
     

    Attached Files:

    • Agree Agree x 1
  8. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,448
    Likes Received:
    4,228
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,368 / 0
    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.
     
    • Agree Agree x 1
  9. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,897
    Likes Received:
    708
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,222 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    +1 for GUI solution. I can't remember when I opened config last time while I'm using MP-TVSeires every day.
     
  10. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,448
    Likes Received:
    4,228
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,368 / 0
    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.
     
  11. barneh
    • Premium Supporter

    barneh MP Donator

    Joined:
    February 4, 2010
    Messages:
    242
    Likes Received:
    27
    Location:
    Malmö
    Ratings:
    +53 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Great!
    I proceed with this solution then....

    Sound like a excellent idea! I have to look into this... I shout if I need some help in the right direction!

    Okay I do an update!
     
    • Like Like x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!