#2215: improved wikia (vignette) support

*updated 42857cd552
This commit is contained in:
ghostrigger
2015-01-01 18:53:01 +08:00
parent 699b2b27d1
commit 7f60201a21

View File

@@ -365,6 +365,11 @@ class Post < ActiveRecord::Base
subdomain = $1
filename = $2
"http://#{subdomain}.wikia.com/wiki/File:#{filename}"
when %r{\Ahttps?://vignette(?:\d*)\.wikia\.nocookie\.net/([^/]+)/images/[a-f0-9]/[a-f0-9]{2}/([^/]+)}i
subdomain = $1
filename = $2
"http://#{subdomain}.wikia.com/wiki/File:#{filename}"
when %r{\Ahttp://(?:(?:\d{1,3}\.){3}\d{1,3}):(?:\d{1,5})/h/([a-f0-9]{40})-(?:\d+-){3}(?:png|gif|(?:jpe?g?))/keystamp=\d+-[a-f0-9]{10}/([^/]+)}i
sha1hash = $1