mirror of
https://github.com/yusufipk/YouTubeOutlierBadge.git
synced 2026-09-11 10:56:14 +00:00
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.
This commit is contained in:
@@ -120,6 +120,13 @@ OBTube.channelTab(CHANNEL, "videos", 30).then((items) => {
|
||||
return OBTube.resolveChannel("@LinusTechTips");
|
||||
}).then((id) => {
|
||||
eq(id, CHANNEL, "handle -> kanal kimliği");
|
||||
return OBTube.resolveChannel("@MesutCevik");
|
||||
}).then((id) => {
|
||||
/* Eski özel adresi olan bir kanal: YouTube @handle'ı önce
|
||||
* youtube.com/mesutcevik adresine yolluyor, kimlik ancak ikinci adımda
|
||||
* geliyor. Tek adımda çözen kod bu kanallarda "kanal çözülemedi" veriyor ve
|
||||
* o kanalın hiçbir kartı puanlanmıyordu. */
|
||||
eq(id, "UCOFafpmI_dt8SxisbKniN4A", "yönlendirmeli handle -> kanal kimliği");
|
||||
/* Bilerek kanalın güncel bir videosu: sabit bir klasik ("dQw4w9WgXcQ")
|
||||
* YouTube tarafında ayrıcalıklı davranıp uç bozulduğunda bile yanıt
|
||||
* verebiliyor ve testi yanlış yere yeşil gösteriyordu. */
|
||||
|
||||
Reference in New Issue
Block a user