Commit d1b7b0e
authored
[YoutubeBridge] handle new lockupViewModel layout (#4982)
* [YoutubeBridge] handle new lockupViewModel layout
Feeds with duration_min or duration_max set return zero entries: YouTube
changed the channel /videos listing to wrap each item in lockupViewModel
instead of videoRenderer, and the bridge no longer recognises the
shape. Items fall through with no readable duration, all parse to zero
seconds, and the duration filter drops every one.
This adds a branch for the new shape. A small wrapLockupViewModel
helper picks out the video ID, title, and duration badge (e.g. 12:07)
and packages them in a stdClass that matches the existing fields the
rest of the loop reads. Description and timestamp aren't in
lockupViewModel; fetchVideoDetails continues to fill those in.
The existing richItemRenderer branch is also tightened to require an
inner videoRenderer; without that, the new shape enters the branch and
crashes on null->lengthText.
* chore: add polybjorn to CONTRIBUTORS.md
---------
Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>1 parent e884acb commit d1b7b0e
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
| |||
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
506 | 539 | | |
507 | 540 | | |
508 | 541 | | |
| |||
0 commit comments