anyaudio / anyaudio-server

:musical_note: Simple server to search youtube and give direct audio download and stream links
91 stars 19 forks source link

App download Link #135

Closed bxute closed 7 years ago

bxute commented 7 years ago

We want that app download should be from url like :

anyaudio.in/app .

since other shorted links are hard to remember and are not trusted. So there should be a common Url for all download. Plz look over the issue.

aviaryan commented 7 years ago

Ok @bxute , please post the link to the apk here so that I can link it to anyaudio.in/app .

bxute commented 7 years ago

Btw it is : https://goo.gl/03zyBG

But can we rely on our own server to provide download in less time.

bxute commented 7 years ago

This download structure follows OurApp Server---> Link Server ---> Google Drive--> [Download Link]

So can we provide direct download from our server.

singhpratyush commented 7 years ago

Caching apk in the server doesn't sounds like plan. I think that we should set up a redirect to https://github.com/zeseeit/AnyAudio/raw/master/Apk/anyaudio.apk at /app.

aviaryan commented 7 years ago

https://github.com/zeseeit/AnyAudio/raw/master/Apk/anyaudio.apk at /app.

Don't say that the apks are being pushed to the git repository :/

singhpratyush commented 7 years ago

I don't know about that (I just saw it at the app's master). The point which I was trying to present is that there should be a place where @bxute should be able to upload the latest APK and the website would just give a link to it.

aviaryan commented 7 years ago

@bxute @singhpratyush I have added a temporary redirect from /app to Github releases app link. I say this temporary because this will mean that we have to update server everytime a new release is done. Ideally we would like your releases to work without our intervention. That being said, is there a way we can keep the link for the latest release constant. One way I see is creating a Google Drive file anyaudio.apk and updating it everytime a new release comes. But this will mean storing files at two places. Another way is using a link redirect service which will allow you to change the underlying link.. Example - /app redirects to anotherwebsite/code which redirects to the latest version of app on github. Sadly I haven't found any service with that feature.

singhpratyush commented 7 years ago

We may do this on the client side. Check this link.

json_obj['assets'][0]['browser_download_url'] is all we need.

singhpratyush commented 7 years ago
function RedirectLatest() {
        $.getJSON("https://api.github.com/repos/zeseeit/AnyAudio/releases/latest").done(function (release) {
            var asset = release.assets[0];
            var download_link = assets.browser_download_url;
            window.location.replace(download_link);
        });
    }

Maybe something like this (not a js expert).

singhpratyush commented 7 years ago

@aviaryan : Shall I change the labels and make this as a task to add /app endpoint?

aviaryan commented 7 years ago

/app endpoint has been already added. Now what we need to do is to decide about https://github.com/aviaryan/youtube-mp3-server/issues/135#issuecomment-284164913 . I suppose getting the latest link through JS is out of the question right now, so @bxute, do you plan to upload apks to GoogleDrive as well so that we can keep a static link?

singhpratyush commented 7 years ago

getting the latest link through JS is out of the question right now

What's the issue with it?

aviaryan commented 7 years ago

@singhpratyush : 🤔 Well, no issue really. I think I mis-understood the need of the /app endpoint. Sorry for the confusion. Yes, we can make the /app endpoint do that. So do you want to send a PR for this?

singhpratyush commented 7 years ago

Working on it.