Fix timestamp links in video descriptions#2536
Closed
nyanpasu64 wants to merge 2 commits intoTeamNewPipe:devfrom
nyanpasu64:fix-description-timestamps
Closed
Fix timestamp links in video descriptions#2536nyanpasu64 wants to merge 2 commits intoTeamNewPipe:devfrom nyanpasu64:fix-description-timestamps
nyanpasu64 wants to merge 2 commits intoTeamNewPipe:devfrom
nyanpasu64:fix-description-timestamps
Conversation
3 tasks
Member
|
You should close this @Stypox @TobiGr. It works, but only for YouTube. It breaks all description links for other services. I'll will implement it with service checking with the future pr for TeamNewPipe/NewPipeExtractor#239. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Video description timestamp links have link text which is not a URL. I submitted a PR adding the ability to properly parse timestamp links into
<a href="...&t=0">00:00</a>at TeamNewPipe/NewPipeExtractor#188. However, the NewPipe front-endvideoDescriptionViewerases all Spanned links if their text is not a URL.videoDescriptionView.setAutoLinkMask(Linkify.WEB_URLS);is intended to turn textual URLs into links. For some reason, on my Moto G5 Plus running Android 7.0, it causesSpannedhyperlinks to disappear if the text is not a URL. This PR removes that function call.Will this cause non-timestamp URLs to break? I've tested on https://www.youtube.com/watch?v=801uz0f_UAE and the URLs in the video description still work. I think all URLs delivered to the web interface are already found in HTML and scraped and encoded into
Spanned, so this function call is unnecessary. But it's possible some URLs fail to survive the pipeline but are regenerated via autolink, and this PR will make them disappear. If so, that's probably a bug hidden by autolink.I haven't changed
:app/build.gradleto point to a differentimplementation 'com.github.teamnewpipe:NewPipeExtractor:...'revision yet, since I did all local testing using:Depends on TeamNewPipe/NewPipeExtractor#188.