MP2 - V2.5 TVMosaic Provider for MP2 (3 Viewers)

AdHu86

Portal Pro
January 14, 2022
88
98
Berlin
Home Country
England England
While testing for series schedules I found another minor bug. Maybe it’s not even related to TVMosaic. When selecting „Manage series schedules“ the channel logos are not visible.
625C3DE5-A6FA-4ABB-B31C-7575C9D5DE11.jpeg
 

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,737
    3,501
    Stuttgart
    Home Country
    Germany Germany
    While testing for series schedules I found another minor bug. Maybe it’s not even related to TVMosaic. When selecting „Manage series schedules“ the channel logos are not visible.
    View attachment 209877
    It's a general issue and not related to TVMosaic. [ChannelName] provides a correct string, but for some reason there is no logo, if "Manage series schedules" is activated.
    It could be because Program.ChannelLogoType is not valid anymore. If a dev tells me what to bind to, it's easy to fix.

    XML:
            <Image.Source>
              <fanart:FanArtImageSource fanart:FanArtMediaType="{Binding Program.ChannelLogoType}" fanart:FanArtType="Banner" fanart:FanArtName="{Binding [ChannelName]}"
                                        fanart:MaxWidth="{StaticResource TvLogoChacheWidth}" fanart:MaxHeight="{StaticResource TvLogoChacheHeight}"/>
            </Image.Source>
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    And series type schedules can be "record on every channel", so a single logo is not meaningful at all.

    I pushed my changes yesterday but had no time to copy download link from TC. Maybe someone else can do this?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,737
    3,501
    Stuttgart
    Home Country
    Germany Germany
    And series type schedules can be "record on every channel", so a single logo is not meaningful at all.

    I pushed my changes yesterday but had no time to copy download link from TC. Maybe someone else can do this?
    Agree, if you tell me how to check for different schedule types by ID and not string (due to localisation issues), I can fix it accordingly.
    Many fixes are already included in the TVOverwork branch, so I would also push it there, because it's not related to TVMosaic. The TVOverwork branch contains many fundamential changes and should not be merged elsewhere.

    1643977562284.png


    Handling for series schedules:

    Show channel logo only, if following schedule type is not selected
    • EveryTimeOnEveryChannel
    Show start time only, if following schedule type is selected
    • Every day at this time
    • Every week at this time
    • Weekends at this time
    • working days at this time
    I found below, but do not know how to add a reference in xaml
    XML:
      public enum ScheduleRecordingType
      {
        Once,
        Daily,
        Weekly,
        EveryTimeOnThisChannel,
        EveryTimeOnEveryChannel,
        Weekends,
        WorkingDays,
        WeeklyEveryTimeOnThisChannel
      }
    I pushed my changes yesterday but had no time to copy download link from TC. Maybe someone else can do this?
    I can do that.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Agree, if you tell me how to check for different schedule types by ID and not string (due to localisation issues), I can fix it accordingly.
    I have checked code and for the "manage series schedules" there is a ListItem with following labels:
    C#:
            item.SetLabel("ChannelName", result.Result.Name);
          item.SetLabel("StartTime", schedule.StartTime.FormatProgramStartTime());
          item.SetLabel("EndTime", schedule.EndTime.FormatProgramEndTime());
          item.SetLabel("ScheduleType", string.Format("[SlimTvClient.ScheduleRecordingType_{0}]", schedule.RecordingType));
    So you should be able to access them like [ChannelName].

    The property should be also set for type "on all channels", containing the channel where you originally started the schedule.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,737
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I have checked code and for the "manage series schedules" there is a ListItem with following labels:
    C#:
            item.SetLabel("ChannelName", result.Result.Name);
          item.SetLabel("StartTime", schedule.StartTime.FormatProgramStartTime());
          item.SetLabel("EndTime", schedule.EndTime.FormatProgramEndTime());
          item.SetLabel("ScheduleType", string.Format("[SlimTvClient.ScheduleRecordingType_{0}]", schedule.RecordingType));
    So you should be able to access them like [ChannelName].

    The property should be also set for type "on all channels", containing the channel where you originally started the schedule.
    This is how it's shown currently in the details. But as I mentioned the strings are localized, so unfortunately useless for an IsVisible property.
    I'd need something like ScheduleType.Once or ScheduleType.EveryTimeOnEveryChannel to make a bool check.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I will add the enum (not localized) to the labels, like "ScheduleTypeEnum". By this way I will also add the ChannelLogoType there (addidionally to ProgramItem)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I will add the enum (not localized) to the labels, like "ScheduleTypeEnum". By this way I will also add the ChannelLogoType there (addidionally to ProgramItem)
    Done and pushed.

    [ChannelLogoType]
    and
    [ScheduleTypeEnum]

    are available now as labels on program and series schedule ListItems, so they can be used in a common way.
     

    Users who are viewing this thread

    Top Bottom