[fixed] Radio - wrong sort order (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I agree that there are bigger issues with Radio and there is plenty of reasons to be confused in My Radio. But I do agree with wolfi_b that the channels sort order should be as user configured it to be. Usually favorite channels are put on top. This should be possible. I am guessing this can be fixed trivially. We can make this tiny fix for next release, and do a rework of radio for 1.3.
    Fixing is relatively trivial yes but this is not sorting by channel it is sorting by user defined order in TV setup (which is a bit too long to put in the sort options :rolleyes:)

    I will look at this over the weekend or Monday but is just a case of looking up the current group then getting the group map then getting the channel ordering from the groupmap in the comparer.
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    I assigned the mantis to you then. Sounds like you have it half fixed already.
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Well, I did a fix anyways. It was easy, but I am not sure it is a proper fix. Try if it works even when you have more than one radio groups. Just replace TVplugin.dll. You may want to back up your original one. The binary contains some other fixes, but nothing you should notice. But don't base bug reports on this binary.
     

    Attachments

    • Radio sort option.patch
      686 bytes
    • TvPlugin.zip
      171.8 KB

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Looking on my phone on a train but it would appear that this will sort by the group sorting (ie. Group A comes before Group B) not the sorting of channels within the group.
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I will check tonight but my hunch is that it is actually not sorting at all but instead returning data in the order it is coming back from the database. You are checking the sort order of a group object/table but we need to use the sort order of a groupmap object/table
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    You are right. By accident this gives the intended behavior, since DB returns the channels in desired order. :p So fix could be to not sort at all. Only thing is you cant invert the sort order, but why would anyone want that (best channels furthest down)?
     

    wolfi_b

    MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    AW: Radio - wrong sort order

    I agree with Seidin, i think it should be possible to sort the channels like for TV.
    It worked with former MePo Version up to 1.2beta!
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Re: AW: Radio - wrong sort order

    I agree with Seidin, i think it should be possible to sort the channels like for TV.
    It worked with former MePo Version up to 1.2beta!

    I am not disputing you should be able to sort them just that "sort by: channel" is a confusing name (also see below for potential issue...)
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    OK attached is a patch which I think should solve the issue (sorry not got time to actually test this or compile tonight)

    However I see an issue...

    If you go to the groups page then it uses the same sort. I also think this could potentially throw an exception as it is trying to convert a group into a channel in the code...

    If anyone could test that this fixes within groups that would be a start. It would then be wise to see what happens if you go up a level so you are looking at the list of views and then try different sort options (I have a hunch there will be issues)
     

    Attachments

    • Radio_sort.patch
      1.2 KB

    Users who are viewing this thread

    Top Bottom