-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Recognize timestamps and hashtags in descriptions and do some sharing fixes and improvements #5523
Conversation
Yes, it worked as expected. But I found 2 new issues:
Luckily, my phone is rooted and Scoop App installed which captured the crash log. (Video demo and Crash log are posted below) abc.mp4 |
Looks very strange, it perfectly works on my device, an Honor 9X running EMUI 10. In order to test, I build a debug APK: Debug share-improvements APK build with JDK 15.zip. |
Nope.
Again after crash if I open the app again, it goes to app not responding state.
In the title you mentioned about about Google Playstore url, so not having
PlayStore might be the cause? Actually, I had deleted Play Store and play
services as it was taking huge space on my phone.
|
@skyGtm No because it opens a web url so if there is a browser on your device, it will open the URL, unless it will show a message which is |
My phone has Android OS 5.1 API 22. Trying to run in emulator might help you to find the cause |
@skyGtm Does this APK fix the crash: Share-improvements debug APK.zip? |
Yes. now it works perfectly. |
@TiA4f8R Can you add a option to select what player to open timestamp from Content settings, #5507 (comment) Also in some videos description timestamp are not clickable on newpipe orignal one + this one too, but are recognized by player with timestamps menu. |
@prateekmedia this is not the place to ask |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@TobiGr What do you think of the last feature that I tried to implement? For now I found only one bug: two toasts |
679bc75
to
2aeccc0
Compare
app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java
Outdated
Show resolved
Hide resolved
Thank you @Stypox for your work on my PR! You are the best! |
…p player This commit adds support of opening recognized timestamps in the popup player instead of starting an intent which opens the YouTube website with the video timestamp.
…ptions This commit adds support for opening plain text timestamps by parsing the description text using a regular expression, add a click listener for each timestamp which opens the popup player at the indicated time in the timestamp. In order to do this, playOnPopup method of the URLHandler class. Also, handleUrl method of this class has been renamed to canHandleUrl.
…tion of Open with Kodi button in the player Add a boolean param, showToast, in ShareUtils.openIntentInApp and only show toast "No app on your device can open this" if this boolean is true. Fix the action of play with Kodi button by applying the fix provided in #5599 (adding the flag Intent.FLAG_ACTIVITY_NEW_TASK to the intent in NavigationHelper.playWithKore method). Do also some cleanup in viewWithFileProvider and shareFile methods of MissionAdapter class.
This commit tries to change the title of the system chooser shown, which is from Android System ("Open links with"), when no defaut browser is present, for the update notification.
Also do some fixes when sharing a file in downloads and some improvements in JavaDocs of ShareUtils class.
Rename URLHandler and KoreUtil classes to InternalUrlsHandler and KoreUtils. Move InternalUrlsHandler, KoreUtils, TextLinkfier, ShareUtils classes to external_communication subpackage. Remove unused param showPreviewText in shareText method of ShareUtils class. Add initial work to be able to display an image preview of the content shared (not for downloads). Use a better regular expression to parse timestamps in plain text descriptions.
Rename URLHandler and KoreUtil classes to InternalUrlsHandler and KoreUtils. Move InternalUrlsHandler, KoreUtils, TextLinkfier, ShareUtils classes to external_communication subpackage. Remove unused param showPreviewText in shareText method of ShareUtils class. Add initial work to be able to display an image preview of the content shared (not for downloads). Use a better regular expression to parse timestamps in plain text descriptions.
…ions This commit adds supports for opening hashtags in plain text descriptions, using the same logic as timestamps. Every hashtag opens a search on the current service with the text in the hashtag. Also use a better regular expression for parsing timestamps.
…wser or sharing a content to other apps Use an ACTION_CHOOSER intent has a negative impact for user experience, because user cannot set as default an activity for an intent
…InternalUrlsHandler class
Split handleURL method, now private, into two methods: handleUrlCommentsTimestamp and handleUrlDescriptionTimestamp. Code is now more proper.
… descriptions and YouTube comments
Fix the error due to the rebase on the dev branch of this branch Add a shareText method in the ShareUtils class which has 3 parameters and calls the original shareText method with an empty string for the imagePreviewUrl param.
also use differently Markwon methods to convert plain text to markdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good in my opinion :-)
Thank you for this big chunk of work!
I tested everything I could (share, open in browser, kodi, timestamps, hashtags) and could not find any issues on API 19 emulated (with no play store), API 29 TV emulated (with no browser; with play store), API 29 phone (with Kore; with Foxy Droid and Aurora Store (Foxy Droid was correctly chosen)), API 30 emulated (with no play store).
What is it?
Description of the changes in your PR
This PR:
TO DO: add a proper support of disposables (I can't do it myself)doneFixes the following issue(s)
Fixes #5507, fixes #5455 (comment), fixes #5695
APK testing
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
Due diligence
(Sorry in advance for my English)