Commit Graph

51 Commits

Author SHA1 Message Date
evazion
7ae860a8b8 Drop Pixiv whitecube support (#2681, #3206). 2017-07-26 18:06:46 -05:00
evazion
cc8986641b Fix #3208: Fix translated tag suggestions for Pixiv.
* Only suggest the Danbooru tag with the same name if there is no
  matching wiki other name. Example: if we have the Pixiv tag `Fate` and
  the Danbooru tag `fate_(series)` with other name `fate`, suggest that,
  not the Danbooru tag `fate`.

* Don't suggest tags that are empty or whose wiki is deleted.

* Only split tags on "/" if there are no other matches, and only for Pixiv.

* For Pixiv, only include traditional media tags in tag list, not digital media (Photoshop, SAI).

* Add some tests.
2017-07-09 12:10:30 -05:00
Type-kun
faa2d99160 Fix #3174 2017-06-19 18:22:58 +05:00
Albert Yi
7fb0e561cc Merge pull request #3124 from evazion/fix-artstation-sources
Multiple ArtStation fixes
2017-06-08 14:11:21 -07:00
evazion
39bd141667 artstation: fix fetch source data for image urls.
Fixes 'Fetch source data' when uploading an image url and the referer
url is available:

* https://danbooru.donmai.us/uploads/new?url=https://cdna.artstation.com/p/assets/images/images/006/029/978/large/amama-l-z.jpg&ref=https://www.artstation.com/artwork/4BWW2
2017-06-07 10:20:18 -05:00
evazion
fed23c0baa fetch source data: fix gallery warning for non-pixiv galleries. 2017-06-06 23:03:07 -05:00
r888888888
69fd6e6ca1 fixes #3102 2017-05-31 10:58:47 -07:00
r888888888
3a49b3c54b include normalized artist url in artist json 2017-05-30 12:01:18 -07:00
evazion
1a52f9db2b wiki pages: add wildcard support to "other names" search. 2017-05-24 14:59:00 -05:00
evazion
8015d62b46 /source.json: strip html tags from artist commentary. 2017-05-10 18:01:51 -05:00
evazion
b2f62482a1 Remove artist commentary handling from download rewrite strategies. 2017-05-10 18:01:51 -05:00
r888888888
b053a2d783 add source + rewrite strategy for pawoo 2017-04-20 15:50:22 -07:00
r888888888
0b8d4105aa fix tests 2017-04-04 12:39:17 -07:00
evazion
28bdfce9f6 /sources: add /sources.xml endpoint. 2017-03-16 18:10:30 -05:00
r888888888
3c581adbc3 fixes #2915: Translated Tags should be smarter (split by delimiters) 2017-03-06 15:29:05 -08:00
evazion
21e76d55e6 Remove extraneous byte-ordering marks. 2017-02-28 19:01:10 -06:00
r888888888
7a2f652152 add source strategy for artstation 2017-02-06 17:07:09 -08:00
evazion
be379cc4a2 Return artist commentary in /sources.json?url=<url>. 2016-12-27 06:01:23 +00:00
evazion
838d6f6eea Fix #2460: Uploading pixiv user's background image throws error.
Fix exception when uploading these types of URLs:

* http://img12.pixiv.net/profile/rapattu/119950.jpg
* http://i2.pixiv.net/img130/profile/minono_aki/8733472.jpg
* http://i2.pixiv.net/img20/img/a-park/novel/3607898.jpg
* http://i1.pixiv.net/novel-cover-original/img/2016/11/03/20/10/58/7436075_f75af69f3eacd1656d3733c72aa959cf.jpg
* http://i1.pixiv.net/background/img/2016/05/17/12/05/48/2074388_d4ac52034f7ca0af3e083d59fde7e97f.jpg

Skip rewriting sources that don't have illust IDs to avoid this
exception. Also fix `tags` so that it doesn't blow up when fetching
source data for these types of sources.
2016-12-04 02:04:44 -06:00
evazion
f94dfbf17e Fix bookmarklet for whitecube URLs.
Make the bookmarklet work for URLs like this:

* http://www.pixiv.net/whitecube/user/607414/illust/59510800
* http://www.pixiv.net/whitecube/user/772090/illust/59595705
2016-10-22 16:11:44 -05:00
r888888888
4fa2741ed2 include whitecube source/rewrite strategies 2016-09-28 11:24:54 -07:00
Toks
462e1ed324 Implement #2395 for nijie twitter and tumblr 2015-06-13 11:26:47 -04:00
r888888888
866347a9f7 fix errors 2015-06-11 21:38:41 -07:00
r888888888
fd74f860ee potential fix for #2404 2015-06-10 17:28:51 -07:00
r888888888
2ddc93723c fixes #2327 2015-06-02 19:20:09 -07:00
r888888888
2d266fc0b6 uploads/batch now supports pixiv 2015-03-15 13:56:16 -07:00
r888888888
f12fb40e3e implements #2350 2015-02-20 20:04:23 -08:00
r888888888
4fcb1d2bbc support for twitter downloads 2014-12-05 14:19:36 -08:00
evazion
57bb51621e Add debugger gem.
Fix random VCR failures in Pixiv tests.

Sometimes tests randomly fail because the PHPSESSID they use in their
HTTP requests to Pixiv is different than the one that was originally
recorded by VCR. This causes VCR to complain that the requests don't
match.

This is caused by the PHPSESSID being globally cached in Memcache.
Depending on the order the tests run in (which is random), one set of
tests can use a PHPSESSID that was recorded for a /different/ set of
tests.

Improve Pixiv URL matching.

* Allow URLs that are missing the http:// part. These are sometimes seen
  in artist entries.
* Ignore URLs from random Pixiv domains such as dic.pixiv.net,
  blog.pixiv.net, etc. These are also sometimes in artist entries.

Improve normalize_for_artist_finder! URL matching.

* Normalize www.pixiv.net/stacc/username URLs.
* Correctly normalize URLs that are missing the illust ID part on the end
  (i.e. http://i2.pixiv.net/img04/img/syounen_no_uta/). These are common
  in artist entries.

Match URLs strictly when normalizing for artist entries.

Only normalize Pixiv URLs that strictly match a known format. Pass any
unrecognized URLs through without attempting to normalize them, just to
be safe.

Normalize URLs when saving artist entries.
2014-12-03 13:16:05 -08:00
r888888888
16f9a61d63 fixes #2299 2014-10-29 15:14:17 -07:00
r888888888
8d4c9d7955 fix pixiv tests 2014-10-22 17:22:36 -07:00
r888888888
3bb06c2be4 integrate ugoiras into zip+webm+preview 2014-10-19 02:30:02 -07:00
evazion
c75d2d208e normalize_for_artist_finder!: Don't crash on bad URLs
If we can't normalize the URL (because of bad IDs, it's malformed, or
the HTML page changed), just return the unnormalized URL.
2014-10-05 14:11:32 -05:00
evazion
7f3b98969f Refactor normalize_for_artist_finder!
Refactors things such that Sources::Site has a normalize_for_artist_finder!
method that delegates to the strategy for the appropriate site. This way
any site that needs to normalize URLs for the artist finder can do so.
2014-10-05 14:11:31 -05:00
Toks
9621ec7dac Support translating Pixiv "x users iri" tags 2014-06-16 14:20:28 -04:00
Toks
3230ab8781 Add warning when Pixiv post is a gallery of multiple images 2014-06-13 16:33:38 -04:00
Toks
7ca7ac2709 #1866: Support Nijie source data getting 2014-06-03 18:42:24 -04:00
Toks
b18bb73f4b Implentation for #2141 2014-05-22 20:07:15 -04:00
Toks
899fd8f71f Don't instantly make a request to get info when using bookmarklet
Currently this is done twice: once when the page first loads (although
this one isn't used) and then a second time asynchronously with
javascript (which is used). This commit removes the first one, improving
upload page load time.
2014-04-30 14:28:07 -04:00
Toks
6fbd373873 #1866: Support deviantart source rewriting
* html work page -> full image
* thumbnail -> full image
2013-11-26 22:43:23 -05:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
43177cbad8 fixes #827 2013-03-10 16:56:04 -04:00
albert
3cb84d93bd fix 2013-02-16 23:15:17 -05:00
albert
e1d78185a0 fix 2013-02-16 23:10:14 -05:00
albert
17881068e1 * Removed Pixa/Tinami sources
* Upgraded to Rails 3.2.3
* Fixed tests
2012-06-01 19:22:58 -04:00
albert
895ae18160 code cleanup 2011-09-29 16:16:03 -04:00
albert
57a0a1e7bc removed default source 2011-09-29 12:12:57 -04:00
albert
06054e5eb2 added source tests 2011-09-29 12:11:30 -04:00
albert
600fe67444 renamed some flavor text 2011-09-28 18:02:41 -04:00
albert
284141aace refactored source code, work on pixiv integration 2011-09-26 16:47:22 -04:00