QuantumBadger / RedReader

An unofficial open source Android app for Reddit.
GNU General Public License v3.0
2.01k stars 482 forks source link

Connection errors and slow download speeds with redgifs connections #747

Open japanesephundroid opened 4 years ago

japanesephundroid commented 4 years ago

Issue first described here.

Another additional issue not described there is slow download speeds (about 300 Kbytes/sec when gfycat maxes out my connection.)

The only error I see in catlog is: org.quantumbadger.redreader.cache.CacheDownload.performDownload(CacheDownload.java:140) (140 is a diffrent number every time).

Maybe its time to switch back to webm for links since the webm display problems were mostly on kitkat devices. Webm on new uploads seem to have higher file sizes/bitrates as well.

736 is the pull request for redgifs support.

Is this section in RedgifsAPI.java:

try {
      final JsonBufferedObject outer = result.asObject().getObject("gfyItem");
      listener.onSuccess(ImageInfo.parseGfycat(outer));

supposed to use gfyItem & parseGfycat or should it be updated?

QuantumBadger commented 4 years ago

It looks like the server cuts off the connection part-way through the download, so webm vs mp4 shouldn't make any difference. I tried switching it to use the mobile link (which is lower res and smaller filesize) but still occasionally get connection errors.

I don't think this is a bug in the app, I think it's an issue with their servers. If anyone has any suggestions for workarounds though, I'm happy to hear them.

supposed to use gfyItem & parseGfycat or should it be updated?

Yeah that's fine, they kept the API the same (including references to Gfycat).

japanesephundroid commented 4 years ago

Thanks for the check.

I usually use ImgurViewer for links that don't work now.

It's on Github for ideas on how to better support redgif if anyone wants to look into it.

ElXando commented 4 years ago

@japanesephundroid Have you just swapped the GIF viewer and Video viewer to External Browser or do you manually choose to view in External Browser when you find a link that doesn't work?

japanesephundroid commented 4 years ago

Have you just swapped the GIF viewer and Video viewer to External Browser or do you manually choose to view in External Browser when you find a link that doesn't work?

I manually choose to view in external browser.