Commit Graph

595 Commits

Author SHA1 Message Date
r888888888
177ef0ebcc fixes #2307 2014-11-19 17:17:26 -08:00
Toks
e6e6b2fe1c fixes #2095 2014-11-18 15:13:43 -05:00
Albert Yi
2f481cccd0 Merge pull request #2303 from r888888888/stripe
Stripe integration
2014-11-07 14:17:50 -08:00
Albert Yi
3af9b4e9e8 Merge pull request #2304 from r888888888/admin-dashboard
Admin dashboard
2014-11-07 14:12:55 -08:00
Toks
99fb4e60ab Fix iqdb
file was getting deleted before it got used
2014-11-07 02:39:15 -05:00
r888888888
7195c0b5fd admin dashboard 2014-11-06 18:05:33 -08:00
r888888888
cbf48ad948 add stripe integration for safebooru 2014-11-06 17:03:17 -08:00
r888888888
a071539487 make sure to delete tempfiles 2014-11-04 13:06:26 -08:00
r888888888
16f9a61d63 fixes #2299 2014-10-29 15:14:17 -07:00
r888888888
d9b87655fa remove unused file 2014-10-29 14:26:58 -07:00
r888888888
38d48081a0 log any ffmpeg/mkvmerge errors 2014-10-28 13:38:47 -07:00
r888888888
3aa0ee2a75 hide ugoira preview/video link if it hasn't finished processing 2014-10-28 11:30:02 -07:00
r888888888
7bc5cf9ddb support for running ugoira conversion manually from console 2014-10-28 11:15:46 -07:00
Toks
3194df7e85 Add more cases for normalizing pixiv source searches 2014-10-25 15:49:59 -04:00
r888888888
981e6dab67 no longer require presence of ugoira tag to process ugoira posts 2014-10-23 16:34:31 -07:00
r888888888
69564c4bff fix async processing for ugoira 2014-10-22 22:48:20 -07:00
r888888888
e8f973601c fixes for ugoira convert 2014-10-22 22:15:05 -07:00
Albert Yi
4ef18c61aa Merge pull request #2277 from evazion/ugoira-fix-model
Fix frame data records being created for non-ugoira posts.
2014-10-22 17:26:03 -07:00
r888888888
8d4c9d7955 fix pixiv tests 2014-10-22 17:22:36 -07:00
evazion
035466cfdf Fix call to PixivUgoiraConverter.delay.
Should be `PixivUgoiraConverter.new.delay`, not PixivUgoiraConverter.delay`.
2014-10-19 10:26:21 -05:00
r888888888
b1d5bb8272 make ugoira webm+preview generation async 2014-10-19 02:30:03 -07:00
evazion
38cb35ffbd Only fetch ugoira data for ugoira URLs.
Don't fetch ugoira data for http://i1.pixiv.net/img35/img/kinokoyarou/46165361.png URLs.
2014-10-19 02:30:03 -07:00
evazion
c0a803e3a6 Allow ugoira to be uploaded directly from the zip URL.
This refactors things such that

* Fetching the ugoira frame data happens at the end of rewrite, not
  rewrite_html_pages. This way uploading zip URLs should work.
* The source data is cached in an instance variable in case it
  was indeed fetched during rewrite_html_pages. This way it doesn't get
  fetched a second time.
2014-10-19 02:30:03 -07:00
Toks
b3dbd0be4c Simplify zip extracting code 2014-10-19 02:30:03 -07:00
Toks
230a5ad37e Fix ugoira thumbs not being scaled down to 150x150 2014-10-19 02:30:03 -07:00
Toks
5f9ce7ee47 Fix get_image_url_from_page call 2014-10-19 02:30:02 -07:00
Toks
d47327be1d Fix argument error 2014-10-19 02:30:02 -07:00
Toks
cbc3b48778 Fix zip file not being closed
file.get_input_stream leaves the file open by default, which means the
zip cannot be moved later on. But the block version of it closes the
file automatically.
2014-10-19 02:30:02 -07:00
Toks
d05311a3eb Fix error reading zip 2014-10-19 02:30:02 -07:00
r888888888
4c73fb9f79 add ugoira support in view 2014-10-19 02:30:02 -07:00
r888888888
3bb06c2be4 integrate ugoiras into zip+webm+preview 2014-10-19 02:30:02 -07:00
r888888888
0a61aac231 refactor 2014-10-19 02:30:02 -07:00
Toks
5bc0bb88cf Fix webm converter outputting non-webm videos
mkvmerge didn't realize it was supposed to output a webm specifically
because write_path does not have a file extension. The --webm option
tells it this instead.
2014-10-19 02:30:02 -07:00
r888888888
57001a7e39 minor sanitization of file extensions 2014-10-19 02:30:01 -07:00
r888888888
fb2219d4ac integrate ugoira converted into upload flow 2014-10-19 02:30:01 -07:00
r888888888
50730c6d0d implement ugoira converter 2014-10-19 02:30:01 -07:00
Toks
36be58561b Fix last frame of webms not displaying right in some browsers
Some browsers like Chrome (and some video players like MPC-HC) do not
display the last frame of a webm (or they display it, but only very
briefly) if set to loop. This commit is a hack to force the last frame
to display for the correct amount of time by duplicating it.
2014-10-19 02:30:01 -07:00
Toks
047c6a300c Various fixes to ugoira->webm converter
* Fix regex for getting frame data not working if agent is logged in to
pixiv
* Fix #unpack not returning the unpacked folder
* Fix frame_data being inaccessible because it was a local variable
* Fix images getting put in tmpdir, when they're expected to be in
tmpdir/images
* Fix deleting the tmpdir manually (it gets deleted automatically)
* Fix output webm being put in tmpdir (which gets deleted) instead of
write_path
2014-10-19 02:30:01 -07:00
r888888888
3a2c58de3f work on ugoira converter 2014-10-19 02:30:01 -07:00
Toks
c082ed18ce Fix deleted posts link not being visible to basic members 2014-10-18 02:05:51 -04:00
evazion
ee87fbd56f Show Pool excerpt for ordpool:1234 searches. 2014-10-13 18:15:38 -05:00
Toks
2e8230f92a Merge pull request #2263 from evazion/new-pixiv-urls-fixes
Fix artist finder and URL rewriting for new Pixiv URLs
2014-10-05 16:16:04 -04: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
f4529e73e3 Cache seiga and nijie sessions 2014-10-05 12:11:08 -04:00
evazion
ec0f226f46 Make the artist finder work with new Pixiv URLs. 2014-10-04 12:45:37 -05:00
evazion
964b5efcd3 Rewrite Pixiv small/medium images to full size images.
There are two kinds of thumbnails that need to be rewritten. First case:
new /img-master/ URLs need to be rewritten to /img-original/ URLs like this:

    http://i2.pixiv.net/c/600x600/img-master/img/2014/10/04/03/59/52/46337015_p0_master1200.jpg
    => http://i2.pixiv.net/img-original/img/2014/10/04/03/59/52/46337015_p0.png

This is what `rewrite_new_medium_images` does. In order to do this, it
has to use the Pixiv API to get the correct file extension.

Second case: Old small/medium size URLs need to be rewritten to full
size URLs like this:

    http://i2.pixiv.net/img18/img/evazion/14901720_m.png
    => http://i2.pixiv.net/img18/img/evazion/14901720.png

But when the medium size URL is actually for a manga image, it needs to be
rewritten to the big manga URL instead:

    http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_m.jpg
    => http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_big_p0.jpg

But we can't tell whether it's a manga image from the URL, so we have to
use the manga page count from either the HTML page or the API to
determine whether it's part of a manga gallery.

So in order to make this work, `rewrite_old_small_and_medium_images`
takes an `is_manga` flag. `Sources::Strategies::Pixiv#get` gets the
page count from the HTML and passes the `is_manga` flag on down through
the call chain until `rewrite_old_small_and_medium_images` gets it.

