From b41a14988f9066a9b9ccdc5c0adf69327ca6f541 Mon Sep 17 00:00:00 2001 From: Ray Pulsipher Date: Sat, 18 Jun 2022 13:06:06 -0700 Subject: [PATCH] - Added fix_youtube_urls to remove garbage html tags that get picked up. --- web2py/applications/smc/models/x_scheduler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web2py/applications/smc/models/x_scheduler.py b/web2py/applications/smc/models/x_scheduler.py index ec82e764..861032f8 100644 --- a/web2py/applications/smc/models/x_scheduler.py +++ b/web2py/applications/smc/models/x_scheduler.py @@ -1520,9 +1520,9 @@ def cleanup_youtube_urls(): yt_urls_fixed_count += 1 print(f"Fixed YT URL: {yt_url} -> {new_yt_url}") - # media_file.youtube_url = yt_url - # media_file.update_record() - # db.commit() + #media_file.youtube_url = yt_url + media_file.update_record(youtube_url=new_yt_url) + db.commit() print(f"Fixed {yt_urls_fixed_count} out of {media_files_count} youtube urls.") return