FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.63k stars 862 forks source link

Invidious API: Extract streaming data expiry date from URL #5997

Closed absidue closed 3 weeks ago

absidue commented 3 weeks ago

Invidious API: Extract streaming data expiry date from URL

Pull Request Type

Related issue

Related to #5991

Description

This fixes FreeTube claiming that the streaming data has expired when a 403 happens with the Invidious API even when it hasn't expired.

Testing

  1. Add a console.log(this.streamingDataExpiryDate) line below the this.streamingDataExpiryDate = line
  2. Launch FreeTube
  3. Set the backend to Invidious
  4. Open a video
  5. Check the console and check that the date is in the future (it should be multiple hours in the future).

Desktop