Git Product home page Git Product logo

Comments (6)

aledeg avatar aledeg commented on July 1, 2024 1

I am afraid I will someday do something similar to what you've mentioned. I not eager to do it though.

You're not getting on my nerves. But thank you for asking.
Actually, I find it quite rewarding that someone is using the code I've started as a quick hack. It becomes better with each iteration (At least, I hope).

from xextension-redditimage.

aledeg avatar aledeg commented on July 1, 2024

@rom-1 I've made a fix. It's not released yet but you can still try it out. Let me know if it works the way you've intended. Thank you!

from xextension-redditimage.

rom-1 avatar rom-1 commented on July 1, 2024

@aledeg I gave it a shot, seems to work flawless. I had no chance to test it with other sources then v.redd.it, as nowadays 99% of reddits media content seems to come from there. But all these videos are now showing up in my RSS Reader app without any problems. Before they had an error "source not found". Thank you very much. :)

from xextension-redditimage.

aledeg avatar aledeg commented on July 1, 2024

Good! Did you notice if loading is longer?
I've changed the rendering to ease the validation and I've added some http validation. It should take more time to render but I haven't feel it with my test sample.

from xextension-redditimage.

rom-1 avatar rom-1 commented on July 1, 2024

Yea, I took a look at the source code you changed, and already saw that you are now checking for the http status return code before building the html source code. While this approach is promising to be very low-maintenance (peu d'entretien?), it should naturally increase loading times. But I agree, it is barely noticeable, so this works for me. Thanks a lot! :)

// Side Note - Offtopic
To avoid the additional http request, I guess the only other solution I can think of would be to implement an associative array / hashtable as a constant for every possible source used on reddit.com. So by checking for the source url domain name, apply the correct handling.
Example:
$contentURL['gifycat']='video/webm';
$contentURL['v.redd.it']='video/mp4';
$contentURL['i.redd.it']='gif';
$contentURL['imgur']='etcetc';

To be honest, I am afraid in the future you might not be able avoid this manual approach, as there might be other sources which require special handling, or might need specially crafted source urls. I know your extension is focusing on image handling, but you are also displaying other content types like gifs, text and videos from external sources (which is great! 😀).
Just one example: It might already be debatable for this example post if it would technically not be better to embed the mp4 video source (147KB) instead of the huge gif file (15.6MB) which is happening right now.... but this would need source url specific handling.

// Side Note 2 - very offtopic
Just tell me to bug off if I am getting on your nerves, please. :)
On the plus side, you are not the only one today who gets new issues created by me regarding reddit media and FreshRSS 😂

from xextension-redditimage.

aledeg avatar aledeg commented on July 1, 2024

Fixed in https://github.com/aledeg/xExtension-RedditImage/tree/v0.12.0

from xextension-redditimage.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.