[Approved] Patch to vae TVsearch settings (1 Viewer)

HiperGlow

MP Donator
  • Premium Supporter
  • December 14, 2009
    25
    8
    Home Country
    Denmark Denmark
    In many places MP remembers last selection, but in TVsearch it always starts in Title, and I want to start in Genre :D

    So I made this patch, the only thing I am wondering, should the Serialisation had been done in OnMessage/GUI_MSG_WINDOW_INIT/GUI_MSG_WINDOW_DEINIT instead of where I did it ?

    I have actually also added this in xmltvimport.cs
    if (nodeCategory == null) {nodeCategory = xmlProg.ReadString(); nodeCategory=CultureInfo.CurrentCulture.TextInfo.ToTitleCase(nodeCategory);}

    I just think it looks nicer when the genre's are capitalized. (Not in this patch)
     

    Attachments

    • TVsearch.patch
      2 KB

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Sorry it has been a while but there have been lots of changes going on in this area of MP.

    I believe that in SVN now state will be saved when opening and closing window but not when opening / closing MP.

    Your patch will set the sort every time the window is opened / closed and that part is already handled. A quick chat with the team and it did seem that some people seem to think that the current behaviour (will always open at title when you open MP but then save state) is how it should be handled.

    Anyone have a view?
     

    HiperGlow

    MP Donator
  • Premium Supporter
  • December 14, 2009
    25
    8
    Home Country
    Denmark Denmark
    A quick chat with the team and it did seem that some people seem to think that the current behaviour (will always open at title when you open MP but then save state) is how it should be handled.

    Well, then it's a good thing you can do your own changes, if you have another opinion :D
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    A quick chat with the team and it did seem that some people seem to think that the current behaviour (will always open at title when you open MP but then save state) is how it should be handled.

    Well, then it's a good thing you can do your own changes, if you have another opinion :D
    :) nothing is set in stone...

    Just that your patch is now not 100% compatible with latest SVN; I have not looked at exactly what the code is doing but I know that the current search type is stored when you leave the window and re-instated when you load it again. By adding your patch and doing this in OnPageLoad we would be doing this twice.

    If you are able to update patch to either load/save these settings in init() and deinit() (ie. only when opening or closing MP) and also make the same changes to RadioSearch.cs then we will consider it. Else leave your patch as is and rework the existing method of how we set the search method between opening and closing windows.

    Thanks
     

    HiperGlow

    MP Donator
  • Premium Supporter
  • December 14, 2009
    25
    8
    Home Country
    Denmark Denmark
    If you are able to update patch to either load/save these settings in init() and deinit() (ie. only when opening or closing MP) and also make the same changes to RadioSearch.cs then we will consider it. Else leave your patch as is and rework the existing method of how we set the search method between opening and closing windows.

    Thanks

    oh, I see, I will have a look at it again.
     

    HiperGlow

    MP Donator
  • Premium Supporter
  • December 14, 2009
    25
    8
    Home Country
    Denmark Denmark
    This patch is using Init/DeInit - see if it's better. Some stuff is duplicated in TV & Radio, but right now I think that is nessesary.
    You could also discuss if you should save different search setups or just one general, I have chosen 2 different, one for radio and one for TV.
     

    Attachments

    • GuideSearchPatch.patch
      4.3 KB

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    This patch is using Init/DeInit - see if it's better. Some stuff is duplicated in TV & Radio, but right now I think that is nessesary.
    You could also discuss if you should save different search setups or just one general, I have chosen 2 different, one for radio and one for TV.
    Indeed code is duplicated hence 0003397: Rework Search Code - MediaPortal Bugtracker :) but that is for 1.3

    I am a bit busy with work but will look at this later in the week

    Thanks
     

    Users who are viewing this thread

    Top Bottom