[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
    That patch did work but buy was it slow.....

    This will work much better. I have too many local changes and testing stuff in TV Server to make a clean binary.

    Could people please test that this is fine and does not cause any issues when looking at groups and also when changing sorts etc.
     

    Attachments

    • Radio_sort_v2.patch
      1.3 KB

    Seidelin

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

    Attachments

    • RadioPatch.patch
      909 bytes

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    But do we need any sorting code at all?
    Yes... try deleting a radio station near the start of the list and then adding it again. Then without sorting I am fairly sure this will appear at the end of your list rather than where you place it in group.

    How did you remove the sorting? Sorting is always done by OnSort when you open up the page or change sort option. So if you change the ordering to name, type or bitrate (these sorts are fairly useless IMHO but that is another story...) and then back to channel it needs to know how to sort.

    Without coding the comparer you are not guaranteed as to what order the data will be shown in
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    But do we need any sorting code at all?
    Yes... try deleting a radio station near the start of the list and then adding it again. Then without sorting I am fairly sure this will appear at the end of your list rather than where you place it in group.

    How did you remove the sorting? Sorting is always done by OnSort when you open up the page or change sort option. So if you change the ordering to name, type or bitrate (these sorts are fairly useless IMHO but that is another story...) and then back to channel it needs to know how to sort.

    Without coding the comparer you are not guaranteed as to what order the data will be shown in

    I tried your patch. That doesn't work when changing sort schemes.

    I tried:
    1. changing sort group from favorites to all channels.
    2. Change sort from channels to Genre
    3. Observe channel order changes.
    4. Change sort from Genre to Channels
    5. Observe: Still sorted as before (3.)

    In fact I think your code is just as bad as mine :D
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I tried your patch. That doesn't work when changing sort schemes.

    I tried:
    1. changing sort group from favorites to all channels.
    2. Change sort from channels to Genre
    3. Observe channel order changes.
    4. Change sort from Genre to Channels
    5. Observe: Still sorted as before (3.)

    In fact I think your code is just as bad as mine :D

    My code is indeed normally bad but I can not replicate what you are saying. When I change sort it does re-sort.

    Can you double check this was with v2 of the patch (binary attached). If so could you post the details of your radiogroupmap and radiogroup tables from the database?
     

    Attachments

    • TvPlugin.zip
      179.6 KB

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    I have two groups. Your binary works fine for sorting "Favorites" (4 channels).
    It doesn't work for "All Channels". That's weird.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I have two groups. Your binary works fine for sorting "Favorites" (4 channels).
    It doesn't work for "All Channels". That's weird.

    That might be a different issue.... I have seen mp add the same sort order (something like 9999) to everything. Can you please attach the data from groupmap tables?
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    That might be a different issue.... I have seen mp add the same sort order (something like 9999) to everything. Can you please attach the data from groupmap tables?

    How do I do that? SQL has never been my thing.
     

    Users who are viewing this thread

    Top Bottom