Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: use correct url when using privacy mode #58

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

12rambau
Copy link
Member

Fix #57

I simply edit the url used when privacy_mode is activated.
@phw, could you test it against your documentation and let me know if it fixes the issue ?

@phw
Copy link

phw commented May 22, 2023

@12rambau Thanks for the patch. We are close, but not fully working :) According to the docs at https://sphinxcontrib-youtube.readthedocs.io/en/latest/usage.html you are supposed to be able to use it like this:

..  youtube:: dQw4w9WgXcQ
   :privacy_mode:

But in this case node["privacy_mode"] is an empty string. If it is not set at all it is None. Changing the line to the below I think will work as intended:

node["platform_url"] = privacy if node["privacy_mode"] is not None else embed

@phw
Copy link

phw commented May 23, 2023

The patch works for me now. Thanks for the fix.

@12rambau
Copy link
Member Author

@dham ready for review

@dham dham merged commit 77783fc into sphinx-contrib:master Sep 12, 2023
@12rambau 12rambau deleted the privacy branch September 12, 2023 10:33
khancyr pushed a commit to khancyr/sphinxcontrib-youtube that referenced this pull request Jul 15, 2024
* fix: use correct url when using privacy mode

* check against None
peterbarker pushed a commit to ArduPilot/sphinxcontrib-youtube that referenced this pull request Aug 30, 2024
* fix: use correct url when using privacy mode

* check against None
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:privacy_mode: has no effect
3 participants