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

Screen in the app to show and download APKs from github releases. #1520

Closed
3 tasks done
krtkush opened this issue Jul 2, 2018 · 32 comments
Closed
3 tasks done

Screen in the app to show and download APKs from github releases. #1520

krtkush opened this issue Jul 2, 2018 · 32 comments

Comments

@krtkush
Copy link
Contributor

krtkush commented Jul 2, 2018

Feature request/ idea

Currently, F-Droid takes too long to update its repo with the latest version of the app. Also, there must be users who don't have/ want F-Droid installed but still want to track the latest version of NewPipe.

For these users and to counter the slowness of F-Droid APK updates, I suggest that we have an inbuilt system in the app which shows and notifies the availability of the latest APKs. We can use the Releases API to get the latest info from github itself.

I'm willing to take up this task if the general idea is approved.

@theScrabi
Copy link
Member

Yum I'm at your side here :)

@krtkush
Copy link
Contributor Author

krtkush commented Jul 3, 2018

Great! I'll start working on it, then.

@TobiGr
Copy link
Member

TobiGr commented Jul 3, 2018

I am not sure which information you want to get, but you can use the api we created for the website to get the current version: TeamNewPipe/web-api
You can fetch the data from https://newpipe.schabi.org/api/data.json

@krtkush
Copy link
Contributor Author

krtkush commented Jul 3, 2018

@TobiGr The API you mentioned does not provide link to download the release APK.

My idea is to provide a functionality to notify the user about a new APK availability and then let the user download it from within the NewPipe app. I, personally, would like this way of updating the app because I find that F-Froid is not quick enough to make the latest APK available for download.

https://api.github.com/repos/TeamNewPipe/NewPipe/releases gives the assets_url for every release; which further provides browser_download_url. This url can be used to download the APK of that release.

@TobiGr
Copy link
Member

TobiGr commented Jul 3, 2018

It's no problem to include it into the web-api. We'd only need to make a difference between F-Droid and GitHub releases. @TheAssassin What do you think about this?

@krtkush
Copy link
Contributor Author

krtkush commented Jul 3, 2018

It's no problem to include it into the web-api.

That sounds good.

@TheAssassin
Copy link
Member

@TobiGr this should be doable, although I'm a bit worried about the GitHub rate limit. I think we should use some cheap web scraping to get the information we need.

@TobiGr
Copy link
Member

TobiGr commented Jul 3, 2018

The rate limit is at 60 requests per hour for non authorized applications. As long as we keep the cache this won't be a problem.

@TheAssassin
Copy link
Member

This is not the only application I run that uses the GitHub API, @TobiGr...

@theScrabi
Copy link
Member

theScrabi commented Jul 4, 2018

This is not the only application I run that uses the GitHub API, @TobiGr...

... NewPipe is a scraper ... so maybe, just maybe we could scrape that value as well 🙈

@TobiGr
Copy link
Member

TobiGr commented Jul 4, 2018

@theScrabi. Jup. I just opened a PR which does the scrapping.

@TheAssassin
Copy link
Member

It's "scraping", not "scrapping"...

@TobiGr
Copy link
Member

TobiGr commented Jul 4, 2018

@krtkush I've updated the API and the changes should be online soon. Tell me when you need additional information which could be provided by the API.

@TheAssassin
Copy link
Member

Deployment just finished in this

@TheAssassin
Copy link
Member

@krtkush closing for now, feel free to reopen if you need more assistance.

@pranavg189
Copy link

@krtkush Are you working on this ?

@krtkush
Copy link
Contributor Author

krtkush commented Jul 18, 2018

Yes. Should have a working prototype by end of next weekend.

@pranavg189
Copy link

Cool. Great to know that.

@krtkush
Copy link
Contributor Author

krtkush commented Aug 11, 2018

@TheAssassin In the data api will it possible to get the version_code under the github too? Like we already get under F-droid?

Comparing version code makes more sense than comparing version names.

@krtkush
Copy link
Contributor Author

krtkush commented Aug 11, 2018

@TheAssassin The API seems to be down.

Getting <html><title>500: OK</title><body>500: OK</body></html> as output.

@TheAssassin
Copy link
Member

Works fine on my end. https://newpipe.schabi.org/api/data.json?json

@krtkush
Copy link
Contributor Author

krtkush commented Aug 11, 2018

Yep! It's up now.

@TobiGr
Copy link
Member

TobiGr commented Aug 11, 2018

In the data api will it possible to get the version_code under the github too? Like we already get under F-droid?

Yep. That's possible. I can take a look on this next Friday (just in case you don't want to do it, @TheAssassin)

@TobiGr
Copy link
Member

TobiGr commented Aug 14, 2018

@krtkush I just merged my changes to display the version code. We just need to wait until the new version will be deployed.

@krtkush
Copy link
Contributor Author

krtkush commented Aug 14, 2018

@TobiGr Thank you! How soon will that be?

@dege1000
Copy link

F-droid works with repositories much like linux, can't you make a one that you can update with more frequency

@krtkush
Copy link
Contributor Author

krtkush commented Aug 15, 2018

@TobiGr All the values are -1 under the github object.

@TobiGr
Copy link
Member

TobiGr commented Aug 15, 2018

That's strange. It worked for me locally.

@TobiGr
Copy link
Member

TobiGr commented Aug 15, 2018

GitHub just renamed some CSS classes 🙄

@TheAssassin
Copy link
Member

@TobiGr patch has been deployed as well.

@TobiGr
Copy link
Member

TobiGr commented Aug 15, 2018

@TheAssassin Thanks

@krtkush
Copy link
Contributor Author

krtkush commented Aug 16, 2018

Thanks, guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants