Skip to content

Commit

Permalink
Added notices for broken playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkelM committed Jun 24, 2024
1 parent fb4b2df commit 21282eb
Show file tree
Hide file tree
Showing 9 changed files with 299 additions and 61 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Changelog

## v3.1.4
## v3.1.5

<!--Releasenotes start-->
- Added a news page that can be populated on extension updates.
- Added news that playlist generation is currently broken.
- Changed the default option for generating playlists to be disabled while the feature does not work.
<!--Releasenotes end-->

## v3.1.4

- Fixed an animation in the popup.
- Fixed the progress percentage displayed on the button when ignoring or only shuffling from shorts.
<!--Releasenotes end-->

## v3.1.3

Expand Down
258 changes: 203 additions & 55 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.4",
"version": "3.1.5",
"description": "Customize, shuffle and play random videos from any YouTube channel.",
"scripts": {
"dev": "concurrently \"npm run dev:chromium\" \"npm run dev:firefox\"",
Expand Down
5 changes: 5 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ async function handleExtensionUpdate(manifestData, previousVersion) {
}

async function handleVersionSpecificUpdates(previousVersion) {
// v3.1.5 added a notice for people using playlists
if (previousVersion < "3.1.5") {
await chrome.tabs.create({ url: chrome.runtime.getURL("html/breakingNews.html") });
}

// v3.0.1 changed the data type for the shuffleIgnoreShortsOption from boolean to number
if (previousVersion < "3.0.1") {
console.log("Updating sync storage to v3.0.1 format...", true);
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const configSyncDefaults = {
"shuffleReUseNewTabOption": true,
// 0 = only shorts, 1 = no option set (shorts are included), 2 = ignore shorts
"shuffleIgnoreShortsOption": 1,
"shuffleOpenAsPlaylistOption": true,
"shuffleOpenAsPlaylistOption": false,
// 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: 6 additions & 0 deletions src/html/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ 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
Loading

0 comments on commit 21282eb

Please sign in to comment.