Problem with GUIControl.SetControlLabel on label controls (1 Viewer)

mackey

Retired Team Member
  • Premium Supporter
  • May 1, 2006
    456
    177
    right there
    Home Country
    Denmark Denmark
    MediaPortal Version: MP 1.00 RC3
    MediaPortal Skin: Blue3 and others
    Windows Version: Vista professional

    Hi MP devs,

    I have problems fixing a bug in the MyLyrics plugin.

    The bug shows when handling LRC-files inside MyLyrics as no lyrics text is shown. In LRC mode each line of text in the lyric is supposed to be shown in its own label. There are totally 13 lines in the MyLyrics-skin file.

    However since approx. medio February 2008 (see first report of this instance here: https://forum.team-mediaportal.com/my-lyrics-plugin-163/lrc-not-displayed-anymore-35518/), something inside the MP gui engine has changed, meaning that each label is always left empty when I try to write to it using the GUIControl.SetControlLabel(page id, control id, text) method. As stated in the bug report by sdf the change in MP that causes this misbehavoir in MyLyrics was introduced in a SVN following 0.2.3.0.

    The MyLyrics code hasn't changed since November 2007 and I have debugging my code for hours without finding any issues here. I do use the SetControlLabel method for both clearing the labeltext (natural done with text = empty string) and setting the actual lyrics text various places.

    I have performed a really simple test that makes me believe that the SetControlLabel method in some circumstances always clears the label instead of updating the text. The test is:
    1. I place a test button in the mylyrics skin witht the default text "Test"
    2. I call the following method GUIControl.SetControlLabel(GetID, 2157, lines[0]) in my code (the same place where the labels in MyLyrics is supposed to be updated)
    3. First I call MyLyrics when playing a song with a normal lyric attached (one that isn't lrc) and the normal lyric page is shown. The part of the code with the above statement is accordingly NOT called AND I can see the label with the text "Test"
    4. Then I call MyLyrics when plaing a song with a lrc lyrics attached and the special LRC page is shown. The part of the code with above statement is according CALLED and suddenly the text "Text" isn't shown any longer.

    Note that the label is left with an empty labeltext and that the label hasn't set to be hidden (in the test I have various times called GUIControl.ShowControl(GetID, 2157) just be sure). Also the problem occurs for all tested skins (Blue2, Blue3, Indigo, and Xface).

    Does anybody have a clue what could have been changed in February causing the trouble updating the labels as mentioned above?

    It will natural help if I could jump into the SetControlLabel method but I haven't got access to the MP SVN (no valid user name / pw).

    Please contact me for source if you will have a look at this strange phenomenal. I dont believe I cannot sort this out myself inside the boundaries of the plugin.

    best regards
    Soren
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Hi!

    What exactly does a text look like if it is in .lrc format?

    P.S.: I guess "Bavarian" has the best knowledge of the GUI controls and what has changed there.

    Regards,
    Ralf
     

    mackey

    Retired Team Member
  • Premium Supporter
  • May 1, 2006
    456
    177
    right there
    Home Country
    Denmark Denmark
    Hi rtv,

    A lrc-file consists of lines of the format:
    [mm:ss.xx] lyrics line
    which basically is the lyrics line combined with a timestamp representing when the line is sung in the song.

    for more info: LRC (file format) - Wikipedia, the free encyclopedia

    Anyhow, the understanding of lrc-files is not necessary to resolve the failure, so don't worry to much about this format. :)

    But thanks I'll contact Bavarian and ask him to have a look.

    regards
     

    Users who are viewing this thread

    Top Bottom