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 download option to long-press menu #6563

Closed

Conversation

gitryder
Copy link

What is it?

  • Feature (user facing)

Description of the changes in your PR

Add option to download the video when long-pressing items.

Fixes the following issue(s)

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

@AudricV AudricV added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface labels Jun 23, 2021
@gitryder gitryder force-pushed the add-download-to-longpress-menu branch from cc6f35f to 4a0c903 Compare June 23, 2021 20:54
Copy link
Contributor

@triallax triallax left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Please also use the new method in VideoDetailFragment so as to reduce code duplication.


try {
// Get the sortedVideoStreams and selectedVideoStreamIndex using ListHelper
final ArrayList<VideoStream> sortedVideoStreams = new ArrayList<>(
Copy link
Contributor

Choose a reason for hiding this comment

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

The variable's type should be List<VideoStream>, as we do not care about the implementation:

Suggested change
final ArrayList<VideoStream> sortedVideoStreams = new ArrayList<>(
final List<VideoStream> sortedVideoStreams = new ArrayList<>(

Copy link
Author

Choose a reason for hiding this comment

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

Made the changes that you suggested. However, using the same code in VideoDetailFragment will break MainActivity

if (fragment instanceof VideoDetailFragment) {
((VideoDetailFragment) fragment).openDownloadDialog();
}

@gitryder gitryder requested a review from triallax June 28, 2021 05:47
@nadiration
Copy link
Contributor

Than you i have been waiting for this for a long time

Redirion
Redirion previously approved these changes Jul 15, 2021
Copy link
Member

@Redirion Redirion left a comment

Choose a reason for hiding this comment

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

lgtm, tested it, works. All good. Thank you

triallax
triallax previously approved these changes Jul 15, 2021
Copy link
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.

Thank you! Have you tested that it works correctly in the feed fragment with fast mode enabled?

@@ -371,6 +371,7 @@ protected void showStreamDialog(final StreamInfoItem item) {
));
}
entries.add(StreamDialogEntry.open_in_browser);
entries.add(StreamDialogEntry.download);
Copy link
Member

Choose a reason for hiding this comment

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

Have you checked if the download option can be added to other places where StreamDialogEntry is used?

Copy link
Author

Choose a reason for hiding this comment

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

On it. I'll check it out.

Copy link
Author

Choose a reason for hiding this comment

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

Not sure about what I'm supposed to do here. @Stypox please help me understand what I should check

Copy link
Contributor

Choose a reason for hiding this comment

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

I just made a similar change in #7160. You add your entry in BaseListFragment, but there are a bunch of other locations that have similar code (adding options to the long-press menu for stream items).

Do a search for add(StreamDialogEntry. and you should turn them all up.

You'll also want to test that it actually works in each other place, because some of those places may have different data available. In most cases besides BaseListFragment, the name of the fragment is a good indicator of where to find it in the app.

Copy link
Member

@Stypox Stypox Nov 13, 2021

Choose a reason for hiding this comment

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

@gitryder Android Studio tells me that StreamDialogEntry is used in these places:
image

@Stypox
Copy link
Member

Stypox commented Aug 1, 2021

@gitryder any update?

@gitryder
Copy link
Author

gitryder commented Aug 1, 2021

@gitryder any update?

Still working on it. Gimme only some time more

@Stypox
Copy link
Member

Stypox commented Aug 1, 2021

@gitryder ok, no problem :-)

@SameenAhnaf

This comment was marked as off-topic.

@gitryder
Copy link
Author

@gitryder Hey, are you there? It has been over a month. 😰

Extremely sorry, still working on it, I've not been able to do what @Stypox requested, gimme one day more

@gitryder
Copy link
Author

I lost my local copy that had this branch on it. How do I push to this same PR now?

@Stypox
Copy link
Member

Stypox commented Sep 20, 2021

Just clone your repo again and git checkout add-download-to-long-press-menu

@gitryder gitryder dismissed stale reviews from triallax and Redirion via 52f8dce September 20, 2021 19:53
@skyGtm skyGtm mentioned this pull request Sep 29, 2021
4 tasks
@SameenAhnaf SameenAhnaf mentioned this pull request Feb 27, 2022
5 tasks
@litetex litetex added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Mar 15, 2022
@litetex
Copy link
Member

litetex commented Mar 26, 2022

No progress since ~6months.
Please reopen this PR once the problems are fixed or better: Create a new PR.

@litetex litetex closed this Mar 26, 2022
@Hanankhan1983
Copy link

How do I download it pls tell really need it :(

@Stypox
Copy link
Member

Stypox commented Jul 13, 2022

@Hanankhan1983 this was added in #8397 and will be present in the next release; you can download an APK built by our CI from here: https://github.com/TeamNewPipe/NewPipe/suites/7347347309/artifacts/297870978

@Hanankhan1983
Copy link

@Hanankhan1983 this was added in #8397 and will be present in the next release; you can download an APK built by our CI from here: https://github.com/TeamNewPipe/NewPipe/suites/7347347309/artifacts/297870978

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct download option in long press menu in info items
10 participants