Skip to content

Youtube extras - #450

Open
azfoo wants to merge 9 commits into
devfrom
youtube-extras
Open

Youtube extras#450
azfoo wants to merge 9 commits into
devfrom
youtube-extras

Conversation

@azfoo

@azfoo azfoo commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@azfoo
azfoo force-pushed the youtube-extras branch 4 times, most recently from 493f60f to a2a7a14 Compare April 27, 2026 17:11
@FelipeDefensor

Copy link
Copy Markdown
Collaborator

Hey, is this meant for v0.6.0?

@azfoo

azfoo commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator Author

In theory, yes.

@FelipeDefensor

FelipeDefensor commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Would it be too bad if we left it for v0.6.1? I think we have enough on our plates if we are releasing tomorrow, especially because I am calling it a day.

@azfoo

azfoo commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator Author

Not particularly bad. I'd like 79cca23 to go out for 0.6, mostly because its annoying showing the world your yt watch history, (and maybe 411495e because that's fairly simple). No worries if not.

(in any case, I'm going to trigger the build process and we can start the testing tomorrow)

@azfoo
azfoo marked this pull request as ready for review May 7, 2026 01:17
@azfoo
azfoo requested a review from FelipeDefensor May 7, 2026 01:17

@FelipeDefensor FelipeDefensor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some issues with this:

  • Fullscreen doesn't work at all for me (maybe we talked about this and I forgot, sorry).
  • Autoplay only works if I clicked play for a previous video in the same TiLiA session.
  • icecream is not listed as a dependency, if I remember correcly, so ic has a potential to crash. Replace with another logging mechnism.
  • If I try to load a well-formed Youtube URL with an invalid video ID, the video is not loaded, but I get no error message at all.

Also, I got this review comment from Claude, it seems to make sense, but I haven't been able to test it.

  • display_error semantics changed for all callers. It's reached from PlayerTracker.on_error (line 62), which forwards every YT JS onError (invalid video ID, embed disabled by uploader, region-restricted,
    etc.). A reload won't recover from any of those — but the user now gets an unsolicited "Would you like to try and refresh the page?" prompt on every JS error. Consider gating the refresh prompt on
    recoverable errors only, or at minimum keep the error-surface call (so the failure still flows through tilia.errors) and offer reload as a secondary step.

@azfoo
azfoo force-pushed the youtube-extras branch from a2a7a14 to 0e528ea Compare May 27, 2026 15:00
@azfoo
azfoo requested a review from FelipeDefensor June 5, 2026 16:19
azfoo added 8 commits July 29, 2026 11:10
shows only videos related to the video's uploader, rather than videos from the user's watch history
(no way to hide related videos/youtube branding etc. due to yt's policies)

.
- youtube.html: fire backend.on_error when the IFrame API script fails
  to load (no connection / DNS failure); tryNotify loop retries until
  backend is initialized to avoid a race condition
- youtube.html: fix default onError branch — was using a regular string
  so ${event.data} was never interpolated; changed to template literal
on_audio_time_change previously accessed self.svg_view, which falls back
to creating a new SvgViewer when Get.SCORE_VIEWER has no replier. During
test teardown this caused a crash because get_data is called on a
partially-destroyed object. Guard the method to skip scrolling when no
viewer is open instead.
@FelipeDefensor

Copy link
Copy Markdown
Collaborator

Is this ready for review again? Is this for 0.7?

@azfoo

azfoo commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

yes I think so

@FelipeDefensor FelipeDefensor added this to the 0.7.0 milestone Aug 27, 2026
FelipeDefensor added a commit that referenced this pull request Aug 27, 2026
Three corrections found while building a bundle for PR #450:

- All paths handed to TiLiA must be absolute. dirs.setup_dirs chdirs into
  the tilia package outside ENVIRONMENT=prod, and boot() parses its
  arguments before that chdir -- so `tilia repro/x.tla` passes argparse
  validation and then fails to open, and a CLI `save repro/x.tla` writes
  inside tilia/ silently.
- The launch command has to go through the project environment. A bare
  `tilia` resolves to nothing unless .venv is active; use
  `uv run tilia "$PWD/repro/<issue>.tla"` from the repo root, which is
  both absolute and portable.
- `gh pr checkout <N>` does not belong in a copy-paste launch line. It
  aborts when the head branch is checked out in another worktree, its
  fast-forward fails once the local branch has diverged, and --force
  discards the reviewer's local edits. It is one-time setup plus a
  warning, not part of the repeatable command.
The script-load failure handler reported through on_error, the path that
shows a message and stops there. A connection failure is the one thing a
page reload actually repairs, so the user was left with a dead player and
no route back short of reopening the file.

Route it to on_recoverable_error instead, which surfaces the same message
and then offers the refresh. Verified reachable: reloading re-runs the
script tag, and the loadFinished connection made during the first load
re-issues loadVideo for the current video, so playback resumes once the
connection is back.

Error code 5 keeps its existing routing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants