#1866: support e-shuushuu source redirection
* currently, e-shuushuu already redirects some posts to their landing pages (http://e-shuushuu.net/image/?image_id=$id), particularly those ending in 'jpg' * for some reason, e-shuushuu doesn't natively support other formats even the uppercased 'JPG' * the following lines aim to address this issue to redirect to http://e-shuushuu.net/image/$id * http://e-shuushuu.net/image.php?mode=view&image_id=$id is also a valid alternative but is not used
This commit is contained in:
@@ -336,6 +336,9 @@ class Post < ActiveRecord::Base
|
||||
sha1hash = $1
|
||||
filename = $2
|
||||
"http://g.e-hentai.org/?f_shash=#{sha1hash}&fs_from=#{filename}"
|
||||
|
||||
when %r{\Ahttp://e-shuushuu.net/images/\d{4}-(?:\d{2}-){2}(\d+)}i
|
||||
"http://e-shuushuu.net/image/#{$1}"
|
||||
|
||||
else
|
||||
source
|
||||
|
||||
Reference in New Issue
Block a user