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 entry to long-press menu #8397

Merged

Conversation

notaLonelyDay
Copy link
Contributor

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)

Due diligence

@notaLonelyDay
Copy link
Contributor Author

This is my first issue at NewPipe and so I need some help from experienced maintainers

Firstly

To add download to long press menu, I have to create DownloadDialog, but to do this, I need StreamInfo, not StreamInfoItem
So I have to featch StreamInfo from StreamInfoItem, but to what disposable add .subscribe() result?
What is the best way to pass CompositeDisposable to StreamDialogDefaultEntry or maybe load it in some other place?

Secondly

While fetching, it is good to show some progress bar, where should it be shown? What is the best way to show progress in this case?

@notaLonelyDay notaLonelyDay force-pushed the add-download-to-longpress-menu branch from 9b32880 to caf0eef Compare May 13, 2022 20:51
@SameenAhnaf
Copy link
Collaborator

it is good to show some progress bar, where should it be shown?

It should be discussed in #3332, I think.

@triallax triallax added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface labels May 22, 2022
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 for the contribution!

So I have to featch StreamInfo from StreamInfoItem, but to what disposable add .subscribe() result?

Unfortunately currently Disposable are ignored in that class, because of bad design and other considerations. This is a known issue, see #7942 for more information. You don't have to solve it here.

While fetching, it is good to show some progress bar, where should it be shown? What is the best way to show progress in this case?

This is also currently not being done anywhere in the app (not even for e.g. "Open channel details" or "Start playing in the background") so here, too, you don't need to do anything.

It should be discussed in #3332, I think.

I don't think #3332 has anything to do with this: what @notaLonelyDay had a doubt about is showing a progress bar while loading the stream details, not showing progress for the download itself.

@notaLonelyDay
Copy link
Contributor Author

Thanks for comments I'll do it as soon as I can

@notaLonelyDay notaLonelyDay force-pushed the add-download-to-longpress-menu branch from 41e2253 to ab2db74 Compare June 9, 2022 18:01
@notaLonelyDay notaLonelyDay marked this pull request as ready for review June 9, 2022 18:02
@notaLonelyDay notaLonelyDay requested a review from Stypox June 9, 2022 18:02
@notaLonelyDay notaLonelyDay force-pushed the add-download-to-longpress-menu branch 3 times, most recently from 2a9220b to dc59873 Compare June 10, 2022 09:14
@notaLonelyDay
Copy link
Contributor Author

@Stypox can you please merge?
Everything is done

@Stypox Stypox force-pushed the add-download-to-longpress-menu branch from 15ea0fc to a4724fe Compare July 6, 2022 09:43
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.

I made some changes myself. I tested (on API 19 and API 31) and it works. Sorry for the delay, we have been busy with the release and there have been other pending changes on the DownloadDialog for a while. Thank you!

@Stypox Stypox merged commit d9af788 into TeamNewPipe:dev Jul 6, 2022
@Stypox Stypox changed the title Add download to longpress menu Add Download entry to long-press menu Jul 6, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Hanankhan1983

This comment was marked as resolved.

@Stypox

This comment was marked as off-topic.

@Hanankhan1983

This comment was marked as resolved.

@Hanankhan1983

This comment was marked as resolved.

@Stypox Stypox mentioned this pull request Aug 27, 2022
9 tasks
@Robbankz
Copy link

Robbankz commented Nov 9, 2022

biggest newpipe addition of all time, i always wondered why i had to hit share and send to newpipe(myself) to download, although i dont agree with all your decisions e.g. bitchute, rumble etc etc, this is a good start, gotta give credit where credit is due

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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