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

fix: videoDetails.age_restricted is always false in other languages #986

Merged
merged 3 commits into from
Mar 5, 2022

Conversation

skick1234
Copy link
Contributor

@skick1234 skick1234 commented Aug 6, 2021

In other languages, notice url is not the value of notice_url property.

In ar:

{
  'إشعار': 'هذا الفيديو محظور على فئات عمرية معيّنة (وفقًا لإرشادات المنتدى)',
  'إشعار_url': 'http://www.youtube.com/t/community_guidelines'
}

In en-US:

{
  notice: 'Age-restricted video (based on Community Guidelines)',
  notice_url: 'http://www.youtube.com/t/community_guidelines'
}

In vi-VN:

{
  'thông báo': 'Video bị giới hạn độ tuổi người xem (dựa trên Nguyên tắc cộng đồng)',
  'thông báo_url': 'http://www.youtube.com/t/community_guidelines'
}

I can check only keys have _url suffix but it is longer and YouTube may localize it like other keys in the future.

@TimeForANinja
Copy link
Collaborator

can you add test cases?

@skick1234
Copy link
Contributor Author

skick1234 commented Aug 30, 2021

I will do it tomorrow :>

@skick1234
Copy link
Contributor Author

Rebased and added a test case. Forgot to do that .-.

@TimeForANinja TimeForANinja merged commit 21bc728 into fent:master Mar 5, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 2022

🎉 This PR is included in version 4.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants