Comments (6)
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.
@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.
@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.
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.
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.
Fixed in https://github.com/aledeg/xExtension-RedditImage/tree/v0.12.0
from xextension-redditimage.
Related Issues (15)
- [Feature Request] Reddit Image: Option to keep Metadata HOT 8
- PHP Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated HOT 8
- PHP Fatal error: Uncaught TypeError: DOMElement::setAttribute(): Argument #2 ($value) must be of type string, bool HOT 1
- PHP Warning: Undefined variable $links and PHP Fatal error: Uncaught TypeError: ($media) must be of type array HOT 4
- Some entries doesn't load `metadata` properly HOT 6
- InvalidContentException
- Cyrillic text appears scrambled HOT 1
- Add an option to save images HOT 3
- [Bug] Content is displayed twice HOT 6
- Problems with Video/Audio if media source is v.redd.it HOT 26
- Add teddit support HOT 7
- Correct encoding when retrieving data
- PHP Warning: Trying to access array offset on value of type null InsertTransformer.php on line 76 HOT 2
- PHP Deprecated: Using ${var} in strings is deprecated HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xextension-redditimage.