aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--instance/sqlite.py13
-rwxr-xr-xnewspipe/commands.py13
2 files changed, 13 insertions, 13 deletions
diff --git a/instance/sqlite.py b/instance/sqlite.py
index 0fec8f3d..43cdc2af 100644
--- a/instance/sqlite.py
+++ b/instance/sqlite.py
@@ -19,19 +19,6 @@ SQLALCHEMY_DATABASE_URI = "sqlite:///newspipe.db"
# Security
CONTENT_SECURITY_POLICY = {
- 'default-src': '\'self\'',
- 'img-src': '*',
- 'media-src': [
- 'youtube.com',
- ],
- 'script-src': [
- '\'self\'',
- '\'unsafe-inline\'',
- ],
- 'style-src': [
- '\'self\'',
- '\'unsafe-inline\'',
- ]
}
# Crawler
diff --git a/newspipe/commands.py b/newspipe/commands.py
index a12f92ce..06b7dda9 100755
--- a/newspipe/commands.py
+++ b/newspipe/commands.py
@@ -116,6 +116,19 @@ def delete_read_articles():
print("Read articles deleted.")
+@application.cli.command("fix_article_entry_id")
+def fix_article_entry_id():
+ filter = {}
+ filter["entry_id"] = None
+ articles = ArticleController().read(**filter).limit(50)
+ for article in articles:
+ try:
+ article.entry_id = str(article.id)
+ db.session.commit()
+ except:
+ db.session.rollback()
+
+
@application.cli.command("fetch_asyncio")
@click.option('--user-id', default=None, help='Id of the user')
@click.option('--feed-id', default=None, help='If of the feed')
bgstack15