From 5fd5292f6de3213b8460e12bfd51c7fc821953d2 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Wed, 4 Oct 2023 00:29:26 +0300 Subject: [PATCH] Fix playing empty item set --- src/components/playback/playbackmanager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 7cf0bc62eb5..ecb09234f7e 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -1734,6 +1734,8 @@ class PlaybackManager { } function translateItemsForPlayback(items, options) { + if (!items.length) return Promise.resolve([]); + if (items.length > 1 && options && options.ids) { // Use the original request id array for sorting the result in the proper order items.sort(function (a, b) {