~cedric/newspipe

816e5b77b8dd6ea8e26c307415d7eaa9ac4b5d08 — C├ędric Bonhomme a month ago 71435dc master
harmonize CRAWLER_RESOLVE_ARTICLE_URL configuration variable.
M instance/config.py => instance/config.py +1 -2
@@ 48,8 48,7 @@ DEFAULT_MAX_ERROR = 6
HTTP_PROXY = ""
CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)"
CRAWLER_TIMEOUT = 30
CRAWLER_RESOLV = False
RESOLVE_ARTICLE_URL = False
CRAWLER_RESOLVE_ARTICLE_URL = False
FEED_REFRESH_INTERVAL = 120

# Notification

M instance/sqlite.py => instance/sqlite.py +1 -2
@@ 40,8 40,7 @@ DEFAULT_MAX_ERROR = 6
HTTP_PROXY = ""
CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)"
CRAWLER_TIMEOUT = 30
CRAWLER_RESOLV = False
RESOLVE_ARTICLE_URL = False
CRAWLER_RESOLVE_ARTICLE_URL = False
FEED_REFRESH_INTERVAL = 0

# Notification

M newspipe/controllers/feed.py => newspipe/controllers/feed.py +3 -3
@@ 98,9 98,9 @@ class FeedController(AbstractController):
        from .article import ArticleController

        self._ensure_icon(attrs)
        if "category_id" in attrs and attrs["category_id"] == 0:
            del attrs["category_id"]
        elif "category_id" in attrs:
        # if "category_id" in attrs and attrs["category_id"] == 0:
        #     del attrs["category_id"]
        if "category_id" in attrs:
            art_contr = ArticleController(self.user_id)
            for feed in self.read(**filters):
                art_contr.update(

M newspipe/lib/article_utils.py => newspipe/lib/article_utils.py +1 -1
@@ 87,7 87,7 @@ async def get_article_details(entry, fetch=True):
    article_title = html.unescape(entry.get("title", ""))
    if (
        fetch
        and application.config["CRAWLER_RESOLV"]
        and application.config["CRAWLER_RESOLVE_ARTICLE_URL"]
        and article_link
        or not article_title
    ):

M newspipe/web/views/feed.py => newspipe/web/views/feed.py +3 -2
@@ 256,8 256,8 @@ def process_form(feed_id=None):
        "category_id": form.category_id.data,
        "private": form.private.data,
    }
    if not feed_attr["category_id"] or feed_attr["category_id"] == "0":
        del feed_attr["category_id"]
    # if not feed_attr["category_id"] or feed_attr["category_id"] == "0":
    #     del feed_attr["category_id"]

    for filter_attr in ("type", "pattern", "action on", "action"):
        for i, value in enumerate(request.form.getlist(filter_attr.replace(" ", "_"))):


@@ 267,6 267,7 @@ def process_form(feed_id=None):

    if feed_id is not None:
        # Edit an existing feed
        print(feed_attr["category_id"])
        feed_contr.update({"id": feed_id}, feed_attr)
        flash(
            gettext(