Pandora Plugin not advancing to the next song (6 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,227
    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
    61
    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,633
    2,457
    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,578
    8,227
    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
    61
    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

    The only changes I see are: Updated Marcel Groothuis version of the plugin to now support Media Portal 2.5 I can't say anything about the functionality of this plugin, I don't use TV Part, but if there are any changes that can be simply transferred, then I can try. But I can't give any guarantees.
    The only changes I see are: Updated Marcel Groothuis version of the plugin to now support Media Portal 2.5 I can't say anything...
    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
    15
    Views
    2K
    First thing to say is that I use MP1, whereas I believe that you use MP2. @ge2301 has just posted that MP2 has a "folder view" in addition to the "library view", so you should be able to set up your system as I describe below, but the details will differ. In MP1, the folders that are to appear on the "Videos" panel are defined in "MP...
    First thing to say is that I use MP1, whereas I believe that you use MP2. @ge2301 has just posted that MP2 has a "folder view" in...
    Help Please. Yesterday upon switch-on, I had this issue with MP2: When I clicked on the [REC] icon in the following Image...
    Replies
    18
    Views
    1K
    • Sticky
    @ltfearme @m3rcury @Edalex
    @ltfearme @m3rcury @Edalex
    Due to the release of the x64 version, and the need to recompile plugins, we have created a separate repository (for plugins that...
    Replies
    1
    Views
    1K
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs have played. If I press Next, it will start playing the next song. This happens with BASS and Wasapi players. It does not happen if I use Internal dshow player (which doesn't sound as good as either of...
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs...
    Playing audio cd's keeps stopping at random in the middle of songs. It can happen on the first song or sometimes after a few songs...
    Replies
    0
    Views
    758
    The UseSSL trick made MediaPortal great again, thanks.
    The UseSSL trick made MediaPortal great again, thanks.
    Hi, Trakt has work perfectly for me for over 10 years, but for some reason this week it will not Authorize my account. I can log...
    Replies
    10
    Views
    980
    Top Bottom