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

Add support for viewing movie trailers with local api #4391

Merged

Conversation

ChunkyProgrammer
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer commented Nov 26, 2023

Add support for viewing movie trailers with local api

Pull Request Type

  • Feature Implementation

Related issue

Going to a video uploaded by YouTube Movies & TV would cause an error and nothing would be displayed.

Description

This PR will play the preview for movies.

Testing

(While using a canada vpn)

  1. Go to https://www.youtube.com/watch?v=BfgE0HczUco (with local api)
  2. search Scott Pilgrim vs the World movie, click on the video by YouTube Movies & TV
    image
    image

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.19.1

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 26, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 26, 2023 21:20
Copy link
Member

Choose a reason for hiding this comment

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

Sometimes it does load the trailer but sometimes i have the feeling that it is really trying to fetch to full movie, resulting in this error dump

Capture

@ChunkyProgrammer
Copy link
Member Author

Sometimes it does load the trailer but sometimes i have the feeling that it is really trying to fetch to full movie, resulting in this error dump

Capture

What video did you get this error with?

@efb4f5ff-1298-471a-8973-3d47447115dc

Tested with the URL you provided in the PR body

@ChunkyProgrammer
Copy link
Member Author

@efb4f5ff-1298-471a-8973-3d47447115dc are you using a vpn or a proxy? I was able to reproduce with a vpn (the movie wasn't available in the region my vpn was in)

@absidue
Copy link
Member

absidue commented Nov 27, 2023

@ChunkyProgrammer Sounds like you need to also check the playability status of the trailer, the current code just assumes it always playable.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Nov 27, 2023

Yes i was using a VPN but like i said when it was playable it on that server it also sometimes threw the error at me

@ChunkyProgrammer
Copy link
Member Author

Age restricted trailer test: https://youtu.be/QgLjxu_xuzg

auto-merge was automatically disabled November 27, 2023 19:38

Pull request was closed

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 27, 2023 19:38
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 27, 2023
auto-merge was automatically disabled November 27, 2023 20:17

Pull Request is not mergeable

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 27, 2023 20:17
auto-merge was automatically disabled November 27, 2023 20:19

Pull Request is not mergeable

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 27, 2023 20:19
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 27, 2023
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

For anyone running into the same issues as me, use VPN server in Canada

@kommunarr
Copy link
Collaborator

question: To confirm, is this what we want to happen when there is an error displaying the content, due to VPN issues or something like that?

Screenshot_20231127_173414

kommunarr
kommunarr previously approved these changes Nov 27, 2023
Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

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

Can confirm that it works as intended (tested with Canadian VPN server).

src/renderer/helpers/api/local.js Outdated Show resolved Hide resolved
src/renderer/helpers/api/local.js Outdated Show resolved Hide resolved
@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jan 2, 2024
ChunkyProgrammer and others added 2 commits January 3, 2024 22:52
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Jan 5, 2024
@PikachuEXE
Copy link
Collaborator

What's changed since I last tested~

@absidue
Copy link
Member

absidue commented Jan 6, 2024

The appearance and functionality of the movie items in search results (they had a broken channel link before, now it just shows the text. additionally the description will show up for them in the list layout).

@PikachuEXE
Copy link
Collaborator

Got this error with Japan VPN searching Scott Pilgrim vs the World movie
image

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jan 12, 2024
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

No more error seen when searching Scott Pilgrim vs the World movie (same VPN server)

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

@FreeTubeBot FreeTubeBot merged commit c983e02 into FreeTubeApp:development Jan 30, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 30, 2024
@ChunkyProgrammer ChunkyProgrammer deleted the view-movie-previews branch January 30, 2024 00:48
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Feb 3, 2024
* development: (92 commits)
  Make video info section more concise (FreeTubeApp#4338)
  Playlist performance improvements (FreeTubeApp#4597)
  ! Fix playlist type not passed when playing next/prev item in a user playlist (FreeTubeApp#4623)
  Properly localize playlist view and video counts (FreeTubeApp#4620)
  Translated using Weblate (Croatian)
  Translated using Weblate (German)
  Translated using Weblate (Croatian)
  Fix search bar handling of Invidious channel URLs (FreeTubeApp#4568)
  Local API: List related games in featured channels section (FreeTubeApp#4562)
  Workaround community post slider dependency incorrectly calculating its size (FreeTubeApp#4598)
  Add support for viewing movie trailers with local api (FreeTubeApp#4391)
  Bump the eslint group with 2 updates (FreeTubeApp#4616)
  Translated using Weblate (French)
  Translated using Weblate (Finnish)
  Bump electron from 28.1.4 to 28.2.0 (FreeTubeApp#4611)
  Translated using Weblate (French)
  Bump the eslint group with 4 updates (FreeTubeApp#4581)
  Bump lefthook from 1.6.0 to 1.6.1 (FreeTubeApp#4608)
  Bump marked from 11.1.1 to 11.2.0 (FreeTubeApp#4612)
  Bump webpack from 5.89.0 to 5.90.0 (FreeTubeApp#4610)
  ...
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.

None yet

6 participants