Merge branch 'master' into next

This commit is contained in:
ccd0 2019-04-04 20:27:54 -07:00
commit 544dcd6096
3 changed files with 8 additions and 2 deletions

View File

@ -477,6 +477,12 @@ Settings =
[hostname, software] = line.split(' ')
siteProperties[hostname] = {software}
set 'siteProperties', siteProperties
if compareString < '00001.00014.00006.00006'
if data['sauces']?
set 'sauces', data['sauces'].replace(
/\/\/%\$1\.deviantart\.com\/gallery\/#\/d%\$2;regexp:\/\^\\w\+_by_\(\\w\+\)-d\(\[\\da-z\]\+\)\//g,
'//www.deviantart.com/gallery/#/d%$1%$2;regexp:/^\\w+_by_\\w+[_-]d([\\da-z]{6})\\b|^d([\\da-z]{6})-[\\da-z]{8}-/'
)
changes
loadSettings: (data, cb) ->

View File

@ -57,7 +57,7 @@ Sauce =
parts[key] = parts[key].replace /%(T?URL|IMG|[sh]?MD5|board|name|%|semi|\$\d+)/g, (orig, parameter) ->
if parameter[0] is '$'
return orig unless matches
type = matches[parameter[1..]]
type = matches[parameter[1..]] or ''
else
type = Sauce.formatters[parameter] post, ext
if not type?

View File

@ -758,7 +758,7 @@ Config =
sauces: """
# Known filename formats:
http://www.pixiv.net/member_illust.php?mode=medium&illust_id=%$1;regexp:/^(\\d+)_p\\d+/
//%$1.deviantart.com/gallery/#/d%$2;regexp:/^\\w+_by_(\\w+)-d([\\da-z]+)/
//www.deviantart.com/gallery/#/d%$1%$2;regexp:/^\\w+_by_\\w+[_-]d([\\da-z]{6})\\b|^d([\\da-z]{6})-[\\da-z]{8}-/
//imgur.com/%$1;regexp:/^(?![a-zA-Z][a-z]{6})(?![A-Z]{7})(?!\\d{7})([\\da-zA-Z]{7})(?: \\(\\d+\\))?\\.\\w+$/
http://flickr.com/photo.gne?id=%$1;regexp:/^(\\d+)_[\\da-f]{10}(?:_\\w)*\\b/
https://www.facebook.com/photo.php?fbid=%$1;regexp:/^\\d+_(\\d+)_\\d+_[no]\\b/