diff --git a/src/js/background/collection/streamItems.js b/src/js/background/collection/streamItems.js index 6d70994d..4143ab2e 100644 --- a/src/js/background/collection/streamItems.js +++ b/src/js/background/collection/streamItems.js @@ -240,6 +240,8 @@ if (playOnAdd || options.markFirstActive) { createdStreamItems[0].save({ active: true }); } + + return createdStreamItems; }, deactivateAllExcept: function(changedStreamItem) { @@ -356,10 +358,12 @@ else if (radioEnabled) { var randomRelatedSong = this.getRandomRelatedSong(); - this.addSongs(randomRelatedSong, { + var addedSongs = this.addSongs(randomRelatedSong, { // Mark as active after adding it to deselect other active items and ensure it is visible visually. markFirstActive: true }); + + nextItem = addedSongs[0]; } // If the active item was deleted and there's nothing to advance forward to -- activate the previous item and pause. // This should go AFTER radioEnabled check because it feels good to skip to the next one when deleting last with radio turned on. diff --git a/src/manifest.json b/src/manifest.json index 4c4ed941..a12812e4 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extensionName__", "short_name": "Streamus", - "version": "0.142", + "version": "0.143", "default_locale": "en", "description": "__MSG_extensionDescription__",