about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-11-27 16:26:18 +0100
committerGitHub <noreply@github.com>2018-11-27 16:26:18 +0100
commit33be091f506242b136b0d4a65cf06a0babc4d757 (patch)
tree0f9f6e40e40f4ecabfa1e5f906000abe756f42a9 /lib
parent6b6e633c095485f95350c4308a942192e5fe8806 (diff)
parent55edfd6e0e1cb5377f0c3406d94ddfd84ddb7b20 (diff)
Merge pull request #828 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/accounts_cli.rb3
-rw-r--r--lib/mastodon/media_cli.rb2
-rw-r--r--lib/mastodon/version.rb2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 142436c19..9f7870bcd 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -242,8 +242,9 @@ module Mastodon
           end
 
           culled += 1
-          say('.', :green, false)
+          say('+', :green, false)
         else
+          account.touch # Touch account even during dry run to avoid getting the account into the window again
           say('.', nil, false)
         end
       end
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb
index 99660dd1d..6152d5a09 100644
--- a/lib/mastodon/media_cli.rb
+++ b/lib/mastodon/media_cli.rb
@@ -50,10 +50,10 @@ module Mastodon
       else
         MediaAttachment.where.not(remote_url: '').where.not(file_file_name: nil).where('created_at < ?', time_ago).reorder(nil).find_in_batches do |media_attachments|
           media_attachments.each do |m|
+            size += m.file_file_size || 0
             Maintenance::UncacheMediaWorker.new.perform(m) unless options[:dry_run]
             options[:verbose] ? say(m.id) : say('.', :green, false)
             processed += 1
-            size      += m.file_file_size || 0
           end
         end
       end
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index 60c4ffaa6..bc4712d9a 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -13,7 +13,7 @@ module Mastodon
     end
 
     def patch
-      1
+      2
     end
 
     def pre