clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

Failed downloads classed as complete #1874

Closed GTunney closed 7 months ago

GTunney commented 2 years ago

Describe the bug Since about the past week or 2 nzbtomedia has been classing downloads which fail as complete and then post processing these as complete. From what I can see it's only SickGear effected by this. Instead of returning a failed to sickgear it returns as complete.

Technical Specs

  1. Linux QNAP TS-653B
  2. Python 3.10.0
  3. Sabnzbd
  4. SickGear

Expected behavior nzbtomedia should pass the download as failed back to SickGear

Log

08:29:05] [INFO]::MAIN: Loading config from [/share/CACHEDEV1_DATA/.qpkg/nzbToMedia/nzbToMedia/autoProcessMedia.cfg]
[08:29:06] [INFO]::MAIN: Python v3.10 will reach end of life in 1701 days.
[08:29:06] [INFO]::MAIN: Checking database structure...
[08:29:06] [INFO]::MAIN: Checking if git needs an update
[08:29:06] [INFO]::MAIN: No update needed
[08:29:06] [INFO]::MAIN: nzbToMedia Version:27669389216902d1085660167e7bda0bd8527ecf Branch:master (Linux 5.10.60-qnap)
[08:29:06] [INFO]::MAIN: #########################################################
[08:29:06] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[08:29:06] [INFO]::MAIN: #########################################################
[08:29:06] [INFO]::MAIN: Script triggered from SABnzbd Version 3.5.0.
[08:29:07] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[08:29:07] [INFO]::MAIN: Extracting /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES/__ADMIN__/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES.mkv-xpost.nzb.gz to /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES/__ADMIN__
[08:29:07] [INFO]::MAIN: EXTRACTOR: Extraction was successful for /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES/__ADMIN__/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES.mkv-xpost.nzb.gz to /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES/__ADMIN__
[08:29:10] [INFO]::MAIN: Calling SickBeard:tv to post-process:All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES
[08:29:10] [INFO]::MAIN: Attempting to auto-detect tv fork
[08:29:10] [INFO]::MAIN: SickBeard:tv fork auto-detection successful ...
[08:29:10] [INFO]::MAIN: SickBeard:tv fork set to SickGear-api
[08:29:10] [INFO]::MAIN: SickBeard:tv Could not create a fork object for SickGear-api. Probaly class not added yet.
[08:29:10] [INFO]::MAIN: FLATTEN: Flattening directory: /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES
[08:29:11] [INFO]::TRANSCODER: Checking [All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES.mkv] for corruption, please stand by ...
[08:29:11] [INFO]::TRANSCODER: SUCCESS: [All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES.mkv] has no corruption.
[08:29:11] [INFO]::MAIN: Found Valid Videos. Setting status Success
[08:29:11] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[08:29:12] [INFO]::CLEANDIR: Directory /share/CACHEDEV1_DATA/Download/Incomplete/All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES has been processed and removed ...
[08:29:12] [INFO]::MAIN: The /share/CACHEDEV1_DATA/.qpkg/nzbToMedia/nzbToMedia/nzbToSickBeard.py script completed successfully.
Changing to directory: /share/CACHEDEV1_DATA/.qpkg/nzbToMedia/nzbToMedia

-- Cleaning bytecode --
b'Removing __pycache__/\n'
b'Removing __pycache__/\n'

-- Cleaning folders: ['libs', 'core'] --
No folders to clean

Returning to directory:  /share/CACHEDEV1_DATA/.qpkg/SABnzbd/SABnzbd

-- Cleanup finished --

SickBeard: Successfully post-processed All.of.Us.Are.Dead.S01E09.Episode.9.1080p.NF.WEB-DL.DUAL.DDP5.1.x264-TEPES!
clinton-hall commented 2 years ago

ok... if you don't want the script to try and extract and check to see if there are playable videos (in case the failure was only in the sample etc) then you disable this by either:

[SickBeard]
  [[tv]]
    extract = 0

this will prevent SickBeard:tv from attempting extract of any archives.

or

[General]
  no_extract_failed = 1

this will prevent any download type from attempting to extract a failed download... I suspect this is the option you want to set.

GTunney commented 2 years ago

Thanks Clinton will give this a go, is this only a recent change? Only seems to have been an issue the past 2 weeks.

clinton-hall commented 2 years ago

It has been this way for several years. I'm not sure if the nature of the failures (Sabnzbd) for some of tour TV series has changed?

This only happens if the download fails and the script finds archives that can still be extracted and then contains playable media... so it could be that these releases have had some odd compression that Sabnzbd isn't extracting?