Commit Graph
3 Commits
Author SHA1 Message Date
yusufipek 1e1c092055 Follow the redirect when a handle resolves to a legacy vanity address
Channels that still carry an old custom URL do not resolve in one step:
navigation/resolve_url answers @MesutCevik with a urlEndpoint pointing at
youtube.com/mesutcevik, and only that second address carries the browseId.
resolveChannel handled a urlEndpoint only when it already contained /channel/,
so those channels threw "kanal çözülemedi" and none of their cards ever got a
badge, anywhere on the site. It now follows an internal redirect up to three
hops.

Search results put a dozen cards from the same channel on screen at once. The
store read that fronts the handle cache is async, so every one of them missed
the cache and asked for the same resolution separately, which the extra hop
would have doubled. Cards now share the in-flight request, the same way
OBScore.baseline already shares a baseline fetch.
2026-08-22 15:35:21 +03:00
yusufipek 3e70662ef8 Score cards and the watch panel again after the player endpoint closed
YouTube now answers the InnerTube `player` endpoint with LOGIN_REQUIRED for
requests that carry no session, and the extension deliberately sends none.
`videoDetails` therefore returned nothing for almost every video, which broke
two things at once: cards on channel pages, where YouTube omits the channel
link because you are already on the channel, and the watch page panel, which
starts every render with that same call.

`next` returns the channel id and the exact view count without a session, so
videoDetails reads from there instead. A live stream reports "watching now" in
the same field, so that text is filtered out rather than read as a view count.

Channel pages no longer need the fallback at all: the cards belong to the
channel in the address bar, so pageChannel() reads it from the URL. That also
drops one request per card.

The panel took the video length from the player response to tell Shorts apart;
`next` does not carry it, so it comes from the page's own player element.

test/check.js probed videoDetails with dQw4w9WgXcQ, which keeps answering even
on the broken endpoint and kept the suite green through all of this. It now
probes a current video from the channel it just listed, and asserts the view
count as well as the channel id.
2026-08-22 15:20:40 +03:00
yusufipek 0d5a232f08 Outlier score badge on YouTube thumbnails
Scores every card against the median views of its own channel's last N
videos, badging the thumbnail above the duration stamp. Shorts and regular
videos are scored in separate pools, live streams in none. Baselines come
from YouTube's InnerTube endpoint, one request per channel, cached a day.
Interface in English and Turkish.
2026-08-15 10:32:29 +03:00