-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Channel): Support new about popup #537
Conversation
To fix the issue with conflicting node lists, you can update the export function concatMemos(...iterables: Array<Memo | undefined>): Memo {
const memo = new Memo();
for (const iterable of iterables) {
if (!iterable) continue;
for (const item of iterable) {
// Update existing items.
const memo_item = memo.get(item[0]);
if (memo_item) {
memo.set(item[0], [ ...memo_item, ...item[1] ]);
continue;
}
memo.set(...item);
}
}
return memo;
} Not sure if doing this will cause problems elsewhere though, so you might want to test it by loading some different feeds that use the |
Co-authored-by: LuanRT <[email protected]>
Still needs updates to the check for a continuation in |
The failing test is for the channels tab that YouTube has removed, so it's unrelated to this pull request. |
This is ready for review now :) |
YouTube is getting rid of the about tab on channels with a
C4TabbedHeader
, on the auto-generated game channels they don't seem to be making that change yet (they have anInteractiveTabbedHeader
). On the auto-generated Gaming and Music channels the about tab seems to be gone completely with no replacement.This pull request adds support for the new about popup and integrates it into the existing
has_about
getter andgetAbout()
method on theChannel
class. As the nodes are different, it will require changes on the library users side to handle the new nodes, but at least the getter and the function are the same. Sometimes YouTube doesn't return the about tab, but returns a link to it in the tagline instead of the popup code, so this pull request supports both cases (plus the old one which is still needed on the auto-generated game channels and on the rare occasion that you still get the about tab).Test channels:
UCUQo7nzH1sXVpzL92VesANw
: DIY Perks (user channel)UCvWtix2TtWGe9kffqnwdaMw
: Rihanna - Topic (auto-generated artist channel, same as the user channel but with less information in the about popup)UCQvWX73GQygcwXOTSf_VDVg
: Minecraft - Topic (auto-generated game channel, still has an about tab)closes #536