Skip to content
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

ytdl_hook: trigger hook only after profiles application #15674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stanoarn
Copy link
Contributor

ytdl_hook and auto_profiles hook trigger in incorrect order leading to unexpected behavior like in #13515. This PR fixes the issue by ensuring that the ytdl_hook is always triggered after profiles have been applied.

Copy link

Download the artifacts for this pull request:

Windows
macOS

@Dudemanguy
Copy link
Member

Triggering auto-profiles before ytdl_hook sounds reasonable to me. However this would change the priority of the ytdl_hook from 10 (lower than the default) to 60. It's been 10 ever since the script was first added (0f7df89), and I'm inclined to think it's better to keep it that way as there might be several scripts out there that implicitly rely on the hook being executed early. Maybe instead just bump the priority of auto-profiles?

@kasper93
Copy link
Contributor

auto-profiles priority is tricky, because depending on the use-case you may want it to be triggered before or after other hooks. I'm inclined to idea of making auto-profiles take priority over anything else on the off-chance that some user profiles will be affected by it, but fixing this fully, would require binding profiles to completely different hook or something... Also note that actions taken in profiles itself does not propagate immediately, most of the time it needs another tick to read new option.

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.

3 participants