When `rewrite_old_small_and_medium_images` is called from
`Downloads::Strategies::Pixiv#rewrite_thumbnails`, the `is_manga` flag
isn't passed in because we didn't scrape the HTML. This causes
`rewrite_old_small_and_medium_images` to look it up in the API instead.
2014-10-04 12:45:37 -05:00
evazion
daf196bd0e Rewrite old Pixiv small manga images correctly.
This prevents incorrectly rewriting these new Pixiv URLs:

* http://i1.pixiv.net/c/600x600/img-master/img/2014/09/24/23/25/08/46168376_p0_master1200.jpg
* http://i1.pixiv.net/img-original/img/2014/09/25/23/09/29/46183440_p0.jpg
2014-10-04 12:45:37 -05:00
evazion
36a78361d7 Normalize URLs to the mode=medium page correctly.
This handles a few new cases that weren't handled correctly previously.

* http://i1.pixiv.net/img-zip-ugoira/img/2014/10/03/17/29/16/46323924_ugoira1920x1080.zip
* http://i1.pixiv.net/c/600x600/img-master/img/2014/10/02/13/51/23/46304396_p0_master1200.jpg
* http://www.pixiv.net/member_illust.php?mode=manga&illust_id=18557054
* http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id=18557054&page=1
* http://www.pixiv.net/i/18557054
2014-10-04 12:45:36 -05:00
evazion
f889dbf10f Add get_metadata_from_spapi! 2014-10-04 12:45:36 -05:00