[Bug] TV scheduler: Channel's name not displayed (1 Viewer)

rivera

Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    MediaPortal Version: 1.1.RC1
    MediaPortal Skin: Blue-3
    Windows Version: WinXP-SP3
    CPU Type: Intel Core 2 Duo E8400 3.0GHz
    HDD: WD 1000Gb
    Memory: 2x1024 DDR2
    Motherboard: ASUS P5K premium
    Video Card: ASUS EN9600GT Silent/HTDI 512
    Video Card Driver: 196.21
    Sound Card: internal
    MPEG2 Video Codec: Cyberlink Video/SP Decoder (PDVD 8)
    MPEG2 Audio Codec: ffdshow
    h.264 Video Codec: MPC decoder
    HTPC Case: Silverstone CW03
    Cooling:
    Power Supply: Corsair VX450W
    Remote: Soundgraph
    TV: Pioneer PDP-5080XA
    TV - HTPC Connection: DVI-HDMI



    In TV Scheduler, a channel's name for selected program must be displayed in Blue3 skin - check "mytvschedulerServer.xml":
    Code:
        <control>
          <description>channel</description>
          <type>label</type>
          <id>17</id>
          <posX>677</posX>
          <posY>445</posY>
          <label>#TV.Scheduled.Channel</label>
          <align>right</align>
          <font>font13</font>
          <textcolor>FFB2D4F5</textcolor>
          <animation effect="fade" time="250">WindowOpen</animation>
          <animation effect="fade" time="250">WindowClose</animation>
        </control>
    I found that #TV.Scheduled.Channel property does not work.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Works fine here in both B3W and Maya. What are you expecting to see, and what do you see? Maybe a screenshot would help...
     

    rivera

    Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    Screenshot is attached
     

    Attachments

    • Безымянный.JPG
      Безымянный.JPG
      156 KB

    rivera

    Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    If you change skin like this:
    Code:
        <control>
          <description>channel</description>
          <type>label</type>
          <id>17</id>
          <posX>462</posX>
          <posY>520</posY>
          <label>Channel is here</label>
    <!--      <label>#TV.Scheduled.Channel</label>	-->
          <align>right</align>
          <font>font13</font>
          <textcolor>FFB2D4F5</textcolor>
          <animation effect="fade" time="250">WindowOpen</animation>
          <animation effect="fade" time="250">WindowClose</animation>
        </control>
    you will see next screenshot.
    BTW, it is also clear that position of the label set incorrectly.
     

    Attachments

    • dad.JPG
      dad.JPG
      158.8 KB

    rivera

    Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    pilehave
    Seems strange...
    In my setup it does not work.
    It also does not work in XFactor skin - although this skin contains same code.
     

    rivera

    Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    I am absolutely sure that there is a bug in MP.
    That why properties #TV.scheduled.channel & #TV.scheduled.thumb are not working.

    Check TvEngine3/TVLibrary/TvPlugin/TvPlugin/TVScheduler.cs:
    Code:
       private void SetProperties(Schedule rec)
     1185     {
     1186       string strTime = String.Format("{0} {1} - {2}",
     1187                                      Utils.GetShortDayString(rec.StartTime),
     1188                                      rec.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
     1189                                      rec.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
     1190 
     1191       GUIPropertyManager.SetProperty("#TV.RecordedTV.Title", rec.ProgramName);
     1192       GUIPropertyManager.SetProperty("#TV.RecordedTV.Genre", "");
     1193       GUIPropertyManager.SetProperty("#TV.RecordedTV.Time", strTime);
     1194       GUIPropertyManager.SetProperty("#TV.RecordedTV.Description", "");
     1195 
     1196       if (rec.IdChannel < 0)
     1197       {
     1198         GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", "defaultVideoBig.png");
     1199       }
     1200       else
     1201       {
     1202         string strLogo = Utils.GetCoverArt(Thumbs.TVChannel, rec.ReferencedChannel().DisplayName);
     1203         if (File.Exists(strLogo))
     1204         {
     1205           GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", strLogo);
     1206         }
     1207         else
     1208         {
     1209           GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", "defaultVideoBig.png");
     1210         }
     1211       }
     1212     }
     1213 
     1214     public void SetProperties(Schedule schedule, Program prog)
     1215     {
     1216       GUIPropertyManager.SetProperty("#TV.Scheduled.Title", String.Empty);
     1217       GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", String.Empty);
     1218       GUIPropertyManager.SetProperty("#TV.Scheduled.Time", String.Empty);
     1219       GUIPropertyManager.SetProperty("#TV.Scheduled.Description", String.Empty);
     1220       GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", String.Empty);
     1221       GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", String.Empty);
     1222 
     1223       if (prog != null)
     1224       {
     1225         GUIPropertyManager.SetProperty("#TV.Scheduled.Title", TVUtil.GetDisplayTitle(prog));
     1226         GUIPropertyManager.SetProperty("#TV.Scheduled.Description", prog.Description);
     1227         GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", prog.Genre);
     1228       }
     1229 
     1230       if (schedule != null)
     1231       {
     1232         string strTime = String.Format("{0} {1} - {2}",
     1233                                        Utils.GetShortDayString(schedule.StartTime),
     1234                                        schedule.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
     1235                                        schedule.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
     1236 
     1237         GUIPropertyManager.SetProperty("#TV.Scheduled.Time", strTime);
     1238 
     1239         if (schedule.IdChannel < 0)
     1240         {
     1241           GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", schedule.ReferencedChannel().DisplayName);
     1242           string logo = Utils.GetCoverArt(Thumbs.TVChannel, schedule.ReferencedChannel().DisplayName);
     1243           if (File.Exists(logo))
     1244           {
     1245             GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", logo);
     1246           }
     1247           else
     1248           {
     1249             GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", "defaultVideoBig.png");
     1250           }
     1251         }
     1252         else
     1253         {
     1254           GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", "defaultVideoBig.png");
     1255         }
     1256       }
     1257     }
    Two overloaded methods, but with diffrent handling of "idChannel" property.
    I think that the second method has incorrect logic.
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    Could you try with this dll and report if it helps or not
     

    Attachments

    • TvPlugin.rar
      30.6 KB

    rivera

    Retired Team Member
  • Premium Supporter
  • December 1, 2008
    237
    21
    Home Country
    Russian Federation Russian Federation
    So, this is an initial state (original TvPlugin + original Blue3Wide).
    I can see this:


    Then I added this code into "mytvschedulerServer.xml":
    Code:
    <control>
    	<description>channel</description>
    	<type>label</type>
    	<id>0</id>
    	<posX>20</posX>
    	<align>left</align>
    	<posY>450</posY>
    	<label>Channel = #TV.Scheduled.Channel</label>
    	<font>font13</font>
    	<textcolor>FFB2D4F5</textcolor>
    </control>
    <control>
    	<type>image</type>
    	<id>0</id>
    	<posX>20</posX>
    	<posY>500</posY>
    	<width>100</width>
    	<height>100</height>
    	<texture>#TV.Scheduled.thumb</texture>
    </control>
    Then I see this:


    After replacing TvPlugin:


    A weirdly placed label with right alignment = is also channel's name (now it is visible).

    Well done, romuz!
    What did you change in TvPlugin?
    Did you replace
    Code:
    if (schedule.IdChannel < 0)
    with
    Code:
    if (schedule.IdChannel >= 0)
    or similar?
     

    Users who are viewing this thread

    Top Bottom