player.getFastNextTrack() causes crash

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: player.getFastNextTrack() causes crash

Re: player.getFastNextTrack() causes crash

by drakinite » Tue Nov 03, 2020 9:53 am

Ah, I see, thanks for the info.

Re: player.getFastNextTrack() causes crash

by MiPi » Tue Nov 03, 2020 9:24 am

This function accepts variable containing undefined value or already value with track object, nothing else (like empty object). "Fast" functions are made for situations, where speed is crucial, it is significantly faster to refill existing JS object with another data of the same type (like track in this case), instead of creating whole new large object from scratch.
Anyway, this function will be probably removed soon, fast version is not needed here. It is good when processing many objects of one type, but it has disadvantage, the contents persist only for a while, so it cannot be saved and used later, it can already contain different data. I will introduce function getNextTrack instead, returning track object or undefined value, when next track is not known (end of playing list or when shuffle is active).

player.getFastNextTrack() causes crash

by drakinite » Mon Nov 02, 2020 10:34 am

I'm trying to access the next-playing track; and the API reference says that I should pass an object to player.getFastNextTrack().
https://www.mediamonkey.com/webhelp/MM5 ... tNextTrack

But when I do that, MM crashes.

Code: Select all

var x = {};
app.player.getFastNextTrack(x);
Log ID is 8E41A144

** Passing an undefined variable seems to work, but passing an empty object causes the crash.**

Top