Struggling with GUIInfoManager
#1
Exclamation 
Currently I’m trying to map Disc-Number of played audio file to a new Info-Label in GUIInfoManager. I added
Code:
#define MUSICPLAYER_DISC_NUMBER 209
and count up all following MUSICPLAYER_* entries. I extended TranslateSingleString with
Code:
else if (strTest.Equals("musicplayer.discnumber")) ret = MUSICPLAYER_DISC_NUMBER;
and GetMusicLabel with
Code:
case MUSICPLAYER_DISC_NUMBER:
    {
      CStdString strDisc;
      if (tag.Loaded() && tag.GetDiscNumber() > 0)
      {
        strDisc.Format("%02i", tag.GetDiscNumber());
        return strDisc;
      }
    }
    break;

I added some test MP3-files to database and used $INFO[MusicPlayer.DiscNumber] in skin to fetch disc information.
But it does not work as expected Sad . I get no result… At the moment I’m stuck at this point.

Does anyone have an idea where my error is?
Reply
#2
It doesn't call GetMusicLabel() as you haven't added the case MUSIC_PLAYER_DISC_NUMBER: to GetLabel()

Please up a patch when you're done Smile

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
I added needed code to GetLabel(), but no change anyway.
I'll add some debug code when I'm back home this evening...
Reply
#4
Also, note that:

#define MUSICPLAYER_DURATION 209

209 is already defined. Perhaps you're wanting 218 or higher?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Got it. Patch is created, ID 1574092.
Thx for your help!

Now I'll see what to add next Wink
Reply
#6
I reworked the Patch a bit:

- added support for new Infolabel to python lib
(not tested but should work)
- added support for DiscNumber to paplayer

Crossfade currently did not take care of DiscNumber.
Example:

- Crossfade enabled
- Albumcrossfade disabled

Playlist looks like:
| Track | Disc | Title | Artist |
-----------------------------
| 1 | 1 | No. 1 | Freaks |\
| 2 | 1 | No. 2 | Freaks | - No Fade. Correct!
-----------------------------
| 1 | 1 | No. 1 | Freaks |\
| 2 | 2 | Op. 1 | Freaks | - No Fade. Wrong!

Patch changes this to:
| Track | Disc | Title | Artist |
-----------------------------
| 1 | 1 | No. 1 | Freaks |\
| 2 | 1 | No. 2 | Freaks | - No Fade. Correct!
-----------------------------
| 1 | 1 | No. 1 | Freaks |\
| 2 | 2 | Op. 1 | Freaks | - Fade. Correct!
Reply

Logout Mark Read Team Forum Stats Members Help
Struggling with GUIInfoManager0