diff --git a/sabnzbd/assembler.py b/sabnzbd/assembler.py index 1c80364..2e8b7f7 100644 --- a/sabnzbd/assembler.py +++ b/sabnzbd/assembler.py @@ -248,19 +248,6 @@ class Assembler(Thread): nzf.md5sum = nzf.md5.digest() -def file_has_articles(nzf: NzbFile): - """Do a quick check to see if any articles are present for this file. - Destructive: only to be used to differentiate between unknown encoding and no articles. - """ - has = False - for article in nzf.decodetable: - sleep(0.01) - data = sabnzbd.ArticleCache.load_article(article) - if data: - has = True - return has - - RE_SUBS = re.compile(r"\W+sub|subs|subpack|subtitle|subtitles(?![a-z])", re.I) SAFE_EXTS = (".mkv", ".mp4", ".avi", ".wmv", ".mpg", ".webm") diff --git a/sabnzbd/nzbqueue.py b/sabnzbd/nzbqueue.py index 115ad0b..fece75f 100644 --- a/sabnzbd/nzbqueue.py +++ b/sabnzbd/nzbqueue.py @@ -55,7 +55,6 @@ from sabnzbd.constants import ( import sabnzbd.cfg as cfg from sabnzbd.downloader import Server -from sabnzbd.assembler import file_has_articles import sabnzbd.notifier as notifier @@ -755,9 +754,6 @@ class NzbQueue: elif nzf.filename.lower().endswith(".par2"): # Broken par2 file, try to get another one nzo.promote_par2(nzf) - else: - if file_has_articles(nzf): - logging.warning(T("%s -> Unknown encoding"), nzf.filename) # Save bookkeeping in case of crash if file_done and (nzo.next_save is None or time.time() > nzo.next_save): diff --git a/sabnzbd/nzbstuff.py b/sabnzbd/nzbstuff.py index 7d12aa2..4d748f4 100644 --- a/sabnzbd/nzbstuff.py +++ b/sabnzbd/nzbstuff.py @@ -1215,12 +1215,7 @@ class NzbObject(TryList): @synchronized(NZO_LOCK) def remove_saved_article(self, article: Article): - try: - self.saved_articles.remove(article) - except ValueError: - # It's not there if the job is fully missing - # and this function is called from file_has_articles - pass + self.saved_articles.remove(article) def check_existing_files(self, wdir: str): """Check if downloaded files already exits, for these set NZF to complete"""