butterscotchstallion / limnoria-plugins

A smattering of Limnoria plugins I've written
MIT License
14 stars 14 forks source link

Adding Mime Types for file types #104

Open informationist opened 7 years ago

informationist commented 7 years ago

hi. thanks you. my previous issue closed without solution. so i reopen issue. i already filed issue after tested that command with comma. can you give me specific command if its wrong? or tell me how to add all file types at once.

i already tried with/without comma before file this issue. i can't fine the right way. my purpose is to support all file types on links. like jpeg image on this example. let me know if this is wrong setting;

.config supybot.plugins.spiffytitles.mimetypes text/html,image/jpeg

debug log; "unacceptable mime type image/jpeg for url https://blog.imgur.com/wp-content/uploads/2016/01/OeiRVAS.jpg"

butterscotchstallion commented 7 years ago

Why would you want to do this? You know images don't have a title, right? What would you even expect that to do?

Also, there is a handler for imgur links

informationist commented 7 years ago

yes, but images have resolution or size and not all images are on imgur. already that imgur link not returns output. my friends bot gives metadata info about images for example. i dont know what he use

butterscotchstallion commented 7 years ago

I think what is happening here is that the mime types configuration value is a comma separated list, but maybe the value is not interpreted that way.

This line here: https://github.com/butterscotchstallion/limnoria-plugins/blob/master/SpiffyTitles/plugin.py#L1304 treats the value as a list, but perhaps it is not.

By the way, getting information about images is trivial but it is pretty slow too. I think that's why I never implemented it as a default.

informationist commented 7 years ago

ok, i already filed this issue about 6 months ago. i can live without it. but if you will fix this, i will use it. there was problem on imgur album links on default mimetype setting also. maybe that was coming from the same reason. thanks you for the best plugin currently. :)

butterscotchstallion commented 7 years ago

I think this is pretty easily fixable. I'll try and find some time to get it done. Thank you for your patience.

informationist commented 7 years ago

you're welcome. thanks in advance. :)