Pandora Plugin not advancing to the next song (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    @hwahrmann
    One thing I notice that I think is a bit odd...
    [collapse]
    [2015-07-06 20:36:39,379] [Log ] [BASS X-Fade] [DEBUG] - BASS: X-Fading out stream http://audio-ch1-t1-1-v4v6.pandora.com/access/568503232955461445.mp4?version=4&lid=338947483&token=G0/BLuaqgInSMGXZpANjh5kc3EmYwY+r4RK0gShlj3dWAazmuP5wM9EdRwJGzVMtsJt69fCV9AMpqdwjfhHaMmapNLOrxLRxjly6PaPCTQIWFb3bmWLMSQd5yV/tVJNBy6rwrC9bBRfQVeui14UUcUQ6Z1c/t8A8LFwwlqx7z1sxmWIEZXAGjScOOmJ6AfNvPhaQeaRLM5Rag5VgOYQTbCukhP9IOSnB4Xa620VROeHnTtAevEvsT1Vb6qyEN4qCTBOKF5+nWYZs6EroaJ8jgv5FrHO34JDtV+S8/jScIDDA/mPqN87eDlrDya5z1kuko5J2w+364jde6SLyCh6wq6rD2He4nhDT4/us8JcJ5YeN8AZ3ElHw9wT11LV10FRY
    [2015-07-06 20:36:39,381] [Log ] [21 ] [DEBUG] - BASS: End of Song http://audio-ch1-t1-1-v4v6.pandora.com/access/568503232955461445.mp4?version=4&lid=338947483&token=G0/BLuaqgInSMGXZpANjh5kc3EmYwY+r4RK0gShlj3dWAazmuP5wM9EdRwJGzVMtsJt69fCV9AMpqdwjfhHaMmapNLOrxLRxjly6PaPCTQIWFb3bmWLMSQd5yV/tVJNBy6rwrC9bBRfQVeui14UUcUQ6Z1c/t8A8LFwwlqx7z1sxmWIEZXAGjScOOmJ6AfNvPhaQeaRLM5Rag5VgOYQTbCukhP9IOSnB4Xa620VROeHnTtAevEvsT1Vb6qyEN4qCTBOKF5+nWYZs6EroaJ8jgv5FrHO34JDtV+S8/jScIDDA/mPqN87eDlrDya5z1kuko5J2w+364jde6SLyCh6wq6rD2He4nhDT4/us8JcJ5YeN8AZ3ElHw9wT11LV10FRY
    [2015-07-06 20:36:43,382] [Log ] [BASS X-FadeEnded] [DEBUG] - BASS: Fading of stream finished.
    [2015-07-06 20:36:43,858] [Log ] [21 ] [DEBUG] - BASS: Disposing Music Stream http://audio-ch1-t1-1-v4v6.pandora.com/access/568503232955461445.mp4?version=4&lid=338947483&token=G0/BLuaqgInSMGXZpANjh5kc3EmYwY+r4RK0gShlj3dWAazmuP5wM9EdRwJGzVMtsJt69fCV9AMpqdwjfhHaMmapNLOrxLRxjly6PaPCTQIWFb3bmWLMSQd5yV/tVJNBy6rwrC9bBRfQVeui14UUcUQ6Z1c/t8A8LFwwlqx7z1sxmWIEZXAGjScOOmJ6AfNvPhaQeaRLM5Rag5VgOYQTbCukhP9IOSnB4Xa620VROeHnTtAevEvsT1Vb6qyEN4qCTBOKF5+nWYZs6EroaJ8jgv5FrHO34JDtV+S8/jScIDDA/mPqN87eDlrDya5z1kuko5J2w+364jde6SLyCh6wq6rD2He4nhDT4/us8JcJ5YeN8AZ3ElHw9wT11LV10FRY
    ']
    '][/collapse]


    ...then later...
    [2015-07-06 20:37:19,319] [Log ] [MPMain ] [DEBUG] - g_Player.doStop() keepTimeShifting = False keepExclusiveModeOn = False
    [2015-07-06 20:37:19,319] [Log ] [MPMain ] [INFO ] - g_Player.OnStopped()

    So, it looks like BASS notices the end of the stream is reached, but the player doesn't realise it has stopped (???). Key point is that there is no g_Player.OnEnded() notification. From the code, I think the Pandora plugin may rely on that notification in order to start the next song.

    Any thoughts?
     

    Cam

    Portal Pro
    February 28, 2012
    360
    97
    63
    Georgia
    Home Country
    United States of America United States of America
    Oh Ok,
    The reason I didn't mention it is because it was the 1st time it happen that I know of and you know computers are, sometimes things don't flow like they should ..... do a reboot all is well until the next time.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,630
    2,462
    Vienna, Austria
    Home Country
    Austria Austria
    No, haven't seen that.
    i guess you are right that Pandora needs to get a player ended events.

    i just wonder how the Bassd player was able to detect end of stream on a http resource.
    This should never happen.
    I never used this plugin. do we need credentials for running it?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    In case it helps, you can see the relevant code here:
    http://pandora-musicbox.googlecode.com/svn/trunk/Source/MediaPortalPlugin/GUI/MusicBoxGUI.cs

    Code:
    private void OnPlayBackEnded(g_Player.MediaType type, string filename) {
      try {
        if (!initialized || handlingEvent) return;
        handlingEvent = true;
    
        if (Core.MusicBox.CurrentSong != null && filename == Core.MusicBox.CurrentSong.AudioURL) {
          logger.Debug("Playback ended for current Pandora song.");
          setWorkingAnimationStatus(true);
          PlayNextTrack();
          setWorkingAnimationStatus(false);
        }
      }
      catch (Exception ex) {
        GracefullyFail(ex);
      }
      finally {
        handlingEvent = false;
      }
    }

    And in Init():
    Code:
    g_Player.PlayBackEnded += new g_Player.EndedHandler(OnPlayBackEnded);

    So, the plugin is triggered to play the next track when the current one finishes.

    The log shows that this function is being called by BASS:
    https://github.com/MediaPortal/Medi...tal/Core/MusicPlayer/BASS/MixerStream.cs#L845

    That function notifies the audio engine to start crossfading:
    https://github.com/MediaPortal/Medi...Core/MusicPlayer/BASS/BassAudioEngine.cs#L533

    There should not be any next song queued so I don't understand why the log says "BASS: Fading of stream finished." instead of the expected "BASS: Reached end of playlist.".
     

    Cam

    Portal Pro
    February 28, 2012
    360
    97
    63
    Georgia
    Home Country
    United States of America United States of America
    I can hit the next or skip button on the remote and it will advance to the next song
     

    Users who are viewing this thread

    Similar threads

    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
    I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
    Replies
    7
    Views
    1K
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    656
    As easy as that ;). Restarted HTPC and 'out of memory' errors have disappeared, thank you!
    As easy as that ;). Restarted HTPC and 'out of memory' errors have disappeared, thank you!
    Just installed the MediaPortal 1.37 Pre-Release. Client takes a long time to start up because it is looking for the...
    Replies
    4
    Views
    2K
    I used to use the grabber but a few years back it disappeared on FreeSat DVBS. That is when I changed to EPG Collector. The extra benefit is that it collects from the Sky platform so it will give EPG for all the FreeSat channels plus the unencrypted movie channels on the Sky platform. It also allows me to pick the channels dedicated...
    I used to use the grabber but a few years back it disappeared on FreeSat DVBS. That is when I changed to EPG Collector. The extra...
    Hi everyone, I hope you are all well My Mum's Mediaportal lost it's marbles thanks to Microsoft update, (even though I had update...
    Replies
    2
    Views
    2K
    MP1 supports TVE 3 MP2 supports TVE 3, TVE 3.5 (unstable), TV Mosaic - I think so.
    MP1 supports TVE 3 MP2 supports TVE 3, TVE 3.5 (unstable), TV Mosaic - I think so.
    I am a long-time user of MediaPortal to watch TV. I use the Media Portal TV Server as a backend, and Kodi (previously known as...
    Replies
    19
    Views
    8K
    Top Bottom