1
0

Revert "Add output flushing after each print so that the output appears in journal"

This reverts commit 4e0ad411f3.
This commit is contained in:
2021-10-15 00:20:16 +02:00
parent 4e0ad411f3
commit f842246002

View File

@@ -5,7 +5,6 @@ import subprocess
import argparse import argparse
from notifypy import Notify from notifypy import Notify
import os import os
import sys
feedparser.USER_AGENT = "anime-rss/1.0" feedparser.USER_AGENT = "anime-rss/1.0"
@@ -49,14 +48,12 @@ with open(args.c, "r") as config:
for feed in feeds["Feeds"]: for feed in feeds["Feeds"]:
print(BOLD + "Checking feed: " + feed["ID"] + RESET) print(BOLD + "Checking feed: " + feed["ID"] + RESET)
sys.stdout.flush()
NewsFeed = feedparser.parse(feed["URL"]) NewsFeed = feedparser.parse(feed["URL"])
for anime in feed["Animes"]: for anime in feed["Animes"]:
print( print(
"Checking anime: " + BOLD_RED + anime["Title"] + RESET + " - Airing every " + UNDERLINE + anime["Airing"] + "Checking anime: " + BOLD_RED + anime["Title"] + RESET + " - Airing every " + UNDERLINE + anime["Airing"] +
RESET + " " + anime["Local"] + "/x") RESET + " " + anime["Local"] + "/x")
sys.stdout.flush()
entries = NewsFeed.entries entries = NewsFeed.entries
@@ -73,7 +70,6 @@ for feed in feeds["Feeds"]:
if int(episodeNumber[0]) > int(anime["Local"]): if int(episodeNumber[0]) > int(anime["Local"]):
print(BOLD_GREEN + "NEW NEW NEW " + anime["Title"] + " " + episodeNumber[0] + RESET) print(BOLD_GREEN + "NEW NEW NEW " + anime["Title"] + " " + episodeNumber[0] + RESET)
sys.stdout.flush()
if subprocess.run(["transmission-remote", "-a", entry.link, "-w", build_target_folder()]).returncode == 0: if subprocess.run(["transmission-remote", "-a", entry.link, "-w", build_target_folder()]).returncode == 0:
anime["Local"] = str(int(anime["Local"]) + 1).zfill(2) anime["Local"] = str(int(anime["Local"]) + 1).zfill(2)