diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 795daa9d0..9651ddd73 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -119,6 +119,7 @@ def cron_fn(every_5m, every_1d, every_1mo, every_2mo, manual): if manual: _get_real_sizes() + _undo_video_migration() g.db.commit() except: @@ -533,4 +534,44 @@ def _get_real_sizes(): except FileNotFoundError: for media_usage in media.usages: g.db.delete(media_usage) - g.db.delete(media) \ No newline at end of file + g.db.delete(media) + +def _undo_video_migration(): + body_archiveorg_link_regex = re.compile(r'\* \[archive.org\]\(https://web.archive.org/(.*?)\)', flags=re.A) + body_html_archiveorg_link_regex = re.compile(r'
  • \n?