clinton-hall / nzbToMedia

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

QQ: why would a complete torrent say "no media files found" #1804

Closed mgaulton closed 4 months ago

mgaulton commented 3 years ago

Describe the bug I've noticed a hard time getting some torrent completions to process. But when I download them outside of nTM, they work. I don't understand how a completed torrent has no media files? Others have worked.

Technical Specs

  1. Opensuse Tumbleweed x64
  2. Python version '3.8
  3. Download Client qbittorrent 4.2.5
  4. Intended Media Management SickChill

Expected behavior media file is found and processed.

Log 2021-01-08 15:45:51 INFO ::MAIN: Loading config from [/home/vpnuser/nzbToMedia/autoProcessMedia.cfg] 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SHELL: /bin/bash 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SUDO_GID: 0 2021-01-08 15:45:51 INFO ::ENVIRONMENT: QBITTORRENT: v4.2.5 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SUDO_COMMAND: /usr/bin/qbittorrent-nox --webui-port=8112 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SUDO_USER: root 2021-01-08 15:45:51 INFO ::ENVIRONMENT: PWD: / 2021-01-08 15:45:51 INFO ::ENVIRONMENT: LOGNAME: vpnuser 2021-01-08 15:45:51 INFO ::ENVIRONMENT: XDG_SESSION_TYPE: unspecified 2021-01-08 15:45:51 INFO ::ENVIRONMENT: HOME: /home/vpnuser 2021-01-08 15:45:51 INFO ::ENVIRONMENT: LANG: en_US.UTF-8 2021-01-08 15:45:51 INFO ::ENVIRONMENT: https_proxy: 2021-01-08 15:45:51 INFO ::ENVIRONMENT: sock_proxy: 2021-01-08 15:45:51 INFO ::ENVIRONMENT: XDG_SESSION_CLASS: background 2021-01-08 15:45:51 INFO ::ENVIRONMENT: TERM: unknown 2021-01-08 15:45:51 INFO ::ENVIRONMENT: USER: vpnuser 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SHLVL: 1 2021-01-08 15:45:51 INFO ::ENVIRONMENT: XDG_SESSION_ID: c37 2021-01-08 15:45:51 INFO ::ENVIRONMENT: http_proxy: 2021-01-08 15:45:51 INFO ::ENVIRONMENT: XDG_RUNTIME_DIR: /run/user/1001 2021-01-08 15:45:51 INFO ::ENVIRONMENT: PATH: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin:/snap/bin 2021-01-08 15:45:51 INFO ::ENVIRONMENT: SUDO_UID: 0 2021-01-08 15:45:51 INFO ::ENVIRONMENT: DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1001/bus 2021-01-08 15:45:51 INFO ::ENVIRONMENT: MAIL: /var/mail/vpnuser 2021-01-08 15:45:51 INFO ::ENVIRONMENT: _: /usr/bin/python3 2021-01-08 15:45:51 INFO ::MAIN: Python v3.8 will reach end of life in 1375 days. 2021-01-08 15:45:51 INFO ::MAIN: Checking database structure... 2021-01-08 15:45:51 DEBUG ::MAIN: Checking Initial Schema database upgrade 2021-01-08 15:45:51 DB ::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',) 2021-01-08 15:45:51 DB ::MAIN: nzbtomedia.db: SELECT db_version FROM db_version 2021-01-08 15:45:51 DEBUG ::MAIN: InitialSchema upgrade not required 2021-01-08 15:45:51 DEBUG ::MAIN: Checking if we can use git commands: "/usr/bin/git" version 2021-01-08 15:45:51 DEBUG ::MAIN: Executing "/usr/bin/git" version with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:51 DEBUG ::MAIN: git output: git version 2.29.2 2021-01-08 15:45:51 DEBUG ::MAIN: "/usr/bin/git" version : returned successful 2021-01-08 15:45:51 DEBUG ::MAIN: Using: "/usr/bin/git" 2021-01-08 15:45:51 DEBUG ::MAIN: Executing "/usr/bin/git" symbolic-ref -q HEAD with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:51 DEBUG ::MAIN: git output: refs/heads/master 2021-01-08 15:45:51 DEBUG ::MAIN: "/usr/bin/git" symbolic-ref -q HEAD : returned successful 2021-01-08 15:45:51 INFO ::MAIN: Checking if git needs an update 2021-01-08 15:45:51 DEBUG ::MAIN: Executing "/usr/bin/git" rev-parse HEAD with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:51 DEBUG ::MAIN: git output: 9d64c2f47869584ebf3ca269632e1f03a461f99e 2021-01-08 15:45:51 DEBUG ::MAIN: "/usr/bin/git" rev-parse HEAD : returned successful 2021-01-08 15:45:51 DEBUG ::MAIN: Executing "/usr/bin/git" fetch origin with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:53 DEBUG ::MAIN: git output: 2021-01-08 15:45:53 DEBUG ::MAIN: "/usr/bin/git" fetch origin : returned successful 2021-01-08 15:45:53 DEBUG ::MAIN: Executing "/usr/bin/git" rev-parse --verify --quiet '@{upstream}' with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:53 DEBUG ::MAIN: git output: 9d64c2f47869584ebf3ca269632e1f03a461f99e 2021-01-08 15:45:53 DEBUG ::MAIN: "/usr/bin/git" rev-parse --verify --quiet '@{upstream}' : returned successful 2021-01-08 15:45:53 DEBUG ::MAIN: Executing "/usr/bin/git" rev-list --left-right '@{upstream}'...HEAD with your shell in /home/vpnuser/nzbToMedia 2021-01-08 15:45:53 DEBUG ::MAIN: git output: 2021-01-08 15:45:53 DEBUG ::MAIN: "/usr/bin/git" rev-list --left-right '@{upstream}'...HEAD : returned successful 2021-01-08 15:45:53 DEBUG ::MAIN: cur_commit = 9d64c2f47869584ebf3ca269632e1f03a461f99e % (newest_commit)= 9d64c2f47869584ebf3ca269632e1f03a461f99e, num_commits_behind = 0, num_commits_ahead = 0 2021-01-08 15:45:53 INFO ::MAIN: No update needed 2021-01-08 15:45:53 INFO ::MAIN: nzbToMedia Version:9d64c2f47869584ebf3ca269632e1f03a461f99e Branch:master (Linux 5.10.4-1-default) 2021-01-08 15:45:53 DEBUG ::MAIN: Connecting to qbittorrent: http://localhost:8112 2021-01-08 15:45:55 INFO ::MAIN: ######################################################### 2021-01-08 15:45:55 INFO ::MAIN: ## ..::[TorrentToMedia.py]::.. ## 2021-01-08 15:45:55 INFO ::MAIN: ######################################################### 2021-01-08 15:45:55 DEBUG ::MAIN: Options passed into TorrentToMedia: ['/home/vpnuser/nzbToMedia/TorrentToMedia.py', '/home/@send/tv/|Star.Trek.Discovery.S03E13.WEBRip.x264-ION10|tv|754ed6723b69d6569c47219c5f15a6b78102da0a|||'] 2021-01-08 15:45:55 DEBUG ::MAIN: Adding TORRENT download info for directory /home/@send/tv to database 2021-01-08 15:45:55 DB ::MAIN: nzbtomedia.db: UPDATE downloads SET input_name = ?, input_hash = ?, input_id = ?, client_agent = ?, status = ?, last_update = ? WHERE input_directory = ? with args ['Star.Trek.Discovery.S03E13.WEBRip.x264-ION10', '754ed6723b69d6569c47219c5f15a6b78102da0a', '754ed6723b69d6569c47219c5f15a6b78102da0a', 'qbittorrent', 0, 737798, '/home/@send/tv'] 2021-01-08 15:45:55 DB ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (input_name, input_hash, input_id, client_agent, status, last_update) VALUES (?, ?, ?, ?, ?, ?) with args ['Star.Trek.Discovery.S03E13.WEBRip.x264-ION10', '754ed6723b69d6569c47219c5f15a6b78102da0a', '754ed6723b69d6569c47219c5f15a6b78102da0a', 'qbittorrent', 0, 737798] 2021-01-08 15:45:56 DEBUG ::MAIN: Received Directory: /home/@send/tv | Name: Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 | Category: tv 2021-01-08 15:45:56 DEBUG ::MAIN: SEARCH: Found the Category: tv in directory structure 2021-01-08 15:45:56 INFO ::MAIN: SEARCH: Found torrent directory Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 in input directory directory /home/@send/tv 2021-01-08 15:45:56 INFO ::MAIN: SEARCH: Setting input_directory to /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:45:56 DEBUG ::MAIN: Determined Directory: /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 | Name: Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 | Category: tv 2021-01-08 15:45:56 INFO ::MAIN: Auto-detected SECTION:SickBeard 2021-01-08 15:45:56 DEBUG ::MAIN: Stopping torrent Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 in qbittorrent while processing 2021-01-08 15:46:04 INFO ::MAIN: Output directory set to: /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 DEBUG ::MAIN: Scanning files in directory: /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 DEBUG ::MAIN: Found 1 files in /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 INFO ::COPYLINK: MEDIAFILE: [2_English.srt] 2021-01-08 15:46:04 INFO ::COPYLINK: SOURCE FOLDER: [/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10/Subs] 2021-01-08 15:46:04 INFO ::COPYLINK: TARGET FOLDER: [/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10] 2021-01-08 15:46:04 INFO ::COPYLINK: Moving SOURCE MEDIAFILE -> TARGET FOLDER 2021-01-08 15:46:04 DEBUG ::MAIN: Checking for archives to extract in directory: /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 INFO ::MAIN: FLATTEN: Flattening directory: /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 DEBUG ::MAIN: Checking for empty folders in:/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 DEBUG ::MAIN: Checking for empty folders in:/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10/Subs 2021-01-08 15:46:04 DEBUG ::MAIN: Removing empty folder:/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10/Subs 2021-01-08 15:46:04 WARNING ::MAIN: Found no media files in /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 INFO ::MAIN: Calling SickBeard:tv to post-process:Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:04 DEBUG ::SERVER: Attempting to connect to server at http://localhost:8182 2021-01-08 15:46:04 DEBUG ::SERVER: Server responded at http://localhost:8182 2021-01-08 15:46:04 INFO ::MAIN: SickBeard:tv fork set to SickChill 2021-01-08 15:46:04 WARNING ::SICKBEARD: No media files found in directory /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10. Processing this as a failed download 2021-01-08 15:46:04 POSTPROCESS::SICKBEARD: FAILED: The download failed. Sending 'failed' process request to SickChill branch 2021-01-08 15:46:04 DEBUG ::SICKBEARD: Opening URL: http://localhost:8182/api/53bf5bb5a62b67e4d74b04daf3f2a992/ with params: {'proc_dir': '/home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10', 'failed': 1, 'process_method': 'move', 'force': 1, 'delete_on': 1, 'force_next': 1, 'quiet': 1, 'nzbName': 'Star.Trek.Discovery.S03E13.WEBRip.x264-ION10', 'cmd': 'postprocess'} 2021-01-08 15:46:06 POSTPROCESS::SICKBEARD: Deleting failed files and folder /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:06 INFO ::MAIN: Deleting /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 2021-01-08 15:46:06 DB ::DB: Updating DB download status of Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 to 1 2021-01-08 15:46:06 DB ::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 737798, 'Star.Trek.Discovery.S03E13.WEBRip.x264-ION10'] 2021-01-08 15:46:08 DEBUG ::MAIN: Deleting torrent Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 from qbittorrent 2021-01-08 15:46:18 INFO ::CLEANDIR: Directory /home/@send/tv/Star.Trek.Discovery.S03E13.WEBRip.x264-ION10 has been processed and removed ... 2021-01-08 15:46:18 INFO ::MAIN: The /home/vpnuser/nzbToMedia/TorrentToMedia.py script completed successfully.

