posts: automatically add the bad_link and bad_source tags.
Automatically add the bad_link tag when the source is an image url from a known site, but it can't be converted to a page url (for example, a Twitter or Tumblr direct image link). Automatically add the bad_source tag when the source is from a known site, but it's not an image or page url (for example, a Twitter or Pixiv profile url)
This commit is contained in:
@@ -38,6 +38,8 @@ class Source::URL::Null < Source::URL
|
||||
end
|
||||
|
||||
def parse
|
||||
@recognized = true
|
||||
|
||||
case [subdomain, domain, *path_segments]
|
||||
|
||||
# http://about.me/rig22
|
||||
@@ -240,7 +242,12 @@ class Source::URL::Null < Source::URL
|
||||
@page_url = "https://www.zerochan.net/#{@work_id}#full"
|
||||
|
||||
else
|
||||
nil
|
||||
@recognized = false
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def recognized?
|
||||
@recognized
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user