Closed fadern closed 1 year ago
looking through the code, and I believe this should be happening. However it is only renaming the file and not the download folder.
Debug logging should show the rename of the file.
This whole folder is passed to SickChill to do the final rename, and SickChill appears to remove/rename the download folder. Again SickChill logs should confirm what the name of the file was before it renamed...
On that matter, it doesn't look like you are doing sub downloads or transcoding in nzbToMedia, so I am not sure what the reason for stripping these groups is.
If you could help confirm the specific use-case you are trying to achieve, and show the debug logs to help confirm what steps are being completed, that would help.
Hi, ok, I will try to enable the debuglogging to see what is happening. The reason that I want to rename the folder/files are that SickChill seems to be using the foldername when its renaming/formating the filenames. And if you look at this example (from a nzb source) you will see that the name are not ok... "The.Secret.of.Skinwalker.Ranch.S04E12.1080p.WEB.h264-EDITH[eztv.re].mkv-xpost" "[eztv.re].mkv-xpost" are not valid groups.
Debug logs:
`/volume1/Files/Scripts/nzbToMedia/libs/common/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead warnings.warn("beets.mediafile is deprecated; use mediafile instead") [08:07:18] [INFO]::MAIN: Loading config from [/volume1/Files/Scripts/nzbToMedia/autoProcessMedia.cfg] [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_UPGRADE_FOLDER: /volume1/@tmp/synopkg.tmp/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGVAR: /volume1/@appdata/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGPORT: 8080 [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_USERNAME: [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGNAME: sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MAJOR: 7 [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGHOME: /volume1/@apphome/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MINOR: 1 [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGTMP: /volume1/@apptemp/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_BUILD: 42962 [08:07:18] [INFO]::ENVIRONMENT: SELF: sabnzbd [08:07:18] [INFO]::ENVIRONMENT: PWD: / [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_REPLACE_FOLDER: /volume1/@tmp/synopkg.tmp/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGVER: 4.0.3-63 [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_DSM_LANGUAGE: enu [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_DSM_ARCH: avoton [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKG_PROGRESS_PATH: /tmp/install_progress_sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKGDEST_VOL: /volume1 [08:07:18] [INFO]::ENVIRONMENT: SHLVL: 2 [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_PKG_STATUS: UPGRADE [08:07:18] [INFO]::ENVIRONMENT: PATH: /volume1/@appstore/sabnzbd/env/bin:/volume1/@appstore/sabnzbd/bin:/var/packages/python311/target/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin [08:07:18] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_LOGFILE: /tmp/synopkgmgr.log-sabnzbd [08:07:18] [INFO]::ENVIRONMENT: SYNOPKGPKGDEST: /volume1/@appstore/sabnzbd [08:07:18] [INFO]::ENVIRONMENT: : /bin/env [08:07:18] [INFO]::ENVIRONMENT: LANG: en_US.UTF-8 [08:07:18] [INFO]::ENVIRONMENT: AVAHI_COMPAT_NOWARN: 1 [08:07:18] [INFO]::ENVIRONMENT: SSL_CERT_FILE: /var/packages/python311/target/lib/python3.11/site-packages/certifi/cacert.pem [08:07:18] [INFO]::ENVIRONMENT: SAB_BYTES: 9284869706 [08:07:18] [INFO]::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 9284869706 [08:07:18] [INFO]::ENVIRONMENT: SAB_BYTES_TRIED: 9284869706 [08:07:18] [INFO]::ENVIRONMENT: SAB_CAT: tv [08:07:18] [INFO]::ENVIRONMENT: SAB_CORRECT_PASSWORD: [08:07:18] [INFO]::ENVIRONMENT: SAB_DUPLICATE: 0 [08:07:18] [INFO]::ENVIRONMENT: SAB_ENCRYPTED: 0 [08:07:18] [INFO]::ENVIRONMENT: SAB_FAIL_MSG: [08:07:18] [INFO]::ENVIRONMENT: SAB_FILENAME: foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb [08:07:18] [INFO]::ENVIRONMENT: SAB_FINAL_NAME: foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:18] [INFO]::ENVIRONMENT: SAB_GROUP: alt.binaries.misc [08:07:18] [INFO]::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo_v2tai8oh [08:07:18] [INFO]::ENVIRONMENT: SAB_OVERSIZED: 0 [08:07:18] [INFO]::ENVIRONMENT: SAB_PASSWORD: [08:07:18] [INFO]::ENVIRONMENT: SAB_PP: 3 [08:07:18] [INFO]::ENVIRONMENT: SAB_PRIORITY: 1 [08:07:18] [INFO]::ENVIRONMENT: SAB_REPAIR: 1 [08:07:18] [INFO]::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py [08:07:18] [INFO]::ENVIRONMENT: SAB_STATUS: Running [08:07:18] [INFO]::ENVIRONMENT: SAB_UNPACK: 1 [08:07:18] [INFO]::ENVIRONMENT: SAB_UNWANTED_EXT: 0 [08:07:18] [INFO]::ENVIRONMENT: SAB_URL: http://192.168.82.51:5076/getnzb/api/6253772707020203010?apikey= [08:07:18] [INFO]::ENVIRONMENT: SAB_FAILURE_URL: [08:07:18] [INFO]::ENVIRONMENT: SAB_COMPLETE_DIR: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:18] [INFO]::ENVIRONMENT: SAB_PP_STATUS: 0 [08:07:18] [INFO]::ENVIRONMENT: SAB_DOWNLOAD_TIME: 460 [08:07:18] [INFO]::ENVIRONMENT: SAB_AVG_BPS: 19698 [08:07:18] [INFO]::ENVIRONMENT: SAB_AGE: 3h [08:07:18] [INFO]::ENVIRONMENT: SAB_ORIG_NZB_GZ: /volume1/Downloads/incomplete/foundation.s02e04.2160p.web.h265-successfulcrab-4P/ADMIN/foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb.gz [08:07:18] [INFO]::ENVIRONMENT: SAB_PYTHONUNBUFFERED: True [08:07:18] [INFO]::ENVIRONMENT: SAB_PROGRAM_DIR: /volume1/@appstore/sabnzbd/share/SABnzbd [08:07:18] [INFO]::ENVIRONMENT: SAB_PAR2_COMMAND: /volume1/@appstore/sabnzbd/bin/par2 [08:07:18] [INFO]::ENVIRONMENT: SAB_MULTIPAR_COMMAND: [08:07:18] [INFO]::ENVIRONMENT: SAB_RAR_COMMAND: /volume1/@appstore/sabnzbd/bin/unrar [08:07:18] [INFO]::ENVIRONMENT: SAB_ZIP_COMMAND: [08:07:18] [INFO]::ENVIRONMENT: SAB_7ZIP_COMMAND: /volume1/@appstore/sabnzbd/bin/7za [08:07:18] [INFO]::ENVIRONMENT: SAB_VERSION: 4.0.3 [08:07:18] [INFO]::MAIN: Python v3.11 will reach end of life in 1519 days. [08:07:18] [INFO]::MAIN: Checking database structure... [08:07:18] [DEBUG]::MAIN: Checking Initial Schema database upgrade [08:07:18] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',) [08:07:18] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version [08:07:18] [DEBUG]::MAIN: InitialSchema upgrade not required [08:07:18] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/git/bin/git" version [08:07:18] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" version with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:18] [DEBUG]::MAIN: "/usr/local/git/bin/git" version : returned successful [08:07:18] [DEBUG]::MAIN: Using: "/usr/local/git/bin/git" [08:07:18] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" symbolic-ref -q HEAD with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:18] [DEBUG]::MAIN: "/usr/local/git/bin/git" symbolic-ref -q HEAD : returned successful [08:07:18] [INFO]::MAIN: Checking if git needs an update [08:07:18] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse HEAD with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:18] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse HEAD : returned successful [08:07:18] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" fetch origin with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:19] [DEBUG]::MAIN: "/usr/local/git/bin/git" fetch origin : returned successful [08:07:19] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:19] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful [08:07:19] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /volume1/Files/Scripts/nzbToMedia [08:07:19] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful [08:07:19] [DEBUG]::MAIN: cur_commit = 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 % (newest_commit)= 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9, num_commits_behind = 0, num_commits_ahead = 0 [08:07:19] [INFO]::MAIN: No update needed [08:07:19] [INFO]::MAIN: nzbToMedia Version:6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 Branch:master (Linux 3.10.108) [08:07:19] [INFO]::MAIN: ######################################################### [08:07:19] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [08:07:19] [INFO]::MAIN: ######################################################### [08:07:19] [DEBUG]::MAIN: Options passed into nzbToMedia: ['/volume1/Files/Scripts/nzbToMedia/nzbToMedia.py', '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb', 'foundation.s02e04.2160p.web.h265-successfulcrab-4P', '', 'tv', 'alt.binaries.misc', '0', ''] [08:07:19] [INFO]::MAIN: Script triggered from SABnzbd 4.0.3. [08:07:19] [DEBUG]::MAIN: Adding NZB download info for directory /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P to database [08:07:19] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET input_name = ?, input_hash = ?, input_id = ?, client_agent = ?, status = ?, last_update = ? WHERE input_directory = ? with args ['foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'SABnzbd_nzo_v2tai8oh', 'SABnzbd_nzo_v2tai8oh', 'sabnzbd', 0, 738736, '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P'] [08:07:19] [DB]::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (input_name, input_hash, input_id, client_agent, status, last_update) VALUES (?, ?, ?, ?, ?, ?) with args ['foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'SABnzbd_nzo_v2tai8oh', 'SABnzbd_nzo_v2tai8oh', 'sabnzbd', 0, 738736] [08:07:20] [INFO]::MAIN: Auto-detected SECTION:SickBeard [08:07:20] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:20] [INFO]::MAIN: Calling SickBeard:tv to post-process:foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:20] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8899 [08:07:20] [DEBUG]::SERVER: Server responded at http://localhost:8899 [08:07:20] [INFO]::MAIN: Attempting to auto-detect tv fork [08:07:20] [DEBUG]::MAIN: Removing excess parameters: ['delete_files', 'delete_on', 'dir', 'dirName', 'ignore_subs', 'resource'] [08:07:20] [INFO]::MAIN: SickBeard:tv fork auto-detection successful ... [08:07:20] [INFO]::MAIN: SickBeard:tv fork set to SickChill-api [08:07:20] [DEBUG]::MAIN: Create object for fork SickChill-api [08:07:20] [INFO]::MAIN: SickBeard:tv Could not create a fork object for SickChill-api. Probaly class not added yet. [08:07:20] [DEBUG]::EXCEPTION: Replacing file name zmrG with directory name foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:20] [DEBUG]::EXCEPTION: Replacing file name /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P/zmrG.mkv with download name /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P/foundation.s02e04.2160p.web.h265-successfulcrab-4P.mkv [08:07:20] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:20] [DEBUG]::MAIN: Checking for empty folders in:/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P [08:07:20] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [08:07:20] [DEBUG]::SICKBEARD: Opening URL: http://localhost:8899/api/*****/ with params: {'path': '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'proc_dir': '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'failed': 0, 'return_data': 0, 'force_next': 1, 'cmd': 'postprocess', 'nzbName': 'foundation.s02e04.2160p.web.h265-successfulcrab-4P'} [08:07:25] [DB]::DB: Updating DB download status of foundation.s02e04.2160p.web.h265-successfulcrab-4P to 1 [08:07:25] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 738736, 'foundation.s02e04.2160p.web.h265-successfulcrab-4P'] [08:07:25] [INFO]::CLEANDIR: Directory /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P has been processed and removed ... [08:07:25] [INFO]::MAIN: The /volume1/Files/Scripts/nzbToMedia/nzbToMedia.py script completed successfully. Changing to directory: /volume1/Files/Scripts/nzbToMedia
-- Cleaning bytecode -- b'Removing pycache/\n' b'Removing pycache/\n'
-- Cleaning folders: ['libs', 'core'] -- No folders to clean
Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd
-- Cleanup finished --
SickBeard: Successfully post-processed foundation.s02e04.2160p.web.h265-successfulcrab-4P!`
The final file still contains the "-4P" group wich is unwanted.
I never noticed earlier... your remove_group has spaces.
remove_group = [eztv.re], -xpost, [TGx], [rarbg], -4P, [WtFnZb], WtF[nZb]
so this tries to match -4P
Try setting this as
remove_group = [eztv.re],-xpost,[TGx],[rarbg],-4P,[WtFnZb],WtF[nZb]
I always save the config without spaces but it seems that the script adds spaces when it runs...
@clinton-hall
ok, sorry for the delay. I had to set up some tests and try to reproduce...
I don't know when this disappeared, but this parameter was not being loaded into memory!
Can you try checking out the remove_group
branch and test this?
git pull
git checkout remove_group
Np m8. I think that I need some assistance to do the manual upgrade. I have tried to change the branch in autoProcessMedia.cfg to remove_group but that didnt work. Then I tried to run the commands as the sc-sabnzbd user, but then I got this...
ash-4.4# su -c /usr/local/git/bin/git sc-sabnzbd
su: failed to execute /sbin/nologin: No such file or directory
then I tried to run it as root...
ash-4.4# /usr/local/git/bin/git pull
fatal: detected dubious ownership in repository at '/volume1/Files/Scripts/nzbToMedia'
To add an exception for this directory, call:
git config --global --add safe.directory /volume1/Files/Scripts/nzbToMedia
I figured out that I also needed to provide a shell.
su -s /bin/bash -c '/usr/local/git/bin/git checkout remove_group' sc-sabnzbd
branch 'remove_group' set up to track 'origin/remove_group'.
Switched to a new branch 'remove_group'
The fix in the remove_group branch did work. it removed the "-4P". Thank You! btw, How do I revert back to the master branch?
/volume1/Files/Scripts/nzbToMedia/libs/common/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
warnings.warn("beets.mediafile is deprecated; use mediafile instead")
[07:52:59] [INFO]::MAIN: Loading config from [/volume1/Files/Scripts/nzbToMedia/autoProcessMedia.cfg]
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_UPGRADE_FOLDER: /volume1/@tmp/synopkg.tmp/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGVAR: /volume1/@appdata/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGPORT: 8080
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_USERNAME: Kalle
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGNAME: sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MAJOR: 7
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGHOME: /volume1/@apphome/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MINOR: 1
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGTMP: /volume1/@apptemp/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_BUILD: 42962
[07:52:59] [INFO]::ENVIRONMENT: SELF: sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: PWD: /
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_REPLACE_FOLDER: /volume1/@tmp/synopkg.tmp/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGVER: 4.0.3-63
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_DSM_LANGUAGE: enu
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_DSM_ARCH: avoton
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKG_PROGRESS_PATH: /tmp/install_progress_sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGDEST_VOL: /volume1
[07:52:59] [INFO]::ENVIRONMENT: SHLVL: 2
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKG_STATUS: UPGRADE
[07:52:59] [INFO]::ENVIRONMENT: PATH: /volume1/@appstore/sabnzbd/env/bin:/volume1/@appstore/sabnzbd/bin:/var/packages/python311/target/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_LOGFILE: /tmp/synopkgmgr.log-sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: SYNOPKG_PKGDEST: /volume1/@appstore/sabnzbd
[07:52:59] [INFO]::ENVIRONMENT: _: /bin/env
[07:52:59] [INFO]::ENVIRONMENT: LANG: en_US.UTF-8
[07:52:59] [INFO]::ENVIRONMENT: AVAHI_COMPAT_NOWARN: 1
[07:52:59] [INFO]::ENVIRONMENT: SSL_CERT_FILE: /var/packages/python311/target/lib/python3.11/site-packages/certifi/cacert.pem
[07:52:59] [INFO]::ENVIRONMENT: SAB_BYTES: 9284869706
[07:52:59] [INFO]::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 9284869706
[07:52:59] [INFO]::ENVIRONMENT: SAB_BYTES_TRIED: 9284869706
[07:52:59] [INFO]::ENVIRONMENT: SAB_CAT: tv
[07:52:59] [INFO]::ENVIRONMENT: SAB_CORRECT_PASSWORD:
[07:52:59] [INFO]::ENVIRONMENT: SAB_DUPLICATE: 0
[07:52:59] [INFO]::ENVIRONMENT: SAB_ENCRYPTED: 0
[07:52:59] [INFO]::ENVIRONMENT: SAB_FAIL_MSG:
[07:52:59] [INFO]::ENVIRONMENT: SAB_FILENAME: foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb
[07:52:59] [INFO]::ENVIRONMENT: SAB_FINAL_NAME: foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:52:59] [INFO]::ENVIRONMENT: SAB_GROUP: alt.binaries.misc
[07:52:59] [INFO]::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo_t4tw8nel
[07:52:59] [INFO]::ENVIRONMENT: SAB_OVERSIZED: 0
[07:52:59] [INFO]::ENVIRONMENT: SAB_PASSWORD:
[07:52:59] [INFO]::ENVIRONMENT: SAB_PP: 3
[07:52:59] [INFO]::ENVIRONMENT: SAB_PRIORITY: 1
[07:52:59] [INFO]::ENVIRONMENT: SAB_REPAIR: 1
[07:52:59] [INFO]::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py
[07:52:59] [INFO]::ENVIRONMENT: SAB_STATUS: Running
[07:52:59] [INFO]::ENVIRONMENT: SAB_UNPACK: 1
[07:52:59] [INFO]::ENVIRONMENT: SAB_UNWANTED_EXT: 0
[07:52:59] [INFO]::ENVIRONMENT: SAB_URL: http://192.168.82.51:5076/getnzb/api/****
[07:52:59] [INFO]::ENVIRONMENT: SAB_FAILURE_URL:
[07:52:59] [INFO]::ENVIRONMENT: SAB_COMPLETE_DIR: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:52:59] [INFO]::ENVIRONMENT: SAB_PP_STATUS: 0
[07:52:59] [INFO]::ENVIRONMENT: SAB_DOWNLOAD_TIME: 480
[07:52:59] [INFO]::ENVIRONMENT: SAB_AVG_BPS: 18881
[07:52:59] [INFO]::ENVIRONMENT: SAB_AGE: 6d
[07:52:59] [INFO]::ENVIRONMENT: SAB_ORIG_NZB_GZ: /volume1/Downloads/incomplete/foundation.s02e04.2160p.web.h265-successfulcrab-4P/__ADMIN__/foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb.gz
[07:52:59] [INFO]::ENVIRONMENT: SAB_PYTHONUNBUFFERED: True
[07:52:59] [INFO]::ENVIRONMENT: SAB_PROGRAM_DIR: /volume1/@appstore/sabnzbd/share/SABnzbd
[07:52:59] [INFO]::ENVIRONMENT: SAB_PAR2_COMMAND: /volume1/@appstore/sabnzbd/bin/par2
[07:52:59] [INFO]::ENVIRONMENT: SAB_MULTIPAR_COMMAND:
[07:52:59] [INFO]::ENVIRONMENT: SAB_RAR_COMMAND: /volume1/@appstore/sabnzbd/bin/unrar
[07:52:59] [INFO]::ENVIRONMENT: SAB_ZIP_COMMAND:
[07:52:59] [INFO]::ENVIRONMENT: SAB_7ZIP_COMMAND: /volume1/@appstore/sabnzbd/bin/7za
[07:52:59] [INFO]::ENVIRONMENT: SAB_VERSION: 4.0.3
[07:52:59] [INFO]::MAIN: Python v3.11 will reach end of life in 1513 days.
[07:52:59] [INFO]::MAIN: Checking database structure...
[07:52:59] [DEBUG]::MAIN: Checking Initial Schema database upgrade
[07:52:59] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
[07:52:59] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
[07:52:59] [DEBUG]::MAIN: InitialSchema upgrade not required
[07:52:59] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/git/bin/git" version
[07:52:59] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" version with your shell in /volume1/Files/Scripts/nzbToMedia
[07:52:59] [DEBUG]::MAIN: git output: git version 2.41.0
[07:52:59] [DEBUG]::MAIN: "/usr/local/git/bin/git" version : returned successful
[07:52:59] [DEBUG]::MAIN: Using: "/usr/local/git/bin/git"
[07:52:59] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" symbolic-ref -q HEAD with your shell in /volume1/Files/Scripts/nzbToMedia
[07:52:59] [DEBUG]::MAIN: git output: refs/heads/remove_group
[07:52:59] [DEBUG]::MAIN: "/usr/local/git/bin/git" symbolic-ref -q HEAD : returned successful
[07:52:59] [INFO]::MAIN: Checking if git needs an update
[07:52:59] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse HEAD with your shell in /volume1/Files/Scripts/nzbToMedia
[07:52:59] [DEBUG]::MAIN: git output: ad73e597e4b1bc99c2780e5da93a4fe534ed5696
[07:52:59] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse HEAD : returned successful
[07:52:59] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" fetch origin with your shell in /volume1/Files/Scripts/nzbToMedia
[07:53:00] [DEBUG]::MAIN: git output:
[07:53:00] [DEBUG]::MAIN: "/usr/local/git/bin/git" fetch origin : returned successful
[07:53:00] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /volume1/Files/Scripts/nzbToMedia
[07:53:00] [DEBUG]::MAIN: git output: ad73e597e4b1bc99c2780e5da93a4fe534ed5696
[07:53:00] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful
[07:53:00] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /volume1/Files/Scripts/nzbToMedia
[07:53:00] [DEBUG]::MAIN: git output:
[07:53:00] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful
[07:53:00] [DEBUG]::MAIN: cur_commit = ad73e597e4b1bc99c2780e5da93a4fe534ed5696 % (newest_commit)= ad73e597e4b1bc99c2780e5da93a4fe534ed5696, num_commits_behind = 0, num_commits_ahead = 0
[07:53:00] [INFO]::MAIN: No update needed
[07:53:00] [INFO]::MAIN: nzbToMedia Version:ad73e597e4b1bc99c2780e5da93a4fe534ed5696 Branch:remove_group (Linux 3.10.108)
[07:53:00] [INFO]::MAIN: #########################################################
[07:53:00] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[07:53:00] [INFO]::MAIN: #########################################################
[07:53:00] [DEBUG]::MAIN: Options passed into nzbToMedia: ['/volume1/Files/Scripts/nzbToMedia/nzbToMedia.py', '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'foundation.s02e04.2160p.web.h265-successfulcrab-4P.nzb', 'foundation.s02e04.2160p.web.h265-successfulcrab-4P', '', 'tv', 'alt.binaries.misc', '0', '']
[07:53:00] [INFO]::MAIN: Script triggered from SABnzbd 4.0.3.
[07:53:00] [DEBUG]::MAIN: Adding NZB download info for directory /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P to database
[07:53:00] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET input_name = ?, input_hash = ?, input_id = ?, client_agent = ?, status = ?, last_update = ? WHERE input_directory = ? with args ['foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'SABnzbd_nzo_t4tw8nel', 'SABnzbd_nzo_t4tw8nel', 'sabnzbd', 0, 738742, '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P']
[07:53:00] [DB]::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (input_name, input_hash, input_id, client_agent, status, last_update) VALUES (?, ?, ?, ?, ?, ?) with args ['foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'SABnzbd_nzo_t4tw8nel', 'SABnzbd_nzo_t4tw8nel', 'sabnzbd', 0, 738742]
[07:53:01] [INFO]::MAIN: Auto-detected SECTION:SickBeard
[07:53:01] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:53:01] [INFO]::MAIN: Calling SickBeard:tv to post-process:foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:53:01] [DEBUG]::SERVER: Attempting to connect to server at http://localhost:8899
[07:53:01] [DEBUG]::SERVER: Server responded at http://localhost:8899
[07:53:01] [INFO]::MAIN: Attempting to auto-detect tv fork
[07:53:01] [DEBUG]::MAIN: Removing excess parameters: ['delete_files', 'delete_on', 'dir', 'dirName', 'ignore_subs', 'resource']
[07:53:01] [INFO]::MAIN: SickBeard:tv fork auto-detection successful ...
[07:53:01] [INFO]::MAIN: SickBeard:tv fork set to SickChill-api
[07:53:01] [DEBUG]::MAIN: Create object for fork SickChill-api
[07:53:01] [INFO]::MAIN: SickBeard:tv Could not create a fork object for SickChill-api. Probaly class not added yet.
[07:53:01] [DEBUG]::EXCEPTION: Replacing file name zmrG with directory name foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:53:01] [DEBUG]::EXCEPTION: Replacing file name /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P/zmrG.mkv with download name /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P/foundation.s02e04.2160p.web.h265-successfulcrab.mkv
[07:53:01] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:53:01] [DEBUG]::MAIN: Checking for empty folders in:/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P
[07:53:01] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/Files/Scripts/nzbToMedia/tests/test.mp4
[07:53:02] [INFO]::TRANSCODER: Checking [foundation.s02e04.2160p.web.h265-successfulcrab.mkv] for corruption, please stand by ...
[07:53:02] [DEBUG]::MAIN: calling command: /usr/local/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P/foundation.s02e04.2160p.web.h265-successfulcrab.mkv
[07:53:02] [INFO]::TRANSCODER: SUCCESS: [foundation.s02e04.2160p.web.h265-successfulcrab.mkv] has no corruption.
[07:53:02] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request
[07:53:02] [DEBUG]::SICKBEARD: Opening URL: http://localhost:8899/api/****/ with params: {'path': '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'proc_dir': '/volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P', 'failed': 0, 'return_data': 0, 'force_next': 1, 'cmd': 'postprocess', 'nzbName': 'foundation.s02e04.2160p.web.h265-successfulcrab-4P'}
[07:53:07] [DB]::DB: Updating DB download status of foundation.s02e04.2160p.web.h265-successfulcrab-4P to 1
[07:53:07] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 738742, 'foundation.s02e04.2160p.web.h265-successfulcrab-4P']
[07:53:07] [INFO]::CLEANDIR: Directory /volume1/Downloads/complete/TV/foundation.s02e04.2160p.web.h265-successfulcrab-4P has been processed and removed ...
[07:53:07] [INFO]::MAIN: The /volume1/Files/Scripts/nzbToMedia/nzbToMedia.py script completed successfully.
Changing to directory: /volume1/Files/Scripts/nzbToMedia
-- Cleaning bytecode --
b'Removing __pycache__/\n'
b'Removing __pycache__/\n'
-- Cleaning folders: ['libs', 'core'] --
No folders to clean
Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd
-- Cleanup finished --
SickBeard: Successfully post-processed foundation.s02e04.2160p.web.h265-successfulcrab-4P!
to revert back
su -s /bin/bash -c '/usr/local/git/bin/git checkout master' sc-sabnzbd
I'll merge the changes into master now, so you should have the functionality on that,
Great, thank you!
Describe the bug A clear and concise description of what the bug is.
Technical Specs
Expected behavior nzbToMedia are configured to remove faulty groups but the script doesn't seem to do any thing at that step. In this case -4P was expected to be removed.
My config: "remove_group = [eztv.re], -xpost, [TGx], [rarbg], -4P, [WtFnZb], WtF[nZb]"
Log Sorry no debug logs but this should be easy to reproduce.. `/volume1/Files/Scripts/nzbToMedia/libs/common/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead warnings.warn("beets.mediafile is deprecated; use mediafile instead") [09:48:46] [INFO]::MAIN: Loading config from [/volume1/Files/Scripts/nzbToMedia/autoProcessMedia.cfg] [09:48:46] [INFO]::MAIN: Python v3.11 will reach end of life in 1565 days. [09:48:46] [INFO]::MAIN: Checking database structure... [09:48:46] [INFO]::MAIN: Checking if git needs an update [09:48:47] [INFO]::MAIN: No update needed [09:48:47] [INFO]::MAIN: nzbToMedia Version:c4cc554ea1e9b342538853a8108964bde7929e2f Branch:master (Linux 3.10.108) [09:48:47] [INFO]::MAIN: ######################################################### [09:48:47] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [09:48:47] [INFO]::MAIN: ######################################################### [09:48:47] [INFO]::MAIN: Script triggered from SABnzbd 4.0.2. [09:48:48] [INFO]::MAIN: Auto-detected SECTION:SickBeard [09:48:48] [INFO]::MAIN: Calling SickBeard:tv to post-process:From.S02E09.Ball.of.Magic.Fire.2160p.STAN.WEB-DL.DDP5.1.H.265-NTb-4P [09:48:48] [INFO]::MAIN: Attempting to auto-detect tv fork [09:48:48] [INFO]::MAIN: SickBeard:tv fork auto-detection successful ... [09:48:48] [INFO]::MAIN: SickBeard:tv fork set to SickChill-api [09:48:48] [INFO]::MAIN: SickBeard:tv Could not create a fork object for SickChill-api. Probaly class not added yet. [09:48:48] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/Downloads/complete/TV/From.S02E09.Ball.of.Magic.Fire.2160p.STAN.WEB-DL.DDP5.1.H.265-NTb-4P [09:48:48] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [09:49:12] [INFO]::CLEANDIR: Directory /volume1/Downloads/complete/TV/From.S02E09.Ball.of.Magic.Fire.2160p.STAN.WEB-DL.DDP5.1.H.265-NTb-4P has been processed and removed ... [09:49:12] [INFO]::MAIN: The /volume1/Files/Scripts/nzbToMedia/nzbToMedia.py script completed successfully. Changing to directory: /volume1/Files/Scripts/nzbToMedia
-- Cleaning bytecode -- b'Removing pycache/\n' b'Removing pycache/\n'
-- Cleaning folders: ['libs', 'core'] -- No folders to clean
Returning to directory: /volume1/@appstore/sabnzbd/share/SABnzbd
-- Cleanup finished --`