Skip to content

Commit

Permalink
Reverted UI changes made while the playlist generation feature was br…
Browse files Browse the repository at this point in the history
…oken (#304)
  • Loading branch information
NikkelM authored Jun 26, 2024
1 parent 5b54fbf commit 5377eb7
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v3.1.6

<!--Releasenotes start-->
- Reverted UI changes made while the playlist generation feature was broken.
- Removed hints from the breaking news page.
<!--Releasenotes end-->

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "random-youtube-video",
"version": "3.1.5",
"version": "3.1.6",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"scripts": {
"dev": "concurrently \"npm run dev:chromium\" \"npm run dev:firefox\"",
Expand Down
3 changes: 1 addition & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export const configSyncDefaults = {
"shuffleReUseNewTabOption": true,
// 0 = only shorts, 1 = no option set (shorts are included), 2 = ignore shorts
"shuffleIgnoreShortsOption": 1,
// TODO: Revert when fixed
"shuffleOpenAsPlaylistOption": false,
"shuffleOpenAsPlaylistOption": true,
// How many random videos to add to a playlist (0-50)
"shuffleNumVideosInPlaylist": 10,
// If shuffled videos are opened in a new tab, save the tab ID of that tab here to reuse the tab when the user shuffles again
Expand Down
6 changes: 0 additions & 6 deletions src/html/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,6 @@ async function setPopupDomElementEventListeners(domElements) {
await setSyncStorageValue("shuffleOpenAsPlaylistOption", this.checked);

manageDependents(domElements, domElements.shuffleOpenAsPlaylistOptionToggle, this.checked);

// TODO: Revert when fixed
// v3.1.5: Playlist generation may be broken, open an overlay in the popup
if (this.checked) {
alert("A recent change to YouTube has broken playlist generation.\nThis feature may not work until the behaviour is fixed.");
}
});

// Shuffling: Number of videos in playlist input
Expand Down
7 changes: 0 additions & 7 deletions static/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ <h3>Shuffle Settings</h3>
</label>
</div>

<!-- TODO: Remove when fixed -->
<div class="optionsRow-item">
<p style="color: #c32e04;" title="As of June 26th 2024, automatic playlist generation using these options may not work for you. A change to YouTube broke the generation method the extension uses, and there currently is no other known way to create this behaviour. If YouTube reverts the change or another method is found, the extension will receive an update as soon as possible.">
YouTube recently broke playlists, these options may not work!
</p>
</div>

<!-- Shuffling: Open as playlist number of videos input -->
<div id="shuffleNumVideosInPlaylistDiv" class="optionsRow-item optionTextInput" title="Choose how many videos should be in the playlist when shuffling. YouTube limits the number of videos in this playlist type to 50. With higher values the shuffle may take slightly longer than usual.">
<p>Videos in playlist:</p>
Expand Down
4 changes: 2 additions & 2 deletions static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Random YouTube Video",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"version": "3.1.5",
"version_name": "3.1.5",
"version": "3.1.6",
"version_name": "3.1.6",
"manifest_version": 3,
"content_scripts": [
{
Expand Down
2 changes: 0 additions & 2 deletions test/shuffleVideo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,6 @@ describe('shuffleVideo', function () {

await chooseRandomVideo(input.channelId, false, domElement);

console.log(windowOpenStub.args[0][0])

const chosenVideos = windowOpenStub.args[0][0].split('video_ids=')[1].split(',');

// Depending on the activeOption, make sure that only videos that match the filter are chosen
Expand Down

0 comments on commit 5377eb7

Please sign in to comment.