Closed hollandhr closed 3 months ago
Hi @hollandhr . When did you first starting seeing this issue? Is that issue new as of the past week?
Also, how many songs are in the folder name? Would you be able to provide a screenshot of what you type into the extension and what your folder looks like?
The last time it worked was a month ago, then last week I tried and the error appeared. This folder has 56 yt bookmarks, no folders, and other site bookmarks. I tried with other folders (with 400 bookmarks and more) and nothing works. Thanks for looking into it.
Oh, so you're saying nothing in the extension is working for you?
If you right click the extension and click "Inspect Popup", wait for the window to appear, then click the extension button and type in the folder name as you usually would, do any errors appear?
Yes. In the console it says: "ERROR (Playlist Generator): Invalid returnDict.recentPlaylists; resetting both to their default value of empty lists []"
Hi @hollandhr . Just trying to gather a few pieces of information:
Settings -> Help -> About Chrome
. My current version is 125.0.6422.142
.And then as a sanity check, you're using the exact folder name, no whitespace before or after the name, correct? I've been trying to reproduce the issue throughout the past week but haven't been able to do it via new folders, nested folders, Chrome/Firefox, etc., so I'm trying to figure out what might be going wrong.
Sure! Thanks for taking the time to look at it.
The folder passed the sanity check =D
That's fantastic news but also a very odd edge case. By "other bookmarks", are you referring to the "All Bookmarks" folder?
Yes, it's a weird one. But it makes sense since the problem is with recognizing the paths of the bookmarks, no? That's why you said to check the name of the folder, and why I tried moving the folder around. Yes 'all bookmarks', my Chrome is not in English...
No worries haha. But yeah, the problem is around checking the name of the folder. I was able to reproduce the issue by creating a folder under "All Bookmarks" and the same error, "Those folders don't contain any YouTube links", appears.
I went back and checked whether the Chrome Bookmarks API even grants permissions to view "Other Bookmarks"/"All Bookmarks". I think this is what is happening when I call bookmarks.getTree()
:
Chrome [Bookmarks Manager] getTree()
-> Bookmarks Manager (0th element)
-> [Bookmarks bar, Other bookmarks] (children)
-> Bookmarks bar (0th element)
-> [x1, x2, x3, ..., xN] (the children a.k.a. all items on bookmarks bar)
When looking through the code, I currently do the following:
var bookmarksTree = chrome.bookmarks.getTree();
var bookmarksNodes = bookmarksTree[0]["children"];
var bookmarksBar = bookmarksNodes[0]; // 0th index is BookmarksBar, 1st index is "Other Bookmarks"
If you'll notice, I only pull out the bookmarks bar but not the Other Bookmarks. I think I need to update this code to loop over both. The plan is to make this change and test it out sometime this week and push out a release.
Interesting, so 'Other bookmarks' is not a child of 'Bookmarks bar' but another node... Why not pull out the whole 'tree' instead of pulling each one and iterating over both?
Yeah, that's correct and a totally valid question as well. In general, the extension was originally built for my use-cases and I didn't know if 1) Other/All Bookmarks was a temporary feature or if it would remain for years into the future (which we've seen is the case here), 2) whether Other/All bookmarks was even being used by anybody (I store all my folders on the bookmarks bar itself), and 3) whether Other/All bookmarks would add some niche technical functionality that would introduce some breaking changes for the extension.
On that 3rd point, your folder says "Other Bookmarks" but mine says "All Bookmarks". If I assume "All Bookmarks" is a literally just all your bookmarks on the bookmarks bar, but just in a mega-folder, it would be redundant to search for bookmarks in this folder because they'd just have a bunch of duplicates. And second, if at any point they took folders from the bookmarks bar and moved them to "All Bookmarks", then you started using the extension and entered "Music" as your folder name, it would pull the "Music" folder from the bookmarks bar and the "Music" folder from All Bookmarks, resulting in duplicates in your playlist.
With that being said, all the above seem to not be the case and it's safe to use Other/All Bookmarks.
@hollandhr This fix should be deployed within a week to the web store. I've tested it locally and it should be working.
First, love this add-on! The problem is I write a folder name and it just says there are no yt links there, like it doesn't recognize them...