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

wolfi_b

MP Donator
  • Premium Supporter
  • April 10, 2008
    799
    38
    Home Country
    Austria Austria
    MediaPortal Version: 1.2.0Beta
    MediaPortal Skin: Maya
    Windows Version: Windows 7 x86 Ultimate
    CPU Type: AMD Athlon II X2 235e
    HDD: Samsung EcoGreen HD103UI 1TB
    Memory: 4GB DDR3-1333
    Motherboard: Gigabyte GA-MA785GMT-UD2H
    Video Card: onboard Radeon HD4200
    Video Card Driver: Catalyst 10.12
    Sound Card: onboard RTL889A
    Sound Card AC3: onboard optical out
    Sound Card Driver:
    1. TV Card: Digital Everywhere FloppyDTV S2
    1. TV Card Type: DVB-S2
    1. TV Card Driver: 5.7
    2. TV Card: Digital Everywhere FloppyDTV S2
    2. TV Card Type: DVB-S2
    2. TV Card Driver: 5.7
    MPEG2 Video Codec: SAF 5.01
    MPEG2 Audio Codec: SAF 5.01
    h.264 Video Codec: SAF 5.01
    Satelite/CableTV Provider: Astra 19.2°E
    HTPC Case: Lian-Li PC-C36
    Cooling: Scythe Shuriken
    Power Supply: Fortron FSP250-60GHT
    Remote: Logitech Harmony one; Logitech DiNovo Edge; OrigeanAE IR221
    TV: Toshiba 37Z3030D
    TV - HTPC Connection: HDMI

    Hi,

    with 1.2beta i got the new problem that the sort order of the radio channels is not like configured in the TVServer Config.
    It seems that the database field channel.sortorder is used instead of radiogroupmap.sortorder



    Regards, Wolfgang
     

    wolfi_b

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

    Radio screen, sorted by Channel:



    EDIT:
    in Radio-EPG the sort order is correct!
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Had a quick peek in the code and the only sort like this is by name and that should simply be based on the label. You have this set as descending which means that it should sort Z->A but it does not :confused:

    If you change the sort (and then come back to name) does this then work or is name always like this?
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    There is both sort by channel (number) and by name.
     

    Attachments

    • Untitled.png
      Untitled.png
      750.5 KB

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Ahh ok then yes this looks like a tiny issue. I am not at a machine with a database to check this but when sorting by number the code is sorting by the SortOrder column of the channel.

    Code:
              if (channel1 != null)
              {          if (channel1 != null && channel2 != null)
              {
                if (bAscending)
                {
                  if (channel1.SortOrder > channel2.SortOrder)
                  {
                    return 1;
                  }
                  return -1;
                }
                if (channel2.SortOrder > channel1.SortOrder)
                {
                  return 1;
                }
                return -1;
              }
                return -1;
              }
              return channel2 != null ? 1 : 0;
    Not sure if this classes as a bug or a slight improvement (who knows what this number sort was ever designed to do ;)) but I think it should be addressed when we look at radio for 1.3 ????)
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Like for TV channels it should sort channels like they are set up in configuration. It is a bug exactly as described. Will mantis this later. Fix should be simple enough I guess. Haven't looked at code yet.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Like for TV channels it should sort channels like they are set up in configuration. It is a bug exactly as described. Will mantis this later. Fix should be simple enough I guess. Haven't looked at code yet.

    The reason I suggest delaying this is I think this sort is confusing. What does "Sort by: Channel" mean? (in the code this is referred to as number which is why I was a little confused this morning...

    I would actually expect this to sort by channel number (ie. LCN) or the name of the channel not by the order in TV setup. (Also in the guide etc we have changed the channel strings to station.

    I am just thinking that this is bigger than the sort issue itself ??? This needs some redesign (which hopefully we will get done for 1.3)
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Like for TV channels it should sort channels like they are set up in configuration. It is a bug exactly as described. Will mantis this later. Fix should be simple enough I guess. Haven't looked at code yet.

    The reason I suggest delaying this is I think this sort is confusing. What does "Sort by: Channel" mean? (in the code this is referred to as number which is why I was a little confused this morning...

    I would actually expect this to sort by channel number (ie. LCN) or the name of the channel not by the order in TV setup. (Also in the guide etc we have changed the channel strings to station.

    I am just thinking that this is bigger than the sort issue itself ??? This needs some redesign (which hopefully we will get done for 1.3)

    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.
     

    Users who are viewing this thread

    Top Bottom