Skip to content

Get IOS HLS manifest through async means#732

Closed
FireMasterK wants to merge 1 commit intoTeamNewPipe:devfrom
FireMasterK:ios-hls
Closed

Get IOS HLS manifest through async means#732
FireMasterK wants to merge 1 commit intoTeamNewPipe:devfrom
FireMasterK:ios-hls

Conversation

@FireMasterK
Copy link
Copy Markdown
Member

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

Although this makes an additional request that's unnecessary for NewPipe, it's done asynchronously so that there's no performance impact.

@FireMasterK FireMasterK added enhancement New feature or request YouTube Service, https://www.youtube.com/ labels Sep 23, 2021
@opusforlife2 opusforlife2 changed the title Get IOS HLS manifiest through async means. Get IOS HLS manifest through async means Sep 24, 2021
@FireMasterK FireMasterK requested a review from AudricV October 27, 2021 01:42
@Stypox
Copy link
Copy Markdown
Member

Stypox commented Nov 13, 2021

This PR aims at adding another method to get the manifest, so that if the other two break, this might still work?

@FireMasterK
Copy link
Copy Markdown
Member Author

Yes, except normally, the manifest is only added on live streams, however with this, all videos will have an HLS manifest.

Copy link
Copy Markdown
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I see. I think this increases data usage, though, without apparent improvents on the client side. I don't fully understand when this would become useful, sorry ;-)

Comment on lines +486 to +500
}
if (mobileStreamingData != null && hlsManifestUrl.isEmpty()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These could as well be else ifs, can't they?

.done())
.getBytes(UTF_8);

CompletableFuture iosTask = CompletableFuture.supplyAsync(() -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure this is a good solution: what if the task hasn't finished when getHlsUrl() is called? If the extractor was all built with async means it would integrate good, but in this case there is nothing waiting for the async task to complete. Also, futures are not used anywhere else in the extractor, by doing a fast search.

@AudricV
Copy link
Copy Markdown
Member

AudricV commented Jan 15, 2022

Superseded by #780.

@AudricV AudricV closed this Jan 15, 2022
@AudricV AudricV removed their request for review January 16, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants