clinton-hall / nzbToMedia

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

Completed folder being deleted after post-processing #1801

Closed DrakeJones closed 3 years ago

DrakeJones commented 3 years ago

Folder structure

This week my completed TV folder (folder structure ADMIN>comp>tv) gets deleted after post-processing. (See bolded line in Log, below). It's a new thing and I don't recall tweeking my .cfg before it happened. I am using scripts invoked via SABnzbd catagories. The folder gets recreated automatically when SABnzbd starts processing the download, but the folder is deleted after medusa moves the file to its final destination. I re-cloned nzbTomedia and redid the .cfg, but the behaviour didn't change, If I disable nzbTomedia script and just use SABnzbd with Medusa automatic (polling) post-process, the TV completed folder is not deleted. I've tried a load of settings permutations, but I can't seem to find the trigger for the folder deletion.

Technical Specs

  1. Running on Windows 7 x64 AMD
  2. Python version 3.7 Down Client SABnbzd
  3. Intended Media Management Medusa

Expected behavior Expect completed folder to be left in directory

Log 2020-12-17 09:14:55 INFO ::MAIN: Loading config from [C:\Scripts\nzbToMedia\autoProcessMedia.cfg] 2020-12-17 09:14:55 INFO ::ENVIRONMENT: ALLUSERSPROFILE: C:\ProgramData 2020-12-17 09:14:55 INFO ::ENVIRONMENT: AMDAPPSDKROOT: C:\Program Files (x86)\AMD APP\ 2020-12-17 09:14:55 INFO ::ENVIRONMENT: APPDATA: C:\Users\Jack\AppData\Roaming 2020-12-17 09:14:55 INFO ::ENVIRONMENT: ASL.LOG: Destination=file 2020-12-17 09:14:55 INFO ::ENVIRONMENT: CLIENTNAME: HP 2020-12-17 09:14:55 INFO ::ENVIRONMENT: COMMONPROGRAMFILES: C:\Program Files\Common Files 2020-12-17 09:14:55 INFO ::ENVIRONMENT: COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files 2020-12-17 09:14:55 INFO ::ENVIRONMENT: COMMONPROGRAMW6432: C:\Program Files\Common Files 2020-12-17 09:14:55 INFO ::ENVIRONMENT: COMPUTERNAME: SERVER 2020-12-17 09:14:55 INFO ::ENVIRONMENT: COMSPEC: C:\Windows\system32\cmd.exe 2020-12-17 09:14:55 INFO ::ENVIRONMENT: FP_NO_HOST_CHECK: NO 2020-12-17 09:14:55 INFO ::ENVIRONMENT: HOMEDRIVE: C: 2020-12-17 09:14:55 INFO ::ENVIRONMENT: HOMEPATH: \Users\Jack 2020-12-17 09:14:55 INFO ::ENVIRONMENT: LOCALAPPDATA: C:\Users\Jack Sprat\AppData\Local 2020-12-17 09:14:55 INFO ::ENVIRONMENT: LOGONSERVER: \SERVER 2020-12-17 09:14:55 INFO ::ENVIRONMENT: NUMBER_OF_PROCESSORS: 6 2020-12-17 09:14:55 INFO ::ENVIRONMENT: OS: Windows_NT 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PATH: C:\Python37\lib\site-packages\pywin32_system32;C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;"C:\Program Files\Java\jre1.8.0_231\bin\java.exe";C:\Program Files\ffmpeg\bin\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Git\cmd;C:\Scripts\nzbToMedia;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Jack Sprat\AppData\Local\GitHubDesktop\bin;C:\Python\Python27;Python37;C:\Python37\Scripts;c:\Scripts\nzbToMedia\;c:\Python37\Lib\site-packages\ 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROCESSOR_ARCHITECTURE: AMD64 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROCESSOR_IDENTIFIER: AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROCESSOR_LEVEL: 16 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROCESSOR_REVISION: 0a00 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROGRAMDATA: C:\ProgramData 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROGRAMFILES: C:\Program Files 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROGRAMFILES(X86): C:\Program Files (x86) 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROGRAMW6432: C:\Program Files 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PROMPT: $P$G 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules 2020-12-17 09:14:55 INFO ::ENVIRONMENT: PUBLIC: C:\Users\Public 2020-12-17 09:14:55 INFO ::ENVIRONMENT: SESSIONNAME: RDP-Tcp#0 2020-12-17 09:14:55 INFO ::ENVIRONMENT: SYSTEMDRIVE: C: 2020-12-17 09:14:55 INFO ::ENVIRONMENT: SYSTEMROOT: C:\Windows 2020-12-17 09:14:55 INFO ::ENVIRONMENT: TEMP: C:\Users\JACK\AppData\Local\Temp 2020-12-17 09:14:55 INFO ::ENVIRONMENT: TMP: C:\Windows\TEMP 2020-12-17 09:14:55 INFO ::ENVIRONMENT: USERDOMAIN: Server 2020-12-17 09:14:55 INFO ::ENVIRONMENT: USERNAME: Jack 2020-12-17 09:14:55 INFO ::ENVIRONMENT: USERPROFILE: C:\Users\Jack 2020-12-17 09:14:55 INFO ::ENVIRONMENT: WINDIR: C:\Windows 2020-12-17 09:14:55 INFO ::MAIN: Python v3.7 will reach end of life in 922 days. 2020-12-17 09:14:55 INFO ::MAIN: Checking database structure... 2020-12-17 09:14:55 INFO ::MAIN: Database upgrade required: Initial Schema 2020-12-17 09:14:55 INFO ::MAIN: Checking if git needs an update 2020-12-17 09:14:56 INFO ::MAIN: No update needed 2020-12-17 09:14:56 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Windows 7) 2020-12-17 09:14:56 INFO ::MAIN: ######################################################### 2020-12-17 09:14:56 INFO ::MAIN: ## ..::[nzbToMedia.py]::.. ## 2020-12-17 09:14:56 INFO ::MAIN: ######################################################### 2020-12-17 09:14:56 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ... 2020-12-17 09:14:56 INFO ::MAIN: Searching D:\ADMIN\comp\movie for mediafiles to post-process ... 2020-12-17 09:14:56 INFO ::MAIN: Searching D:\ADMIN\comp\tv for mediafiles to post-process ... 2020-12-17 09:14:56 ERROR ::MAIN: Failed to add directories from D:\ADMIN\comp\tv for post-processing: [WinError 3] The system cannot find the path specified: 'D:\ADMIN\comp\tv' 2020-12-17 09:14:56 INFO ::MAIN: Searching D:\ADMIN\comp\music for mediafiles to post-process ... 2020-12-17 09:14:56 INFO ::MAIN: The C:\Scripts\nzbToMedia\nzbToMedia.py script completed successfully. 2020-12-17 09:15:28 INFO ::MAIN: Loading config from [C:\Scripts\nzbToMedia\autoProcessMedia.cfg] 2020-12-17 09:15:28 INFO ::ENVIRONMENT: ALLUSERSPROFILE: C:\ProgramData 2020-12-17 09:15:28 INFO ::ENVIRONMENT: AMDAPPSDKROOT: C:\Program Files (x86)\AMD APP\ 2020-12-17 09:15:28 INFO ::ENVIRONMENT: APPDATA: C:\Users\Jack Sprat\AppData\Roaming 2020-12-17 09:15:28 INFO ::ENVIRONMENT: ASL.LOG: Destination=file 2020-12-17 09:15:28 INFO ::ENVIRONMENT: CLIENTNAME: HP 2020-12-17 09:15:28 INFO ::ENVIRONMENT: COMMONPROGRAMFILES: C:\Program Files\Common Files 2020-12-17 09:15:28 INFO ::ENVIRONMENT: COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files 2020-12-17 09:15:28 INFO ::ENVIRONMENT: COMMONPROGRAMW6432: C:\Program Files\Common Files 2020-12-17 09:15:28 INFO ::ENVIRONMENT: COMPUTERNAME: SERVER 2020-12-17 09:15:28 INFO ::ENVIRONMENT: COMSPEC: C:\Windows\system32\cmd.exe 2020-12-17 09:15:28 INFO ::ENVIRONMENT: FP_NO_HOST_CHECK: NO 2020-12-17 09:15:28 INFO ::ENVIRONMENT: HOMEDRIVE: C: 2020-12-17 09:15:28 INFO ::ENVIRONMENT: HOMEPATH: \Users\Jack Sprat 2020-12-17 09:15:28 INFO ::ENVIRONMENT: LOCALAPPDATA: C:\Users\Jack Sprat\AppData\Local 2020-12-17 09:15:28 INFO ::ENVIRONMENT: LOGONSERVER: \SERVER 2020-12-17 09:15:28 INFO ::ENVIRONMENT: NUMBER_OF_PROCESSORS: 6 2020-12-17 09:15:28 INFO ::ENVIRONMENT: OS: Windows_NT 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PATH: C:\Python37\lib\site-packages\pywin32_system32;C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;"C:\Program Files\Java\jre1.8.0_231\bin\java.exe";C:\Program Files\ffmpeg\bin\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Git\cmd;C:\Scripts\nzbToMedia;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Jack Sprat\AppData\Local\GitHubDesktop\bin;C:\Python\Python27;Python37;C:\Python37\Scripts;c:\Scripts\nzbToMedia\;c:\Python37\Lib\site-packages\ 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROCESSOR_ARCHITECTURE: AMD64 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROCESSOR_IDENTIFIER: AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROCESSOR_LEVEL: 16 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROCESSOR_REVISION: 0a00 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROGRAMDATA: C:\ProgramData 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROGRAMFILES: C:\Program Files 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROGRAMFILES(X86): C:\Program Files (x86) 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROGRAMW6432: C:\Program Files 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PROMPT: $P$G 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules 2020-12-17 09:15:28 INFO ::ENVIRONMENT: PUBLIC: C:\Users\Public 2020-12-17 09:15:28 INFO ::ENVIRONMENT: SESSIONNAME: RDP-Tcp#0 2020-12-17 09:15:28 INFO ::ENVIRONMENT: SYSTEMDRIVE: C: 2020-12-17 09:15:28 INFO ::ENVIRONMENT: SYSTEMROOT: C:\Windows 2020-12-17 09:15:28 INFO ::ENVIRONMENT: TEMP: C:\Users\JACKSP~1\AppData\Local\Temp 2020-12-17 09:15:28 INFO ::ENVIRONMENT: TMP: C:\Windows\TEMP 2020-12-17 09:15:28 INFO ::ENVIRONMENT: USERDOMAIN: Server 2020-12-17 09:15:28 INFO ::ENVIRONMENT: USERNAME: Jack Sprat 2020-12-17 09:15:28 INFO ::ENVIRONMENT: USERPROFILE: C:\Users\Jack Sprat 2020-12-17 09:15:28 INFO ::ENVIRONMENT: WINDIR: C:\Windows 2020-12-17 09:15:28 INFO ::MAIN: Python v3.7 will reach end of life in 922 days. 2020-12-17 09:15:28 INFO ::MAIN: Checking database structure... 2020-12-17 09:15:28 INFO ::MAIN: Checking if git needs an update 2020-12-17 09:15:29 INFO ::MAIN: No update needed 2020-12-17 09:15:29 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Windows 7) 2020-12-17 09:15:29 INFO ::MAIN: ######################################################### 2020-12-17 09:15:29 INFO ::MAIN: ## ..::[nzbToMedia.py]::.. ## 2020-12-17 09:15:29 INFO ::MAIN: ######################################################### 2020-12-17 09:15:29 WARNING ::MAIN: Invalid number of arguments received from client, Switching to manual run mode ... 2020-12-17 09:15:29 INFO ::MAIN: Searching D:\ADMIN\comp\movie for mediafiles to post-process ... 2020-12-17 09:15:29 INFO ::MAIN: Searching D:\ADMIN\comp\tv for mediafiles to post-process ... 2020-12-17 09:15:29 INFO ::MAIN: Searching D:\ADMIN\comp\music for mediafiles to post-process ... 2020-12-17 09:15:29 INFO ::MAIN: The C:\Scripts\nzbToMedia\nzbToMedia.py script completed successfully. 2020-12-17 09:28:28 INFO ::MAIN: Loading config from [C:\Scripts\nzbToMedia\autoProcessMedia.cfg] 2020-12-17 09:28:28 INFO ::ENVIRONMENT: ALLUSERSPROFILE: C:\ProgramData 2020-12-17 09:28:28 INFO ::ENVIRONMENT: AMDAPPSDKROOT: C:\Program Files (x86)\AMD APP\ 2020-12-17 09:28:28 INFO ::ENVIRONMENT: APPDATA: C:\Windows\system32\config\systemprofile\AppData\Roaming 2020-12-17 09:28:28 INFO ::ENVIRONMENT: ASL.LOG: Destination=file 2020-12-17 09:28:28 INFO ::ENVIRONMENT: COMMONPROGRAMFILES: C:\Program Files\Common Files 2020-12-17 09:28:28 INFO ::ENVIRONMENT: COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files 2020-12-17 09:28:28 INFO ::ENVIRONMENT: COMMONPROGRAMW6432: C:\Program Files\Common Files 2020-12-17 09:28:28 INFO ::ENVIRONMENT: COMPUTERNAME: SERVER 2020-12-17 09:28:28 INFO ::ENVIRONMENT: COMSPEC: C:\Windows\system32\cmd.exe 2020-12-17 09:28:28 INFO ::ENVIRONMENT: FP_NO_HOST_CHECK: NO 2020-12-17 09:28:28 INFO ::ENVIRONMENT: LOCALAPPDATA: C:\Windows\system32\config\systemprofile\AppData\Local 2020-12-17 09:28:28 INFO ::ENVIRONMENT: NUMBER_OF_PROCESSORS: 6 2020-12-17 09:28:28 INFO ::ENVIRONMENT: OS: Windows_NT 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PATH: C:\Python37\lib\site-packages\pywin32_system32;C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;"C:\Program Files\Java\jre1.8.0_231\bin\java.exe";C:\Program Files\ffmpeg\bin\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Git\cmd;C:\Scripts\nzbToMedia;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\; 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROCESSOR_ARCHITECTURE: AMD64 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROCESSOR_IDENTIFIER: AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROCESSOR_LEVEL: 16 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROCESSOR_REVISION: 0a00 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROGRAMDATA: C:\ProgramData 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROGRAMFILES: C:\Program Files 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROGRAMFILES(X86): C:\Program Files (x86) 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PROGRAMW6432: C:\Program Files 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules 2020-12-17 09:28:28 INFO ::ENVIRONMENT: PUBLIC: C:\Users\Public 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SYSTEMDRIVE: C: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SYSTEMROOT: C:\Windows 2020-12-17 09:28:28 INFO ::ENVIRONMENT: TEMP: C:\Windows\TEMP 2020-12-17 09:28:28 INFO ::ENVIRONMENT: TMP: C:\Windows\TEMP 2020-12-17 09:28:28 INFO ::ENVIRONMENT: USERDOMAIN: JELLO 2020-12-17 09:28:28 INFO ::ENVIRONMENT: USERNAME: SERVER$ 2020-12-17 09:28:28 INFO ::ENVIRONMENT: USERPROFILE: C:\Windows\system32\config\systemprofile 2020-12-17 09:28:28 INFO ::ENVIRONMENT: WINDIR: C:\Windows 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SSL_CERT_FILE: C:\SABnzbd\certifi\cacert.pem 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_BYTES: 715054924 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 654840191 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_BYTES_TRIED: 715054924 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_CAT: tv 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_DUPLICATE: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_ENCRYPTED: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_FAIL_MSG: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_FILENAME: The.Leftovers.S02E03.480p.BluRay.nSD.x264-NhaNc3.nzb 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_FINAL_NAME: The Leftovers S02E03 480p BluRay nSD x264-NhaNc3 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_GROUP: alt.binaries.teevee 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo_qpi0o229 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_OVERSIZED: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PASSWORD: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PP: 3 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PRIORITY: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_REPAIR: 1 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_STATUS: Running 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_UNPACK: 1 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_UNWANTED_EXT: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_URL: http://192.168.10.24:5076/getnzb/api/7548575323139189697?apikey=zti5vywdd53numjyin9gaiwd 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_FAILURE_URL: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_COMPLETE_DIR: D:\ADMIN\comp\tv 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PP_STATUS: 0 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_DOWNLOAD_TIME: 21 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_AVG_BPS: 29153 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_AGE: 938d 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_ORIG_NZB_GZ: D:\ADMIN\incomp\sabnzbd\The.Leftovers.S02E03.480p.BluRay.nSD.x264-__ADMIN__\The.Leftovers.S02E03.480p.BluRay.nSD.x264-NhaNc3.nzb.gz 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PROGRAM_DIR: C:\SABnzbd 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_PAR2_COMMAND: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_MULTIPAR_COMMAND: C:\SABnzbd\win\multipar\par2j64.exe 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_RAR_COMMAND: C:\SABnzbd\win\unrar\x64\UnRAR.exe 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_ZIP_COMMAND: 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_7ZIP_COMMAND: C:\SABnzbd\win\7zip\7za.exe 2020-12-17 09:28:28 INFO ::ENVIRONMENT: SAB_VERSION: 3.1.1 2020-12-17 09:28:28 INFO ::MAIN: Python v3.7 will reach end of life in 922 days. 2020-12-17 09:28:28 INFO ::MAIN: Checking database structure... 2020-12-17 09:28:28 INFO ::MAIN: Checking if git needs an update 2020-12-17 09:28:29 INFO ::MAIN: No update needed 2020-12-17 09:28:29 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Windows 7) 2020-12-17 09:28:29 INFO ::MAIN: ######################################################### 2020-12-17 09:28:29 INFO ::MAIN: ## ..::[nzbToMedia.py]::.. ## 2020-12-17 09:28:29 INFO ::MAIN: ######################################################### 2020-12-17 09:28:29 INFO ::MAIN: Script triggered from SABnzbd Version 3.1.1. 2020-12-17 09:28:29 INFO ::MAIN: Auto-detected SECTION:SickBeard 2020-12-17 09:28:29 INFO ::MAIN: Calling SickBeard:tv to post-process:The Leftovers S02E03 480p BluRay nSD x264-NhaNc3 2020-12-17 09:28:30 INFO ::MAIN: Attempting to auto-detect tv fork 2020-12-17 09:28:31 INFO ::MAIN: SickBeard:tv fork auto-detection successful ... 2020-12-17 09:28:31 INFO ::MAIN: SickBeard:tv fork set to Medusa-api 2020-12-17 09:28:31 INFO ::MAIN: FLATTEN: Flattening directory: D:\ADMIN\comp\tv 2020-12-17 09:28:31 INFO ::TRANSCODER: Checking [The Leftovers S02E03 480p BluRay nSD x264-NhaNc3.mkv] for corruption, please stand by ... 2020-12-17 09:28:32 INFO ::TRANSCODER: SUCCESS: [The Leftovers S02E03 480p BluRay nSD x264-NhaNc3.mkv] has no corruption. 2020-12-17 09:28:32 INFO ::MAIN: Checking for files to be transcoded 2020-12-17 09:28:32 POSTPROCESS::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request 2020-12-17 09:28:37 INFO ::CLEANDIRS: Directory D:\ADMIN\comp\tv has been processed, removing ... 2020-12-17 09:28:37 INFO ::MAIN: The C:\Scripts\nzbToMedia\nzbToMedia.py script completed successfully.