mgaulton commented 3 years ago

I suspect it's a matter of qBittorrent hasn't completed the move of the file over to the new location as its seeding. not sure if there's a way to verify if that's the case. Edit: it seems to not be qb but ntm cleaning up before SC is finished moving files after the job is put in the processing queue

mgaulton commented 3 years ago

Is it possible to turn off the call to SickChill being quiet: 1, i couldn't find an option. It seems like its sending the request to SC but its not being action before the files are removed.

mgaulton commented 3 years ago

So i've been testing and fork = auto, seems to be working as expected, it waits for SC to compklete but the SC UI is seemuingly waiting to complete, its just spinning with fork = sickchill, it submits it to the SC processing queue, but doesn't seem to be waiting for the move to complete before trying to clean up the folders etc. it returns quick

mgaulton commented 3 years ago

I have a thought, force_clean = 1 and delete_on = 1 , would that kill the files before the queue processes in SC? edit: This is only happening with my qbitrroent install, which is seperate from my sabnzbd install, I use a seperating install of nTM for each

clinton-hall commented 3 years ago

with the only log above, the issue is the "no media files found" which causes the script to send to sickchill as "failed" this seems to indicate the only file found was subs/2_English.srt

as far as forks, use fork = auto

also try changing the "ouputDirectory"

    useLink = hard
    outputDirectory = /home/processed
mgaulton commented 3 years ago

So i found a couple things beating on it all weekend. somehow the process_method got set to blank, rather than move. the fork was set to sickchill, so I change it to auto.

Last I checked before bed last night, it seemed to be working. I was again seeing the sickbeard processing responses in the nTM log. Not sure if that was my mistake or something weird happened.

On Sun, Jan 10, 2021 at 3:28 AM Clinton Hall notifications@github.com wrote:

with the only log above, the issue is the "no media files found" which causes the script to send to sickchill as "failed" this seems to indicate the only file found was subs/2_English.srt

as far as forks, use fork = auto

also try changing the "ouputDirectory"

useLink = hard
outputDirectory = /home/processed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clinton-hall/nzbToMedia/issues/1804#issuecomment-757438137, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEJRXTZHMNDW7BW77H7P3LSZFQKBANCNFSM4V26MT7Q .