clinton-hall / nzbToMedia

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

Error with script issue #1975

Closed shizo971 closed 1 year ago

shizo971 commented 1 year ago

Describe the bug nzbToMedia doesn't work exactly and return a success but not. I can't see where the error is. I need some help plz. Best regards.

Technical Specs

  1. Running on Synology DS918+
  2. Python version 3.11.4
  3. Download Client SABnbzd 4.0.3 [[9fafe64]
  4. Intended Media Management Medusa Version: 1.0.17 / Branch: master / Commit: 3d656652ab277e47689483912ed7fc443e7023e8

Expected behavior SickBeard: Successfully post-processed

Log

`/volume1/@appdata/sabnzbd/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") [19:27:02] [INFO]::MAIN: Loading config from [/volume1/@appdata/sabnzbd/scripts/nzbToMedia/autoProcessMedia.cfg] [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGVAR: /volume1/@appdata/sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGPORT: 8080 [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGSHARE: /volume1/@appshare/sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_USERNAME: [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGNAME: sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MAJOR: 7 [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGHOME: /volume1/@apphome/sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_MINOR: 2 [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGTMP: /volume1/@apptemp/sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_DSM_VERSION_BUILD: 64570 [19:27:02] [INFO]::ENVIRONMENT: SELF: sabnzbd [19:27:02] [INFO]::ENVIRONMENT: PWD: / [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGVER: 4.0.3-63 [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_DSM_LANGUAGE: [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_DSM_ARCH: apollolake [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_PKGDEST_VOL: /volume1 [19:27:02] [INFO]::ENVIRONMENT: SHLVL: 2 [19:27:02] [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 [19:27:02] [INFO]::ENVIRONMENT: SYNOPKG_TEMP_LOGFILE: /tmp/synopkgmgr.log-sabnzbd [19:27:02] [INFO]::ENVIRONMENT: SYNOPKGPKGDEST: /volume1/@appstore/sabnzbd [19:27:02] [INFO]::ENVIRONMENT: : /bin/env [19:27:02] [INFO]::ENVIRONMENT: LANG: en_US.UTF-8 [19:27:02] [INFO]::ENVIRONMENT: AVAHI_COMPAT_NOWARN: 1 [19:27:02] [INFO]::ENVIRONMENT: SSL_CERT_FILE: /var/packages/python311/target/lib/python3.11/site-packages/certifi/cacert.pem [19:27:02] [INFO]::ENVIRONMENT: SAB_BYTES: 840341904 [19:27:02] [INFO]::ENVIRONMENT: SAB_BYTES_DOWNLOADED: 767573819 [19:27:02] [INFO]::ENVIRONMENT: SAB_BYTES_TRIED: 840341904 [19:27:02] [INFO]::ENVIRONMENT: SAB_CAT: animes [19:27:02] [INFO]::ENVIRONMENT: SAB_CORRECT_PASSWORD: [19:27:02] [INFO]::ENVIRONMENT: SAB_DUPLICATE: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_ENCRYPTED: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_FAIL_MSG: [19:27:02] [INFO]::ENVIRONMENT: SAB_FILENAME: [Erai-raws].Level.1.Dakedo.Unique.Skill.de.Saikyou.Desu.-.01.[720p][Multiple.Subtitle][4B19D9CB].nzb [19:27:02] [INFO]::ENVIRONMENT: SAB_FINAL_NAME: [Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:02] [INFO]::ENVIRONMENT: SAB_GROUP: alt.binaries.multimedia.anime.highspeed [19:27:02] [INFO]::ENVIRONMENT: SAB_NZO_ID: SABnzbd_nzo_msvi6we1 [19:27:02] [INFO]::ENVIRONMENT: SAB_OVERSIZED: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_PASSWORD: [19:27:02] [INFO]::ENVIRONMENT: SAB_PP: 3 [19:27:02] [INFO]::ENVIRONMENT: SAB_PRIORITY: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_REPAIR: 1 [19:27:02] [INFO]::ENVIRONMENT: SAB_SCRIPT: nzbToMedia.py [19:27:02] [INFO]::ENVIRONMENT: SAB_STATUS: Running [19:27:02] [INFO]::ENVIRONMENT: SAB_UNPACK: 1 [19:27:02] [INFO]::ENVIRONMENT: SAB_UNWANTED_EXT: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_URL: https://dl.dognzb.cr/fetch/28515ffde60f3665cb77494fd542afcc/181e7d4e52f032250f9c6470c3b9534d [19:27:02] [INFO]::ENVIRONMENT: SAB_FAILURE_URL: [19:27:02] [INFO]::ENVIRONMENT: SAB_COMPLETE_DIR: /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:02] [INFO]::ENVIRONMENT: SAB_PP_STATUS: 0 [19:27:02] [INFO]::ENVIRONMENT: SAB_DOWNLOAD_TIME: 34 [19:27:02] [INFO]::ENVIRONMENT: SAB_AVG_BPS: 21615 [19:27:02] [INFO]::ENVIRONMENT: SAB_AGE: 24d [19:27:02] [INFO]::ENVIRONMENT: SAB_ORIG_NZB_GZ: /volume1/Telechargement/sabnzbd/incomplet/[Erai-raws].Level.1.Dakedo.Unique.Skill.de.Saikyou.Desu.-.01.[720p][Multiple.Subtitle][4B19D9CB]/ADMIN/[Erai-raws].Level.1.Dakedo.Unique.Skill.de.Saikyou.Desu.-.01.[720p][Multiple.Subtitle][4B19D9CB].nzb.gz [19:27:02] [INFO]::ENVIRONMENT: SAB_PYTHONUNBUFFERED: True [19:27:02] [INFO]::ENVIRONMENT: SAB_PROGRAM_DIR: /volume1/@appstore/sabnzbd/share/SABnzbd [19:27:02] [INFO]::ENVIRONMENT: SAB_PAR2_COMMAND: /volume1/@appstore/sabnzbd/bin/par2 [19:27:02] [INFO]::ENVIRONMENT: SAB_MULTIPAR_COMMAND: [19:27:02] [INFO]::ENVIRONMENT: SAB_RAR_COMMAND: /volume1/@appstore/sabnzbd/bin/unrar [19:27:02] [INFO]::ENVIRONMENT: SAB_ZIP_COMMAND: [19:27:02] [INFO]::ENVIRONMENT: SAB_7ZIP_COMMAND: /volume1/@appstore/sabnzbd/bin/7za [19:27:02] [INFO]::ENVIRONMENT: SAB_VERSION: 4.0.3 [19:27:02] [INFO]::MAIN: Python v3.11 will reach end of life in 1522 days. [19:27:02] [INFO]::MAIN: Checking database structure... [19:27:02] [DEBUG]::MAIN: Checking Initial Schema database upgrade [19:27:02] [DB]::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',) [19:27:02] [DB]::MAIN: nzbtomedia.db: SELECT db_version FROM db_version [19:27:02] [DEBUG]::MAIN: InitialSchema upgrade not required [19:27:02] [DEBUG]::MAIN: Checking if we can use git commands: "/usr/local/git/bin/git" version [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" version with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: git version 2.41.0 [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" version : returned successful [19:27:02] [DEBUG]::MAIN: Using: "/usr/local/git/bin/git" [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" symbolic-ref -q HEAD with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: refs/heads/master [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" symbolic-ref -q HEAD : returned successful [19:27:02] [INFO]::MAIN: Checking if git needs an update [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse HEAD with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse HEAD : returned successful [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" fetch origin with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" fetch origin : returned successful [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful [19:27:02] [DEBUG]::MAIN: Executing "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /volume1/@appdata/sabnzbd/scripts/nzbToMedia [19:27:02] [DEBUG]::MAIN: git output: [19:27:02] [DEBUG]::MAIN: "/usr/local/git/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful [19:27:02] [DEBUG]::MAIN: cur_commit = 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 % (newest_commit)= 6c2f7c75d461d49451db5ddfb2db839fc1feb9c9, num_commits_behind = 0, num_commits_ahead = 0 [19:27:02] [INFO]::MAIN: No update needed [19:27:02] [INFO]::MAIN: nzbToMedia Version:6c2f7c75d461d49451db5ddfb2db839fc1feb9c9 Branch:master (Linux 4.4.302+) [19:27:02] [INFO]::MAIN: ######################################################### [19:27:02] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ## [19:27:02] [INFO]::MAIN: ######################################################### [19:27:02] [DEBUG]::MAIN: Options passed into nzbToMedia: ['/volume1/@appdata/sabnzbd/scripts/nzbToMedia/nzbToMedia.py', '/volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]', '[Erai-raws].Level.1.Dakedo.Unique.Skill.de.Saikyou.Desu.-.01.[720p][Multiple.Subtitle][4B19D9CB].nzb', '[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]', '', 'animes', 'alt.binaries.multimedia.anime.highspeed', '0', ''] [19:27:02] [INFO]::MAIN: Script triggered from SABnzbd 4.0.3. [19:27:02] [DEBUG]::MAIN: Adding NZB download info for directory /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] to database [19:27:02] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET input_name = ?, input_hash = ?, input_id = ?, client_agent = ?, status = ?, last_update = ? WHERE input_directory = ? with args ['[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]', 'SABnzbd_nzo_msvi6we1', 'SABnzbd_nzo_msvi6we1', 'sabnzbd', 0, 738733, '/volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]'] [19:27:02] [DB]::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (input_name, input_hash, input_id, client_agent, status, last_update) VALUES (?, ?, ?, ?, ?, ?) with args ['[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]', 'SABnzbd_nzo_msvi6we1', 'SABnzbd_nzo_msvi6we1', 'sabnzbd', 0, 738733] [19:27:02] [INFO]::MAIN: Auto-detected SECTION:SickBeard [19:27:02] [DEBUG]::MAIN: Checking for archives to extract in directory: /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:02] [INFO]::MAIN: Calling SickBeard:animes to post-process:[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:02] [DEBUG]::SERVER: Attempting to connect to server at https://10.10.60.42:8897 [19:27:03] [DEBUG]::SERVER: Server responded at https://10.10.60.42:8897 [19:27:03] [INFO]::MAIN: SickBeard:animes fork set to Medusa-apiv2 [19:27:03] [DEBUG]::MAIN: Create object for fork Medusa-apiv2 [19:27:03] [INFO]::MAIN: FLATTEN: Flattening directory: /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:03] [DEBUG]::MAIN: Checking for empty folders in:/volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:03] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/@appdata/sabnzbd/scripts/nzbToMedia/tests/test.mp4 [19:27:03] [INFO]::TRANSCODER: Checking [[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv] for corruption, please stand by ... [19:27:03] [DEBUG]::MAIN: calling command: /usr/local/ffmpeg/bin/ffprobe -v quiet -print_format json -show_format -show_streams -show_error /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv [19:27:03] [INFO]::TRANSCODER: SUCCESS: [[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv] has no corruption. [19:27:03] [POSTPROCESS]::SICKBEARD: SUCCESS: The download succeeded, sending a post-process request [19:27:03] [DEBUG]::SICKBEARD: Opening URL: https://10.10.60.42:8897/api/v2/postprocess [19:27:08] [POSTPROCESS]::SICKBEARD: Processing path: /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:08] [POSTPROCESS]::SICKBEARD: Processing resource: [Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:08] [POSTPROCESS]::SICKBEARD: Same path and resource detected, using path [/volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]] to process as a source folder [19:27:08] [POSTPROCESS]::SICKBEARD: Processing folder: /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] [19:27:08] [POSTPROCESS]::SICKBEARD: Post-processing files: ['[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv'] [19:27:08] [POSTPROCESS]::SICKBEARD: Post-processing video files: ['[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv'] [19:27:08] [POSTPROCESS]::SICKBEARD: Processing aborted for /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB].mkv: Destination episode has a status of Archived. Abort postprocessing. [19:27:08] [POSTPROCESS]::SICKBEARD: Post-processing completed. [19:27:08] [DB]::DB: Updating DB download status of [Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] to 1 [19:27:08] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 738733, '[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]'] [19:27:08] [INFO]::CLEANDIRS: Directory /volume1/Telechargement/sabnzbd/complet/animes/[Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB] still contains 1 unprocessed file(s), skipping ... [19:27:08] [INFO]::MAIN: The /volume1/@appdata/sabnzbd/scripts/nzbToMedia/nzbToMedia.py script completed successfully. Changing to directory: /volume1/@appdata/sabnzbd/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 [Erai-raws] Level 1 Dakedo Unique Skill de Saikyou Desu - 01 [720p][Multiple Subtitle][4B19D9CB]!`