.cfg

nzbToMedia Configuration

For more information, visit https://github.com/clinton-hall/nzbToMedia/wiki

[General]

Enable/Disable update notifications

version_notify = 1
# Enable/Disable automatic updates
auto_update = 1
# Set to the full path to the git executable
git_path = C:\Program Files\Git\bin\git.exe
# GitHUB user for repo
git_user = DrakeJones
# GitHUB branch for repo
git_branch = nightly
# Enable/Disable forceful cleaning of leftover files following postprocess
force_clean = 0
# Enable/Disable logging debug messages to nzbtomedia.log
log_debug = 0
# Enable/Disable logging database messages to nzbtomedia.log
log_db = 0
# Enable/Disable logging environment variables to debug nzbtomedia.log (helpful to track down errors calling external tools.)
log_env = 1
# Enable/Disable logging git output to debug nzbtomedia.log (helpful to track down update failures.)
log_git = 1
# Set to the directory to search for executables if not in default system path
sys_path = ""
# Set to the directory where your ffmpeg/ffprobe executables are located
ffmpeg_path = C:\Program Files\ffmpeg\bin\
# Enable/Disable media file checking using ffprobe.
check_media = 1
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.
safe_mode = 0
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 will attempt to extract and verify if media is present.
no_extract_failed = 0

