diff --git a/Rakefile b/Rakefile index f823b5b7..ec7ed7cb 100644 --- a/Rakefile +++ b/Rakefile @@ -168,4 +168,11 @@ task :cleantags => [:environment] do matching_tag.delete end end +end + +desc 'update screenshots' +task :updatescreenshots => [:environment] do + Site.select(:username).where(site_changed: true, is_banned: false, is_crashing: false).all.each do |site| + ScreenshotWorker.new.perform site.username, 'index.html' + end end \ No newline at end of file diff --git a/models/site.rb b/models/site.rb index 06eeacf1..3d737643 100644 --- a/models/site.rb +++ b/models/site.rb @@ -59,8 +59,8 @@ class Site < Sequel::Model HTML_REGEX = /htm|html/ MAX_COMMENT_SIZE = 420 # Used to be the limit for Facebook.. no comment (PUN NOT INTENDED). - SCREENSHOT_RESOLUTIONS = ['235x141', '105x63', '270x162', '37x37', '146x88', '302x182', '90x63', '82x62', '348x205'] - THUMBNAIL_RESOLUTIONS = ['105x63', '90x63'] + SCREENSHOT_RESOLUTIONS = ['540x405', '210x158', '100x100', '50x50'] + THUMBNAIL_RESOLUTIONS = ['210x158'] CLAMAV_THREAT_MATCHES = [ /^VBS/, @@ -779,7 +779,6 @@ class Site < Sequel::Model following_ids = self.followings_dataset.select(:site_id).all.collect {|f| f.site_id} Event.filter(site_id: following_ids+[self.id]). order(:created_at.desc). - exclude(actioning_site_id: self.id). paginate(current_page, limit) end diff --git a/views/_follows.erb b/views/_follows.erb index bd0a9f74..e711a3a5 100644 --- a/views/_follows.erb +++ b/views/_follows.erb @@ -6,7 +6,7 @@
You are not following any sites yet. Add some by browsing sites or looking at your tags.
<% else %>
<% site.followings_dataset.select(:site_id).all.each do |following| %>
-
+
<% end %>
<% end %>
@@ -21,7 +21,7 @@
<% else %>
<% site.follows_dataset.select(:actioning_site_id).all.each do |follow| %>
<% follow_actioning_site = follow.actioning_site_dataset.select(:username).first %>
-
+
<% end %>
<% end %>
diff --git a/views/_news.erb b/views/_news.erb
index bbc7ea64..3d2192c1 100644
--- a/views/_news.erb
+++ b/views/_news.erb
@@ -18,15 +18,23 @@