Merge pull request #728 from dlahoti/patch-1

sort items to play in the correct order when sending to Chromecast
This commit is contained in:
dkanada 2020-02-01 20:35:17 +09:00 committed by GitHub
commit 51cece9c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -686,6 +686,13 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
}); });
} }
if (options.items.length > 1 && options && options.ids) {
// Use the original request id array for sorting the result in the proper order
options.items.sort(function (a, b) {
return options.ids.indexOf(a.Id) - options.ids.indexOf(b.Id);
});
}
return this._castPlayer.loadMedia(options, command); return this._castPlayer.loadMedia(options, command);
}; };