[Posix]

Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.

# Set the Niceness value for the nice command. These range from -20 (most favorable to the process) to 19 (least favorable to the process).
# If entering an integer e.g 'niceness = 4', this is added to the nice command and passed as 'nice -n4' (Default).
# If entering a comma separated list e.g. 'niceness = nice,4' this will be passed as 'nice 4' (Safer).
niceness = nice, 4
# Set the ionice scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle.
ionice_class = 0
# Set the ionice scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.
ionice_classdata = 0

[Windows]

Set specific settings for Windows systems

# Set this to 1 to allow extraction (7zip) windows to be lunched visble (for debugging) otherwise 0 to have this run in background.
show_extraction = 0

[CouchPotato]

autoProcessing for Movies

#### movie - category that gets called for post-processing with CPS
[[movie]]
    enabled = 0
    apikey = 1c29776a3d8d4d2e8b49683fc8a4f7a2
    host = localhost
    port = 5050
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    # api key for www.omdbapi.com (used as alternative to imdb)
    omdbapikey = 8d670bc8
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 1
    keep_archive = 0
    method = renamer
    delete_failed = 0
    wait_for = 2
    # Set this to suppress error if no status change after rename called
    no_status_check = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 150
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Couchpotato is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = D:\ADMIN\comp\movie
    ##### Set the recursive directory permissions to the following (0 to disable)
    chmodDirectory = 0

[Radarr]

autoProcessing for Movies

#### raCategory - category that gets called for post-processing with Radarr
[[movie]]
    enabled = 1
    apikey = d9c5369b831b45c7ace37ff5ae569577
    host = localhost
    port = 7878
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root = ""
    ssl = 0
    # api key for www.omdbapi.com (used as alternative to imdb)
    omdbapikey = 8d670bc8
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    nzbExtractionBy = Downloader
    wait_for = 6
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if NzbDrone is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = D:\ADMIN\comp\movie
    ##### Set to define import behavior Move or Copy
    importMode = move

[Watcher3]

autoProcessing for Movies

#### movie - category that gets called for post-processing with CPS
[[movie]]
    enabled = 0
    apikey = ""
    host = localhost
    port = 9090
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    # api key for www.omdbapi.com (used as alternative to imdb)
    omdbapikey = ""
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    delete_failed = 0
    wait_for = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Watcher3 is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""
    ##### Set the recursive directory permissions to the following (0 to disable)
    chmodDirectory = 0

[SickBeard]

autoProcessing for TV Series

#### tv - category that gets called for post-processing with SB
[[tv]]
    enabled = 1
    host = localhost
    port = 8081
    apikey = 73dc27573bd317e1d2a5dad9ab1b2c36
    username = ""
    password = ""
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root = ""
    ssl = 0
    fork = auto
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    process_method = ""
    # force processing of already processed content when running a manual scan.
    force = 0
    # tell SickRage/Medusa to delete all source files after processing.
    delete_on = 0
    # tell Medusa to ignore check for associated subtitle check when postponing release
    ignore_subs = 0
    extract = 1
    nzbExtractionBy = Downloader
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if SickBeard is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = D:\ADMIN\comp\tv
    ##### Set the recursive directory permissions to the following (0 to disable)
    chmodDirectory = 0

[NzbDrone]

Formerly known as NzbDrone this is now Sonarr

#### autoProcessing for TV Series
#### ndCategory - category that gets called for post-processing with NzbDrone/Sonarr
[[tv]]
    enabled = 0
    apikey = ""
    host = localhost
    port = 8989
    username = ""
    password = ""
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root = ""
    ssl = 0
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    nzbExtractionBy = Downloader
    wait_for = 6
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if NzbDrone is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""
    ##### Set to define import behavior Move or Copy
    importMode = Copy

[HeadPhones]

autoProcessing for Music

#### music - category that gets called for post-processing with HP
[[music]]
    enabled = 0
    apikey = cad4a2152f5a8ab30a66417734457fc6
    host = localhost
    port = 8181
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    delete_failed = 0
    wait_for = 2
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 1
    keep_archive = 0
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if HeadPhones is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = D:\ADMIN\comp\music

[Lidarr]

autoProcessing for Music

#### LiCategory - category that gets called for post-processing with Lidarr
[[music]]
    enabled = 1
    apikey = 47da43550b9445cdaa7ac9505f2dcfdd
    host = localhost
    port = 8686
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root = ""
    ssl = 0
    delete_failed = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    nzbExtractionBy = Downloader
    wait_for = 6
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if NzbDrone is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = D:\ADMIN\comp\music

[Mylar]

autoProcessing for Comics

#### comics - category that gets called for post-processing with Mylar
[[comics]]
    enabled = 0
    host = localhost
    port = 8090
    apikey = ""
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    web_root = ""
    ssl = 0
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Mylar is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""

[Gamez]

autoProcessing for Games

#### games - category that gets called for post-processing with Gamez
[[games]]
    enabled = 0
    apikey = ""
    host = localhost
    port = 8085
    ######
    library = Set to path where you want the processed games to be moved to.
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if Gamez is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""

[LazyLibrarian]

autoProcessing for LazyLibrarian

#### books - category that gets called for post-processing with LazyLibrarian
[[books]]
    enabled = 0
    apikey = ""
    host = localhost
    port = 5299
    ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
    ssl = 0
    web_root = ""
    # Enable/Disable linking for Torrents
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    # Set this to minimum required size to consider a media file valid (in MB)
    minSize = 0
    # Enable/Disable deleting ignored files (samples and invalid media files)
    delete_ignored = 0
    ##### Enable if LazyLibrarian is on a remote server for this category
    remote_path = 0
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""

[Network]

Enter Mount points as LocalPath,RemotePath and separate each pair with '|'

# e.g. MountPoints = /volume1/Public/,E:\|/volume2/share/,\\NAS\
mount_points = ""

[Nzb]

clientAgent - Supported clients: sabnzbd, nzbget
clientAgent = sabnzbd
###### SabNZBD (You must edit this if you're using nzbToMedia.py with SabNZBD)
sabnzbd_host = http://localhost
sabnzbd_port = 9000
sabnzbd_apikey = 288e28864571a3228a6add56b7e55f94
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
default_downloadDirectory = D:\ADMIN\comp\
# enable this option to prevent nzbToMedia from running in manual mode and scanning an entire directory.
no_manual = 0    

[Torrent]

clientAgent - Supported clients: utorrent, transmission, deluge, rtorrent, vuze, qbittorrent, synods, other
clientAgent = qbittorrent
###### useLink - Set to hard for physical links, sym for symbolic links, move to move, move-sym to move and link back, and no to not use links (copy)
useLink = copy
###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory)
outputDirectory = D:\ADMIN\comp\trans\
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
default_downloadDirectory = D:\ADMIN\comp\
###### Other categories/labels defined for your downloader. Does not include CouchPotato, SickBeard, HeadPhones, Mylar categories.
categories = music_videos, pictures, software, manual
###### A list of categories that you don't want to be flattened (i.e preserve the directory structure when copying/linking.
noFlatten = pictures, manual, music, tv
###### uTorrent Hardlink solution (You must edit this if you're using TorrentToMedia.py with uTorrent)
uTorrentWEBui = http://localhost:8090/gui/
uTorrentUSR = your username
uTorrentPWD = your password
###### Transmission (You must edit this if you're using TorrentToMedia.py with Transmission)
TransmissionHost = localhost
TransmissionPort = 7060
TransmissionUSR = ""
TransmissionPWD = ""
#### Deluge (You must edit this if you're using TorrentToMedia.py with deluge. Note that the host/port is for the deluge daemon, not the webui)
DelugeHost = localhost
DelugePort = 58846
DelugeUSR = your username
DelugePWD = your password
###### qBittorrent (You must edit this if you're using TorrentToMedia.py with qBittorrent)
qBittorrentHost = localhost
qBittorrentPort = 8082
qBittorrentUSR = drakejones
qBittorrentPWD = Pumpkinsky99!
###### Synology Download Station (You must edit this if you're using TorrentToMedia.py with Synology DS)
synoHost = localhost
synoPort = 5000
synoUSR = your username
synoPWD = your password
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
deleteOriginal = 1
chmodDirectory = 1
resume = 0
resumeOnFailure = 1
# enable this option to prevent TorrentToMedia from running in manual mode and scanning an entire directory.
no_manual = 0  

[Extensions] compressedExtensions = .zip, .rar, .r00, .7z, .gz, .bz, .tar, .arj, .1, .01, .001 mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .vob, .iso, .m4v, .ts, .3pg audioExtensions = .mp3, .aac, .ogg, .ape, .m4a, .asf, .wma, .flac metaExtensions = .nfo, .sub, .srt, .jpg, .gif

[Plex]

Only enter these details if you want to update plex library after processing.

# Do not enter these details if you send the plex notifications from Sickbeard/CouchPotato.
plex_host = localhost
plex_port = 32400
plex_token = ""
plex_ssl = 0
# Enter Plex category to section mapping as Category,section and separate each pair with '|'
# e.g. plex_sections = movie,3|tv,4
plex_sections = ""

[Transcoder]

getsubs. enable to download subtitles.

getSubs = 0
# subLanguages. create a list of languages in the order you want them in your subtitles.
subLanguages = eng, spa, fra
# transcode. enable to use transcoder
transcode = 1
###### duplicate =1 will create a new file. =0 will replace the original
duplicate = 1
# concat. joins cd1 cd2 etc into a single video.
concat = 1
# IgnoreExtensions is a comma-separated list of extensions that will not be transcoded.
ignoreExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg, .m4v
# outputFastStart. 1 will use -movflags + faststart. 0 will disable this from being used.
outputFastStart = 0
# outputQualityPercent. used as -q:a value. 0 will disable this from being used.
outputQualityPercent = 0
# outputVideoPath. Set path you want transcoded videos moved to. Leave blank to disable.
outputVideoPath = ""
# processOutput. 1 will send the outputVideoPath to SickBeard/CouchPotato. 0 will send original files.
processOutput = 0
# audioLanguage. set the 3 letter language code you want as your primary audio track.
audioLanguage = eng
# allAudioLanguages. 1 will keep all audio tracks (uses AudioCodec3) where available.
allAudioLanguages = 0
# allSubLanguages. 1 will keep all existing sub languages. 0 will discard those not in your list above.
allSubLanguages = 0
# embedSubs. 1 will embed external sub/srt subs into your video if this is supported.
embedSubs = 1
# burnInSubtitle. burns the default sub language into your video (needed for players that don't support subs)
burnInSubtitle = 0
# extractSubs. 1 will extract subs from the video file and save these as external srt files.
extractSubs = 0
# externalSubDir. set the directory where subs should be saved (if not the same directory as the video)
externalSubDir = ""
# hwAccel. 1 will set ffmpeg to enable hardware acceleration (this requires a recent ffmpeg)
hwAccel = 0
# generalOptions. Enter your additional ffmpeg options (these insert before the '-i' input files) here with commas to separate each option/value (i.e replace spaces with commas).
generalOptions = ""
# otherOptions. Enter your additional ffmpeg options (these insert after the '-i' input files and before the output file) here with commas to separate each option/value (i.e replace spaces with commas).
otherOptions = ""
# outputDefault. Loads default configs for the selected device. The remaining options below are ignored.
# If you want to use your own profile, leave this blank and set the remaining options below.
# outputDefault profiles allowed: iPad, iPad-1080p, iPad-720p, Apple-TV2, iPod, iPhone, PS3, xbox, Roku-1080p, Roku-720p, Roku-480p, mkv, mkv-bluray, mp4-scene-release
outputDefault = ""
#### Define custom settings below.
outputVideoExtension = .mp4
outputVideoCodec = libx264
VideoCodecAllow = ""
outputVideoPreset = medium
outputVideoResolution = 1920:1080
outputVideoFramerate = 24
outputVideoBitrate = 800000
outputVideoCRF = 19
outputVideoLevel = 3.1
outputAudioCodec = ac3
AudioCodecAllow = ""
outputAudioChannels = 6
outputAudioBitrate = 640k
outputAudioTrack2Codec = libfaac
AudioCodec2Allow = ""
outputAudioTrack2Channels = 2
outputAudioTrack2Bitrate = 128000
outputAudioOtherCodec = libmp3lame
AudioOtherCodecAllow = ""
outputAudioOtherChannels = ""
outputAudioOtherBitrate = 128000
outputSubtitleCodec = ""

[WakeOnLan]

set wake = 1 to send WOL broadcast to the mac and test the server (e.g. xbmc) the host and port specified.
wake = 0
host = 192.168.1.37
port = 80
mac = 00:01:2e:2D:64:e1

[UserScript]

Use user_script for uncategorized downloads

#Set the categories to use external script.
#Use "UNCAT" to process non-category downloads, and "ALL" for all defined categories.
[[UNCAT]]
    #Enable/Disable this subsection category
    enabled = 0
    Torrent_NoLink = 0
    keep_archive = 1
    extract = 1
    #Enable if you are sending commands to a remote server for this category
    remote_path = 0
    #What extension do you want to process? Specify all the extension, or use "ALL" to process all files.
    user_script_mediaExtensions = .mkv, .avi, .divx, .xvid, .mov, .wmv, .mp4, .mpg, .mpeg
    #Specify the path to your custom script. Use "None" if you wish to link this category, but NOT run any external script.
    user_script_path = /nzbToMedia/userscripts/script.sh
    #Specify the argument(s) passed to script, comma separated in order.
    #for example FP,FN,DN, TN, TL for file path (absolute file name with path), file name, absolute directory name (with path), Torrent Name, Torrent Label/Category.
    #So the result is /media/test/script/script.sh FP FN DN TN TL. Add other arguments as needed eg -f, -r
    user_script_param = FN
    #Set user_script_runOnce = 0 to run for each file, or 1 to only run once (presumably on the entire directory).
    user_script_runOnce = 0
    #Specify the successcodes returned by the user script as a comma separated list. Linux default is 0
    user_script_successCodes = 0
    #Clean after? Note that delay function is used to prevent possible mistake :) Delay is intended as seconds
    user_script_clean = 1
    delay = 120
    #Unique path (directory) created for every download. set 0 to disable.
    unique_path = 1
    ##### Set to path where download client places completed downloads locally for this category
    watch_dir = ""

[ASCII]

Set convert =1 if you want to convert any "foreign" characters to ASCII (UTF8) before passing to SB/CP etc. Default is disabled (0).

convert = 0

[Passwords]

enter the full path to a text file containing passwords to be used for extraction attempts.

# In the passwords file, every password should be on a new line
PassWordFile = ""

[Custom]

enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.

# e.g remove_group = [rarbag],-NZBgeek
# be careful if your "group" is a common "real" word. Please report if you have any group replacements that would fall in this category.
remove_group = ""
clinton-hall commented 3 years ago

SABnzbd should be creating the download in D:\ADMIN\comp\tv\Job_name\ this way the Job_name folder would be cleaned not D:\ADMIN\comp\tv In SABnzbd categories, the Folder/Path should be set as ``D:\ADMIN\comp\tv and not D:\ADMIN\comp\tv\* or D:\ADMIN\comp\tv*

as per SABnzbd config descriptions Ending the path with an asterisk * will prevent creation of job folders.

DrakeJones commented 3 years ago

My SABnzbd categories Folder/Path has always been set as ``D:\ADMIN\comp\tv - never tv or tv. The SABnzbd team tells me that my problem is obvious:

"Actually in your nzbToMedia logs it clearly says: 2020-12-17 09:28:37 INFO ::CLEANDIRS: Directory D:\ADMIN\comp\tv has been processed, removing ... So case is closed."

I'm must be missing something obvious. If you would offer your thoughts, I'd appreciate them.

clinton-hall commented 3 years ago

yes, that part is obvious.... but what is missing in that statement is that nzbToMedia is deleting the directory that SABnzbd told nzbToMedia to process.

SABnzbd should be telling nzbToMedia to process D:\ADMIN\comp\tv\job_name and not 'D:\ADMIN\comp\tv'

to verify what SABnzbd is passing through, and see exactly what nzbToMedia is doing, enable debug logging in autoProcessMedia.cfg

[General]
    log_debug = 1
DrakeJones commented 3 years ago

I too thought that part was obvious.

Okay. I found the trigger for completed tv folder deletion and nzbTomedia's log reporting the action "CLEANDIRS: Directory D:\ADMIN\comp\tv has been processed, removing .... " For some reason beyond my reasoning, SABnzbd's "Enable TV Sorting" when activated caused deletion of my tv downloads folder. Weird. I don't know if nzbTomedia did or just reported it.

If you like, I'll re-enable SABnzbd's "TV Sorting" option with nzbTomedia debugging enabled, run a few downloads, and forward the info to you tomorrow.

clinton-hall commented 3 years ago

interesting.... it would be good to see what inputs are passed to nzbToMedia with TV Sorting enabled. At least that way I could flag that as an option to avoid along with nzbToMedia.

I do believe nzbToMedia is deleting the directory, but I believe it is doing so because the details passed to it, from SABnzbd, are different with this setting.

While not a big deal, if multiple downloads hit at once, this difference could potentially cause an issue.

DrakeJones commented 3 years ago

Here are two sets of log entries - TV Sorting on and off, both with Debugging:

TV Sorting on +Debug on:

2020-12-19 08:01:10 INFO ::MAIN: Loading config from [C:\Scripts\nzbToMedia\autoProcessMedia.cfg] 2020-12-19 08:01:10 INFO ::ENVIRONMENT: ALLUSERSPROFILE: C:\ProgramData 2020-12-19 08:01:10 INFO ::ENVIRONMENT: AMDAPPSDKROOT: C:\Program Files (x86)\AMD APP\ 2020-12-19 08:01:10 INFO ::ENVIRONMENT: APPDATA: C:\Windows\system32\config\systemprofile\AppData\Roaming 2020-12-19 08:01:10 INFO ::ENVIRONMENT: ASL.LOG: Destination=file 2020-12-19 08:01:10 INFO ::ENVIRONMENT: COMMONPROGRAMFILES: C:\Program Files\Common Files 2020-12-19 08:01:10 INFO ::ENVIRONMENT: COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files 2020-12-19 08:01:10 INFO ::ENVIRONMENT: COMMONPROGRAMW6432: C:\Program Files\Common Files 2020-12-19 08:01:10 INFO ::ENVIRONMENT: COMPUTERNAME: SERVER 2020-12-19 08:01:10 INFO ::ENVIRONMENT: COMSPEC: C:\Windows\system32\cmd.exe 2020-12-19 08:01:10 INFO ::ENVIRONMENT: FP_NO_HOST_CHECK: NO 2020-12-19 08:01:10 INFO ::ENVIRONMENT: LOCALAPPDATA: C:\Windows\system32\config\systemprofile\AppData\Local 2020-12-19 08:01:10 INFO ::ENVIRONMENT: NUMBER_OF_PROCESSORS: 6 2020-12-19 08:01:10 INFO ::ENVIRONMENT: OS: Windows_NT 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PATH: C:\Python37\lib\site-packages\pywin32_system32;C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;"C:\Program Files\Java\jre1.8.0_231\bin\java.exe";C:\Program Files\ffmpeg\bin\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Git\cmd;C:\Scripts\nzbToMedia;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\; 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROCESSOR_ARCHITECTURE: AMD64 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROCESSOR_IDENTIFIER: AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROCESSOR_LEVEL: 16 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROCESSOR_REVISION: 0a00 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROGRAMDATA: C:\ProgramData 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROGRAMFILES: C:\Program Files 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROGRAMFILES(X86): C:\Program Files (x86) 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PROGRAMW6432: C:\Program Files 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules 2020-12-19 08:01:10 INFO ::ENVIRONMENT: PUBLIC: C:\Users\Public 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SYSTEMDRIVE: C: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SYSTEMROOT: C:\Windows 2020-12-19 08:01:10 INFO ::ENVIRONMENT: TEMP: C:\Windows\TEMP 2020-12-19 08:01:10 INFO ::ENVIRONMENT: TMP: C:\Windows\TEMP 2020-12-19 08:01:10 INFO ::ENVIRONMENT: USERDOMAIN: JELLO 2020-12-19 08:01:10 INFO ::ENVIRONMENT: USERNAME: SERVER$ 2020-12-19 08:01:10 INFO ::ENVIRONMENT: USERPROFILE: C:\Windows\system32\config\systemprofile 2020-12-19 08:01:10 INFO ::ENVIRONMENT: WINDIR: C:\Windows 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SSL_CERT_FILE: C:\SABnzbd\certifi\cacert.pem 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_BYTES: 943972694 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 862326566 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_BYTES_TRIED: 943972694 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_CAT: tv 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_DUPLICATE: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_ENCRYPTED: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_FAIL_MSG: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_FILENAME: Taronga-Whos.Who.In.The.Zoo.S01E07.XviD-AFG.nzb 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_FINAL_NAME: Taronga-Whos Who In The Zoo S01E07 XviD-AFG 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_GROUP: alt.binaries.chello 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo054kxib 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_OVERSIZED: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PASSWORD: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PP: 3 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PRIORITY: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_REPAIR: 1 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_STATUS: Running 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_UNPACK: 1 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_UNWANTED_EXT: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_URL: http://192.168.10.24:5076/getnzb/api/-293013252184298566?apikey=zti5vywdd53numjyin9gaiwd 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_FAILURE_URL: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_COMPLETE_DIR: D:\ADMIN\comp\tv 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PP_STATUS: 0 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_DOWNLOAD_TIME: 35 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_AVG_BPS: 23545 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_AGE: 211d 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_ORIG_NZB_GZ: D:\ADMIN\incomp\sabnzbd\Taronga-Whos.Who.In.The.Zoo.S01E07.XviD-AF__ADMIN__\Taronga-Whos.Who.In.The.Zoo.S01E07.XviD-AFG.nzb.gz 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PROGRAM_DIR: C:\SABnzbd 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_PAR2_COMMAND: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_MULTIPAR_COMMAND: C:\SABnzbd\win\multipar\par2j64.exe 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_RAR_COMMAND: C:\SABnzbd\win\unrar\x64\UnRAR.exe 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_ZIP_COMMAND: 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_7ZIP_COMMAND: C:\SABnzbd\win\7zip\7za.exe 2020-12-19 08:01:10 INFO ::ENVIRONMENT: SAB_VERSION: 3.1.1 2020-12-19 08:01:10 INFO ::MAIN: Python v3.7 will reach end of life in 920 days. 2020-12-19 08:01:10 INFO ::MAIN: Checking database structure... 2020-12-19 08:01:10 DEBUG ::MAIN: Checking Initial Schema database upgrade 2020-12-19 08:01:10 DEBUG ::MAIN: InitialSchema upgrade not required 2020-12-19 08:01:10 DEBUG ::MAIN: Checking if we can use git commands: "C:\Program Files\Git\bin\git.exe" version 2020-12-19 08:01:10 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" version with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:01:10 DEBUG ::MAIN: git output: git version 2.21.0.windows.1 2020-12-19 08:01:10 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" version : returned successful 2020-12-19 08:01:10 DEBUG ::MAIN: Using: "C:\Program Files\Git\bin\git.exe" 2020-12-19 08:01:10 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:01:11 DEBUG ::MAIN: git output: refs/heads/master 2020-12-19 08:01:11 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful 2020-12-19 08:01:11 INFO ::MAIN: Checking if git needs an update 2020-12-19 08:01:11 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" rev-parse HEAD with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:01:11 DEBUG ::MAIN: git output: 9d64c2f47869584ebf3ca269632e1f03a461f99e 2020-12-19 08:01:11 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" rev-parse HEAD : returned successful 2020-12-19 08:01:11 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" fetch origin with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:01:12 DEBUG ::MAIN: git output: 2020-12-19 08:01:12 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" fetch origin : returned successful 2020-12-19 08:01:12 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" rev-parse --verify --quiet '@{upstream}' with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:01:12 DEBUG ::MAIN: git output: fatal: no such branch: ''' 2020-12-19 08:01:12 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" rev-parse --verify --quiet '@{upstream}' returned : fatal: no such branch: ''' 2020-12-19 08:01:12 DEBUG ::MAIN: git didn't return newest commit hash 2020-12-19 08:01:12 INFO ::MAIN: No update needed 2020-12-19 08:01:12 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Windows 7) 2020-12-19 08:01:12 INFO ::MAIN: ######################################################### 2020-12-19 08:01:12 INFO ::MAIN: ## ..::[nzbToMedia.py]::.. ## 2020-12-19 08:01:12 INFO ::MAIN: ######################################################### 2020-12-19 08:01:12 DEBUG ::MAIN: Options passed into nzbToMedia: ['C:\Scripts\nzbToMedia\nzbToMedia.py', 'D:\ADMIN\comp\tv', 'Taronga-Whos.Who.In.The.Zoo.S01E07.XviD-AFG.nzb', 'Taronga-Whos Who In The Zoo S01E07 XviD-AFG', '', 'tv', 'alt.binaries.chello', '0', ''] 2020-12-19 08:01:12 INFO ::MAIN: Script triggered from SABnzbd Version 3.1.1. 2020-12-19 08:01:12 DEBUG ::MAIN: Adding NZB download info for directory D:\ADMIN\comp\tv to database 2020-12-19 08:01:12 INFO ::MAIN: Auto-detected SECTION:SickBeard 2020-12-19 08:01:12 DEBUG ::MAIN: Checking for archives to extract in directory: D:\ADMIN\comp\tv 2020-12-19 08:01:12 INFO ::MAIN: Calling SickBeard:tv to post-process:Taronga-Whos Who In The Zoo S01E07 XviD-AFG 2020-12-19 08:01:12 DEBUG ::SERVER: Attempting to connect to server at http://localhost:8081 2020-12-19 08:01:14 DEBUG ::SERVER: Server responded at http://localhost:8081 2020-12-19 08:01:14 INFO ::MAIN: Attempting to auto-detect tv fork 2020-12-19 08:01:15 DEBUG ::MAIN: Removing excess parameters: ['delete', 'delete_on', 'dir', 'dirName', 'force', 'force_next', 'ignore_subs', 'is priority', 'proc_dir'] 2020-12-19 08:01:15 INFO ::MAIN: SickBeard:tv fork auto-detection successful ... 2020-12-19 08:01:15 INFO ::MAIN: SickBeard:tv fork set to Medusa-api 2020-12-19 08:01:15 INFO ::MAIN: FLATTEN: Flattening directory: D:\ADMIN\comp\tv 2020-12-19 08:01:15 DEBUG ::MAIN: Checking for empty folders in:D:\ADMIN\comp\tv 2020-12-19 08:01:15 DEBUG ::MAIN: calling command: C:\Program Files\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\Scripts\nzbToMedia\tests\test.mp4 2020-12-19 08:01:15 INFO ::TRANSCODER: Checking [Taronga-Whos Who In The Zoo S01E07 XviD-AFG.avi] for corruption, please stand by ... 2020-12-19 08:01:15 DEBUG ::MAIN: calling command: C:\Program Files\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E07 XviD-AFG.avi 2020-12-19 08:01:15 INFO ::TRANSCODER: SUCCESS: [Taronga-Whos Who In The Zoo S01E07 XviD-AFG.avi] has no corruption. 2020-12-19 08:01:15 INFO ::MAIN: Checking for files to be transcoded 2020-12-19 08:01:15 DEBUG ::SICKBEARD: SUCCESS: Transcoding succeeded for files in D:\ADMIN\comp\tv 2020-12-19 08:01:15 DEBUG ::SICKBEARD: Config setting 'chmodDirectory' currently set to 0o0 2020-12-19 08:01:15 POSTPROCESS::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request 2020-12-19 08:01:15 DEBUG ::SICKBEARD: Opening URL: http://localhost:8081/api/73dc27573bd317e1d2a5dad9ab1b2c36/ with params: {'path': 'D:\ADMIN\comp\tv', 'failed': 0, 'return_data': 0, 'cmd': 'postprocess', 'nzbName': 'Taronga-Whos Who In The Zoo S01E07 XviD-AFG'} 2020-12-19 08:01:22 INFO ::CLEANDIRS: Directory D:\ADMIN\comp\tv has been processed, removing ... 2020-12-19 08:01:22 INFO ::MAIN: The C:\Scripts\nzbToMedia\nzbToMedia.py script completed successfully.

TV Sorting off +Deug

2020-12-19 08:11:59 INFO ::MAIN: Loading config from [C:\Scripts\nzbToMedia\autoProcessMedia.cfg] 2020-12-19 08:11:59 INFO ::ENVIRONMENT: ALLUSERSPROFILE: C:\ProgramData 2020-12-19 08:11:59 INFO ::ENVIRONMENT: AMDAPPSDKROOT: C:\Program Files (x86)\AMD APP\ 2020-12-19 08:11:59 INFO ::ENVIRONMENT: APPDATA: C:\Windows\system32\config\systemprofile\AppData\Roaming 2020-12-19 08:11:59 INFO ::ENVIRONMENT: ASL.LOG: Destination=file 2020-12-19 08:11:59 INFO ::ENVIRONMENT: COMMONPROGRAMFILES: C:\Program Files\Common Files 2020-12-19 08:11:59 INFO ::ENVIRONMENT: COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files 2020-12-19 08:11:59 INFO ::ENVIRONMENT: COMMONPROGRAMW6432: C:\Program Files\Common Files 2020-12-19 08:11:59 INFO ::ENVIRONMENT: COMPUTERNAME: SERVER 2020-12-19 08:11:59 INFO ::ENVIRONMENT: COMSPEC: C:\Windows\system32\cmd.exe 2020-12-19 08:11:59 INFO ::ENVIRONMENT: FP_NO_HOST_CHECK: NO 2020-12-19 08:11:59 INFO ::ENVIRONMENT: LOCALAPPDATA: C:\Windows\system32\config\systemprofile\AppData\Local 2020-12-19 08:11:59 INFO ::ENVIRONMENT: NUMBER_OF_PROCESSORS: 6 2020-12-19 08:11:59 INFO ::ENVIRONMENT: OS: Windows_NT 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PATH: C:\Python37\lib\site-packages\pywin32_system32;C:\Python37\;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;"C:\Program Files\Java\jre1.8.0_231\bin\java.exe";C:\Program Files\ffmpeg\bin\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Git\cmd;C:\Scripts\nzbToMedia;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\; 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROCESSOR_ARCHITECTURE: AMD64 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROCESSOR_IDENTIFIER: AMD64 Family 16 Model 10 Stepping 0, AuthenticAMD 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROCESSOR_LEVEL: 16 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROCESSOR_REVISION: 0a00 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROGRAMDATA: C:\ProgramData 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROGRAMFILES: C:\Program Files 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROGRAMFILES(X86): C:\Program Files (x86) 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PROGRAMW6432: C:\Program Files 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules 2020-12-19 08:11:59 INFO ::ENVIRONMENT: PUBLIC: C:\Users\Public 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SYSTEMDRIVE: C: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SYSTEMROOT: C:\Windows 2020-12-19 08:11:59 INFO ::ENVIRONMENT: TEMP: C:\Windows\TEMP 2020-12-19 08:11:59 INFO ::ENVIRONMENT: TMP: C:\Windows\TEMP 2020-12-19 08:11:59 INFO ::ENVIRONMENT: USERDOMAIN: JELLO 2020-12-19 08:11:59 INFO ::ENVIRONMENT: USERNAME: SERVER$ 2020-12-19 08:11:59 INFO ::ENVIRONMENT: USERPROFILE: C:\Windows\system32\config\systemprofile 2020-12-19 08:11:59 INFO ::ENVIRONMENT: WINDIR: C:\Windows 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SSL_CERT_FILE: C:\SABnzbd\certifi\cacert.pem 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_BYTES: 1025215716 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 936569496 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_BYTES_TRIED: 1025215716 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_CAT: tv 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_DUPLICATE: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_ENCRYPTED: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_FAIL_MSG: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_FILENAME: Taronga-Whos.Who.In.The.Zoo.S01E03.XviD-AFG.nzb 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_FINAL_NAME: Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_GROUP: alt.binaries.ath 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo_aqk0ousi 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_OVERSIZED: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PASSWORD: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PP: 3 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PRIORITY: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_REPAIR: 1 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_STATUS: Running 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_UNPACK: 1 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_UNWANTED_EXT: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_URL: http://192.168.10.24:5076/getnzb/api/6744294596394464309?apikey=zti5vywdd53numjyin9gaiwd 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_FAILURE_URL: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_COMPLETE_DIR: D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PP_STATUS: 0 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_DOWNLOAD_TIME: 39 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_AVG_BPS: 23338 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_AGE: 298d 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_ORIG_NZB_GZ: D:\ADMIN\incomp\sabnzbd\Taronga-Whos.Who.In.The.Zoo.S01E03.XviD-AF__ADMIN__\Taronga-Whos.Who.In.The.Zoo.S01E03.XviD-AFG.nzb.gz 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PROGRAM_DIR: C:\SABnzbd 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_PAR2_COMMAND: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_MULTIPAR_COMMAND: C:\SABnzbd\win\multipar\par2j64.exe 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_RAR_COMMAND: C:\SABnzbd\win\unrar\x64\UnRAR.exe 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_ZIP_COMMAND: 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_7ZIP_COMMAND: C:\SABnzbd\win\7zip\7za.exe 2020-12-19 08:11:59 INFO ::ENVIRONMENT: SAB_VERSION: 3.1.1 2020-12-19 08:11:59 INFO ::MAIN: Python v3.7 will reach end of life in 920 days. 2020-12-19 08:11:59 INFO ::MAIN: Checking database structure... 2020-12-19 08:11:59 DEBUG ::MAIN: Checking Initial Schema database upgrade 2020-12-19 08:11:59 DEBUG ::MAIN: InitialSchema upgrade not required 2020-12-19 08:11:59 DEBUG ::MAIN: Checking if we can use git commands: "C:\Program Files\Git\bin\git.exe" version 2020-12-19 08:11:59 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" version with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:11:59 DEBUG ::MAIN: git output: git version 2.21.0.windows.1 2020-12-19 08:11:59 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" version : returned successful 2020-12-19 08:11:59 DEBUG ::MAIN: Using: "C:\Program Files\Git\bin\git.exe" 2020-12-19 08:11:59 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:11:59 DEBUG ::MAIN: git output: refs/heads/master 2020-12-19 08:11:59 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful 2020-12-19 08:11:59 INFO ::MAIN: Checking if git needs an update 2020-12-19 08:11:59 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" rev-parse HEAD with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:11:59 DEBUG ::MAIN: git output: 9d64c2f47869584ebf3ca269632e1f03a461f99e 2020-12-19 08:11:59 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" rev-parse HEAD : returned successful 2020-12-19 08:11:59 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" fetch origin with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:12:00 DEBUG ::MAIN: git output: 2020-12-19 08:12:00 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" fetch origin : returned successful 2020-12-19 08:12:00 DEBUG ::MAIN: Executing "C:\Program Files\Git\bin\git.exe" rev-parse --verify --quiet '@{upstream}' with your shell in C:\Scripts\nzbToMedia 2020-12-19 08:12:00 DEBUG ::MAIN: git output: fatal: no such branch: ''' 2020-12-19 08:12:00 DEBUG ::MAIN: "C:\Program Files\Git\bin\git.exe" rev-parse --verify --quiet '@{upstream}' returned : fatal: no such branch: ''' 2020-12-19 08:12:00 DEBUG ::MAIN: git didn't return newest commit hash 2020-12-19 08:12:00 INFO ::MAIN: No update needed 2020-12-19 08:12:00 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Windows 7) 2020-12-19 08:12:00 INFO ::MAIN: ######################################################### 2020-12-19 08:12:00 INFO ::MAIN: ## ..::[nzbToMedia.py]::.. ## 2020-12-19 08:12:00 INFO ::MAIN: ######################################################### 2020-12-19 08:12:00 DEBUG ::MAIN: Options passed into nzbToMedia: ['C:\Scripts\nzbToMedia\nzbToMedia.py', 'D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG', 'Taronga-Whos.Who.In.The.Zoo.S01E03.XviD-AFG.nzb', 'Taronga-Whos Who In The Zoo S01E03 XviD-AFG', '', 'tv', 'alt.binaries.ath', '0', ''] 2020-12-19 08:12:00 INFO ::MAIN: Script triggered from SABnzbd Version 3.1.1. 2020-12-19 08:12:00 DEBUG ::MAIN: Adding NZB download info for directory D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG to database 2020-12-19 08:12:00 INFO ::MAIN: Auto-detected SECTION:SickBeard 2020-12-19 08:12:00 DEBUG ::MAIN: Checking for archives to extract in directory: D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:12:00 INFO ::MAIN: Calling SickBeard:tv to post-process:Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:12:00 DEBUG ::SERVER: Attempting to connect to server at http://localhost:8081 2020-12-19 08:12:01 DEBUG ::SERVER: Server responded at http://localhost:8081 2020-12-19 08:12:01 INFO ::MAIN: Attempting to auto-detect tv fork 2020-12-19 08:12:02 DEBUG ::MAIN: Removing excess parameters: ['delete', 'delete_on', 'dir', 'dirName', 'force', 'force_next', 'ignore_subs', 'is priority', 'proc_dir'] 2020-12-19 08:12:02 INFO ::MAIN: SickBeard:tv fork auto-detection successful ... 2020-12-19 08:12:02 INFO ::MAIN: SickBeard:tv fork set to Medusa-api 2020-12-19 08:12:02 INFO ::MAIN: FLATTEN: Flattening directory: D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:12:02 DEBUG ::MAIN: Checking for empty folders in:D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:12:02 DEBUG ::MAIN: calling command: C:\Program Files\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\Scripts\nzbToMedia\tests\test.mp4 2020-12-19 08:12:02 INFO ::TRANSCODER: Checking [Taronga-Whos Who In The Zoo S01E03 XviD-AFG.avi] for corruption, please stand by ... 2020-12-19 08:12:02 DEBUG ::MAIN: calling command: C:\Program Files\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG\Taronga-Whos Who In The Zoo S01E03 XviD-AFG.avi 2020-12-19 08:12:03 INFO ::TRANSCODER: SUCCESS: [Taronga-Whos Who In The Zoo S01E03 XviD-AFG.avi] has no corruption. 2020-12-19 08:12:03 INFO ::MAIN: Checking for files to be transcoded 2020-12-19 08:12:03 DEBUG ::SICKBEARD: SUCCESS: Transcoding succeeded for files in D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG 2020-12-19 08:12:03 DEBUG ::SICKBEARD: Config setting 'chmodDirectory' currently set to 0o0 2020-12-19 08:12:03 POSTPROCESS::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request 2020-12-19 08:12:03 DEBUG ::SICKBEARD: Opening URL: http://localhost:8081/api/73dc27573bd317e1d2a5dad9ab1b2c36/ with params: {'path': 'D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG', 'failed': 0, 'return_data': 0, 'cmd': 'postprocess', 'nzbName': 'Taronga-Whos Who In The Zoo S01E03 XviD-AFG'} 2020-12-19 08:12:11 INFO ::CLEANDIRS: Directory D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG has been processed, removing ... 2020-12-19 08:12:11 INFO ::MAIN: The C:\Scripts\nzbToMedia\nzbToMedia.py script completed successfully.

