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.
This commit is contained in:
evazion
2014-10-17 14:18:12 -05:00
committed by r888888888
parent 484224cee6
commit c0a803e3a6
4 changed files with 32 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ module Downloads
def before_download(url, headers, datums)
RewriteStrategies::Base.strategies.each do |strategy|
url, headers, datums = strategy.new.rewrite(url, headers, datums)
url, headers, datums = strategy.new(url).rewrite(url, headers, datums)
end
return [url, headers, datums]