[Bug] - TV scheduler: Channel's name not displayed

Discussion in 'MediaPortal 1.1.0 RC 1 & 2' started by rivera, April 13, 2010.

  1. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    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 (Text):
    1.     <control>
    2.       <description>channel</description>
    3.       <type>label</type>
    4.       <id>17</id>
    5.       <posX>677</posX>
    6.       <posY>445</posY>
    7.       <label>#TV.Scheduled.Channel</label>
    8.       <align>right</align>
    9.       <font>font13</font>
    10.       <textcolor>FFB2D4F5</textcolor>
    11.       <animation effect="fade" time="250">WindowOpen</animation>
    12.       <animation effect="fade" time="250">WindowClose</animation>
    13.     </control>
    I found that #TV.Scheduled.Channel property does not work.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    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...
     
  4. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    Home Country:
    Russian Federation Russian Federation
    Screenshot is attached
     

    Attached Files:

  5. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    This is what I see, and how it should look:
     

    Attached Files:

    • shot.png
      shot.png
      File size:
      438.6 KB
      Uploaded:
      April 13, 2010
      Views:
      140
  6. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    Home Country:
    Russian Federation Russian Federation
    If you change skin like this:
    Code (Text):
    1.     <control>
    2.       <description>channel</description>
    3.       <type>label</type>
    4.       <id>17</id>
    5.       <posX>462</posX>
    6.       <posY>520</posY>
    7.       <label>Channel is here</label>
    8. <!--      <label>#TV.Scheduled.Channel</label>  -->
    9.       <align>right</align>
    10.       <font>font13</font>
    11.       <textcolor>FFB2D4F5</textcolor>
    12.       <animation effect="fade" time="250">WindowOpen</animation>
    13.       <animation effect="fade" time="250">WindowClose</animation>
    14.     </control>
    you will see next screenshot.
    BTW, it is also clear that position of the label set incorrectly.
     

    Attached Files:

    • dad.JPG
      dad.JPG
      File size:
      158.8 KB
      Uploaded:
      April 13, 2010
      Views:
      232
  7. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    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.
     
  8. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    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 (Text):
    1.    private void SetProperties(Schedule rec)
    2.  1185     {
    3.  1186       string strTime = String.Format("{0} {1} - {2}",
    4.  1187                                      Utils.GetShortDayString(rec.StartTime),
    5.  1188                                      rec.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
    6.  1189                                      rec.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
    7.  1190
    8.  1191       GUIPropertyManager.SetProperty("#TV.RecordedTV.Title", rec.ProgramName);
    9.  1192       GUIPropertyManager.SetProperty("#TV.RecordedTV.Genre", "");
    10.  1193       GUIPropertyManager.SetProperty("#TV.RecordedTV.Time", strTime);
    11.  1194       GUIPropertyManager.SetProperty("#TV.RecordedTV.Description", "");
    12.  1195
    13.  1196       if (rec.IdChannel < 0)
    14.  1197       {
    15.  1198         GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", "defaultVideoBig.png");
    16.  1199       }
    17.  1200       else
    18.  1201       {
    19.  1202         string strLogo = Utils.GetCoverArt(Thumbs.TVChannel, rec.ReferencedChannel().DisplayName);
    20.  1203         if (File.Exists(strLogo))
    21.  1204         {
    22.  1205           GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", strLogo);
    23.  1206         }
    24.  1207         else
    25.  1208         {
    26.  1209           GUIPropertyManager.SetProperty("#TV.RecordedTV.thumb", "defaultVideoBig.png");
    27.  1210         }
    28.  1211       }
    29.  1212     }
    30.  1213
    31.  1214     public void SetProperties(Schedule schedule, Program prog)
    32.  1215     {
    33.  1216       GUIPropertyManager.SetProperty("#TV.Scheduled.Title", String.Empty);
    34.  1217       GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", String.Empty);
    35.  1218       GUIPropertyManager.SetProperty("#TV.Scheduled.Time", String.Empty);
    36.  1219       GUIPropertyManager.SetProperty("#TV.Scheduled.Description", String.Empty);
    37.  1220       GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", String.Empty);
    38.  1221       GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", String.Empty);
    39.  1222
    40.  1223       if (prog != null)
    41.  1224       {
    42.  1225         GUIPropertyManager.SetProperty("#TV.Scheduled.Title", TVUtil.GetDisplayTitle(prog));
    43.  1226         GUIPropertyManager.SetProperty("#TV.Scheduled.Description", prog.Description);
    44.  1227         GUIPropertyManager.SetProperty("#TV.Scheduled.Genre", prog.Genre);
    45.  1228       }
    46.  1229
    47.  1230       if (schedule != null)
    48.  1231       {
    49.  1232         string strTime = String.Format("{0} {1} - {2}",
    50.  1233                                        Utils.GetShortDayString(schedule.StartTime),
    51.  1234                                        schedule.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
    52.  1235                                        schedule.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
    53.  1236
    54.  1237         GUIPropertyManager.SetProperty("#TV.Scheduled.Time", strTime);
    55.  1238
    56.  1239         if (schedule.IdChannel < 0)
    57.  1240         {
    58.  1241           GUIPropertyManager.SetProperty("#TV.Scheduled.Channel", schedule.ReferencedChannel().DisplayName);
    59.  1242           string logo = Utils.GetCoverArt(Thumbs.TVChannel, schedule.ReferencedChannel().DisplayName);
    60.  1243           if (File.Exists(logo))
    61.  1244           {
    62.  1245             GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", logo);
    63.  1246           }
    64.  1247           else
    65.  1248           {
    66.  1249             GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", "defaultVideoBig.png");
    67.  1250           }
    68.  1251         }
    69.  1252         else
    70.  1253         {
    71.  1254           GUIPropertyManager.SetProperty("#TV.Scheduled.thumb", "defaultVideoBig.png");
    72.  1255         }
    73.  1256       }
    74.  1257     }
    75.  
    Two overloaded methods, but with diffrent handling of "idChannel" property.
    I think that the second method has incorrect logic.
     
  9. romuz
    • Team MediaPortal

    romuz Retired Team Member

    Joined:
    July 26, 2008
    Messages:
    1,045
    Likes Received:
    125
    Location:
    Moskau
    Ratings:
    +126 / 0
    Home Country:
    Russian Federation Russian Federation
    Could you try with this dll and report if it helps or not
     

    Attached Files:

    • TvPlugin.rar
      File size:
      30.6 KB
      Uploaded:
      May 19, 2010
      Views:
      104
  10. rivera
    • Team MediaPortal

    rivera Retired Team Member

    Joined:
    December 1, 2008
    Messages:
    237
    Likes Received:
    21
    Ratings:
    +21 / 0
    Home Country:
    Russian Federation Russian Federation
    So, this is an initial state (original TvPlugin + original Blue3Wide).
    I can see this:
    [​IMG]

    Then I added this code into "mytvschedulerServer.xml":
    Code (Text):
    1. <control>
    2.     <description>channel</description>
    3.     <type>label</type>
    4.     <id>0</id>
    5.     <posX>20</posX>
    6.     <align>left</align>
    7.     <posY>450</posY>
    8.     <label>Channel = #TV.Scheduled.Channel</label>
    9.     <font>font13</font>
    10.     <textcolor>FFB2D4F5</textcolor>
    11. </control>
    12. <control>
    13.     <type>image</type>
    14.     <id>0</id>
    15.     <posX>20</posX>
    16.     <posY>500</posY>
    17.     <width>100</width>
    18.     <height>100</height>
    19.     <texture>#TV.Scheduled.thumb</texture>
    20. </control>
    Then I see this:
    [​IMG]

    After replacing TvPlugin:
    [​IMG]

    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 (Text):
    1. if (schedule.IdChannel < 0)
    with
    Code (Text):
    1. if (schedule.IdChannel >= 0)
    or similar?
     
  11. romuz
    • Team MediaPortal

    romuz Retired Team Member

    Joined:
    July 26, 2008
    Messages:
    1,045
    Likes Received:
    125
    Location:
    Moskau
    Ratings:
    +126 / 0
    Home Country:
    Russian Federation Russian Federation
    Done similar, now 2 methods works same behavior.
     
    • Like Like x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!