clinton-hall commented 3 years ago

So it does indeed look like SAB is changing the parameters it passes.

With TV Sorting enabled: ENVIRONMENT: SAB_COMPLETE_DIR = D:\ADMIN\comp\tv and SABnzbd passes 'D:\ADMIN\comp\tv', 'Taronga-Whos.Who.In.The.Zoo.S01E07.XviD-AFG.nzb', 'Taronga-Whos Who In The Zoo S01E07 XviD-AFG', '', 'tv', 'alt.binaries.chello', '0', ''

But without TV Sorting enabled: ENVIRONMENT: SAB_COMPLETE_DIR = D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG and SABnzbd passes 'D:\ADMIN\comp\tv\Taronga-Whos Who In The Zoo S01E03 XviD-AFG', 'Taronga-Whos.Who.In.The.Zoo.S01E03.XviD-AFG.nzb', 'Taronga-Whos Who In The Zoo S01E03 XviD-AFG', '', 'tv', 'alt.binaries.ath', '0', ''

the difference being, without TV Sorting, nzbToMedia will receive and therefore process and clean the Job directory. But with TV sorting enabled nzbToMedia will receive, process, and clean the entire category (D:\ADMIN\comp\tv) directory.

DrakeJones commented 3 years ago

I hope you don't mind - I shared your last observation (above) with the SABnzbd people just in case it could benefit others. Their response:

"That's true, because with your specific (!) Series Sorting settings it moves the main MKV file to the tv directory:

2020-12-18 13:24:02,483::DEBUG::[filesystem:769] Renaming "\?\D:\ADMIN\comp\tv\Secrets of the Zoo S03E02 Grumpy Cat 720p HEVC x265-MeGusta\Secrets of the Zoo S03E02 Grumpy Cat 720p HEVC x265-MeGusta.mkv" to "\?\D:\ADMIN\comp\tv\Secrets of the Zoo S03E02 Grumpy Cat 720p HEVC x265-MeGusta.mkv"

Since your main file is there, the job-folder is removed and therefore it is not passed to nzbToMedia, since it does not exist anymore. If your Series Sortings settings included a folder, it would send the folder to nzbToMedia."

(As an aside, I really do not need the SABnzbd sorting function at this juncture, so this a moot point for me. I probably should have never enabled it).